Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Facet Chart is empty

    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

    Code:
    <inherits name="com.smartgwt.Drawing" />
    Facet Chart Code:
    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
    Error Message:
    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)
    Any help or suggestions is appreciated.

    Thanks,
    Chris

    #2
    Most likely this means you did not run a GWT compile after changing .gwt.xml. If that's not it, see the instructions in the FAQ for how to report errors.

    Comment


      #3
      I've run the GWT Compile several times with no change. I get the same result if the code is run in Chrome & IE through eclipse or if I run it on its own through Tomcat.

      Versions
      Smart GWT 3.0 (LPGL)
      GWT 2.4
      Windows 7

      Any thoughts on what I'm doing wrong?

      This is what shows up in the developer log
      Code:
      16:01:26.997:INFO:Log:initialized
      16:01:27.395:WARN:Log:New Class ID: 'EditPane' collides with ID of existing Class object '[DataSource ID:EditPane]'.  Existing object will be replaced.
      This conflict would be avoided by disabling ISC Simple Names mode.  See documentation for further information.
      16:01:27.916:INFO:Log:isc.Page is loaded

      Comment


        #4
        Oh, you're using the LGPL version, which does not include charting (see editions page). You should see this reported in your Developer Console.

        Comment

        Working...
        X