Smart GWT 3.0 (LPGL)
GWT 2.4
Google Chrome
I'm trying to add a facet chart to my display but am having some trouble. I am currently just trying to implement the example found here http://forums.smartclient.com/showth...ght=facetchart. But whenever I add the facet chart to the parent canvas I get a "Cannot call method 'create' of undefined". I've added the below line to my *.gwt.xml file
Facet Chart Code:
Error Message:
Any help or suggestions is appreciated.
Thanks,
Chris
GWT 2.4
Google Chrome
I'm trying to add a facet chart to my display but am having some trouble. I am currently just trying to implement the example found here http://forums.smartclient.com/showth...ght=facetchart. But whenever I add the facet chart to the parent canvas I get a "Cannot call method 'create' of undefined". I've added the below line to my *.gwt.xml file
Code:
<inherits name="com.smartgwt.Drawing" />
Code:
FacetChart simpleChart = new FacetChart();
// Specify facets where ID is set to the key used for this facet in the data above
// and title is the user-visible title you want in the chart
Facet regionFacet = new Facet("region", "Region");
Facet productFacet = new Facet("product", "Product");
simpleChart.setFacets(regionFacet,productFacet);
simpleChart.setData(chartData);
simpleChart.setValueProperty("sales");
simpleChart.setChartType(com.smartgwt.client.types.ChartType.AREA);
simpleChart.setTitle("Sales by Product and Region");
overloadChartCanvas = new Canvas();
overloadChartCanvas.setWidth100();
overloadChartCanvas.setHeight100();
overloadChartCanvas.addChild(simpleChart);//ERROR is produced here
Code:
22:47:25.023 [ERROR] [com.alstom.derms.ui.AlstDR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.smartgwt.client.widgets.Canvas.addChild(Canvas.java)
at com.alstom.derms.ui.client.AlstDR.GetOverloadTabPage(AlstDR.java:704)
at com.alstom.derms.ui.client.AlstDR.GetOverloadTabular(AlstDR.java:626)
at com.alstom.derms.ui.client.AlstDR.createMcAlpineExecutiveSection(AlstDR.java:267)
at com.alstom.derms.ui.client.AlstDR.getSectionStack(AlstDR.java:232)
at com.alstom.derms.ui.client.AlstDR.getVStack(AlstDR.java:219)
at com.alstom.derms.ui.client.AlstDR.getEdgedCanvas(AlstDR.java:173)
at com.alstom.derms.ui.client.AlstDR.onModuleLoad_Old(AlstDR.java:146)
at com.alstom.derms.ui.client.AlstDR$1.run(AlstDR.java:156)
at com.google.gwt.ajaxloader.client.ExceptionHelper.runProtected(ExceptionHelper.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Unknown Source)
Thanks,
Chris
Comment