Announcement

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

    Charting Module

    I am using SmartGWT version v11.1p_2018-02-21/PowerEdition Deployment. I am trying to explore the charting capabilities. I have the following inherits statements in my gwt.xml file

    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
    <inherits name="com.smartgwtee.SmartGwtEENoScriptNoTheme"/>
    <inherits name="com.smartgwtpower.tools.Tools"/>
    <inherits name="com.smartgwt.RealtimeMessagingNoScript"/>
    <inherits name="com.smartgwt.PluginBridgesWidgets"/>
    <inherits name="com.smartgwt.Drawing"/>
    <inherits name="com.smartgwt.Charts"/>

    I added the last three inherits for charting.

    When I run from Eclipse Kepler I get an exception when I try to instantiate a Facet instance. It says "The Charts module must be loaded to use FacetChart. See the LoadingOptionalModules overview in the "docs" package of JavaDoc for instructions."

    The JavaDoc instructions were how I knew to inherit PluginBridgesWidgets, Drawing and Charts.

    When I build a war and run inside Tomcat it has no problems. I only experience the issue in Eclipse.

    Can someone tell me what I'm doing wrong?

    Thanks,
    Ken

    #2
    It looks like you are using a NoScript variation of the core com.smartgwtee inherit, so you must be manually placing <script> tags in your host .html file for the core libraries. You now need additional script tags for ISC_Drawing.js and ISC_Charts.js.

    Comment


      #3
      That worked. Thanks!

      Comment


        #4
        I have a few more charting questions:
        • Is it possible to swap facets programmatically?
        • In column and bar charts, is it possible to display the chart's values on the chart itself?
        • Are tooltips possible for values in a chart?
        • Is it possible to select a value on a chart by clicking on it?
        • Are there SmartGWT chart examples? I didn't see any on the showcase page.
        Thanks,
        Ken

        Comment


          #5
          See the EE Showcase, there are many examples.

          Best regards
          Blama

          Comment


            #6
            Thanks Blama! I was able to get FacetChart.addValueClickHandler() to work. However, I am also calling setShowDataPoints(true), setShowDataValues(true) and setShowValueOnHover(true) and I don't see anything when the charts are drawn or when I hover over a value.

            Am I missing something? Also, is there a way to swap the facets from code? I couldn't figure out a way that worked.

            Thanks,
            Ken

            Comment

            Working...
            X