Closed GoogleCodeExporter closed 9 years ago
Hi Omer, this occurs also im my project (gwt and smartgwt project),issue 425,
426,
in other words
com.google.gwt.visualization.client.visualizations.PieChart integrated in
smartwgt work fine
but
com.google.gwt.visualization.client.visualizations.corechart.PieChart
don't work,
regards
Original comment by vlui...@tiscali.it
on 6 Feb 2011 at 9:18
Yes, that's my problem.
Any one has any workaround?
Thanks,
Original comment by omer...@gmail.com
on 10 Feb 2011 at 2:31
You cannot use the string 'piechart' with the newer functionality. Use
'corechart' instead.
Original comment by zundel@google.com
on 10 Feb 2011 at 2:48
[deleted comment]
I am having the same issue. I am using the corechart with smartgwt. Below is
the alone code I am using with smartgwt & gwt-visualization.jar 1.1.1
integration. I copied most of the code from gwt visualization 1.1.1 examples.
This seems like an issue with visualization api and there seems to be no work
around?
ERROR:
Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
(TypeError): Cannot read property 'returnValue' of undefined
stack: TypeError: Cannot read property 'returnValue' of undefined
at anonymous (eval at <anonymous> (http://127.0.0.1:8888/myproject/sc/modules/ISC_Core.js:38:72))
at http://www.google.com/uds/api/visualization/1.0/ff143b01fadc35fa0f4657e99bad401b/default,table,corechart.I.js:140:1
at unknown source
at unknown source
at __gwt_jsInvoke (http://127.0.0.1:8888/myproject/hosted.html?myproject:76:35)
at eval at <anonymous> (http://127.0.0.1:8888/myproject/hosted.html?myproject:54:12)
at unknown source
type: non_object_property_load
arguments: returnValue,
__gwt_ObjectId: 20
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception
handling.
CODE:
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.VisualizationUtils;
import com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
import com.google.gwt.visualization.client.visualizations.Table;
import com.google.gwt.visualization.client.visualizations.corechart.PieChart;
public class MyProject implements EntryPoint {
public void onModuleLoad() {
VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
RootPanel.get().add(createPieChart());
}}, PieChart.PACKAGE);
}
private Widget createPieChart() {
/* create a datatable */
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, "Task");
data.addColumn(ColumnType.NUMBER, "Hours per Day");
data.addRows(5);
data.setValue(0, 0, "Work");
data.setValue(0, 1, 11);
data.setValue(1, 0, "Eat");
data.setValue(1, 1, 2);
data.setValue(2, 0, "Commute");
data.setValue(2, 1, 2);
data.setValue(3, 0, "Watch TV");
data.setValue(3, 1, 2);
data.setValue(4, 0, "Sleep");
data.setValue(4, 1, 7);
/* create pie chart */
PieChart.PieOptions options = PieChart.createPieOptions();
options.setWidth(400);
options.setHeight(240);
options.set3D(true);
options.setTitle("My Daily Activities");
return new PieChart(data, options);
}
}
Original comment by kaushik...@gmail.com
on 18 Feb 2011 at 4:08
smartgwt users, there has been an update to the smartgwt project that might
help you: see http://code.google.com/p/smartgwt/issues/detail?id=405
Original comment by zundel@google.com
on 4 Mar 2011 at 6:56
Original comment by zundel@google.com
on 4 Mar 2011 at 6:57
The problem seems to be solved using latest nightly build from smartgwt.
Original comment by kaushik...@gmail.com
on 7 Mar 2011 at 10:53
Original issue reported on code.google.com by
omer...@gmail.com
on 6 Feb 2011 at 3:49Attachments: