GWT with example diagram API from Google does not work

I downloaded the http://code.google.com/p/gwt-google-apis/downloads/detail?name=gwt-visualization-1.1.0.zip&can=2&q= archive that comes with the jar, which is needed to use the diagrams in GWT. The archive also has a sample application ( http://gwt.google.com/samples/hellovisualization-1.1.0/HelloVisualization.html ). But this example does not work for me. There is a runtime error on this line: DataTable data = DataTable.create ();

Eclipse reports this: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read the DataTable property from undefined.

What is wrong here?

+3
source share
1 answer

You must call VisualizationUtils.loadVisualizationApi (onLoadCallback, PieChart.PACKAGE) to load the api and write onLoadCallBack to execute sth. when the API is loaded.

+6
source

Source: https://habr.com/ru/post/1763478/


All Articles