0
votes

I am trying to use AnnotatedTimeLine graph provided in GWT Visualization and i am getting following exception

com.google.gwt.core.client.JavaScriptException: (Error): Container height is zero. Expecting a valid height. stack: Error: Container height is zero. Expecting a valid height.

My View class codes is like below

void onButtonLineGraphClick(ClickEvent event) { Runnable onLoadCallback1 = new Runnable() { public void run() { AnnotatedTimeLine timeline = new AnnotatedTimeLine(createLineTable(), createOptionsLine(), "200", "200"); panelGraph.setHeight("200"); panelGraph.setWidth("200"); panelGraph.add(timeline); } }; VisualizationUtils.loadVisualizationApi(onLoadCallback1, AnnotatedTimeLine.PACKAGE); }

And Pannel Graph is defined like below in ui.xml

g:HTMLPanel width = "200px" height="200px" ui:field="panelGraph"

1

1 Answers

1
votes

AnnotatedTimeLine timeline = new AnnotatedTimeLine(createLineTable(), createOptionsLine(), "200", "200");

Should be replace with

AnnotatedTimeLine timeline = new AnnotatedTimeLine(createLineTable(), createOptionsLine(), "200px", "200px");

finally got it...