Announcement

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

    Can't get Charts working for the first time, Exception:The Charts module must be loaded to use FacetChart

    I'm trying to incorporate Charts into our Smartgwt project for the first time, but I get Exception:The Charts module must be loaded to use FacetChart.

    I'm using SmartGWT v12.0p_2019-04-19/PowerEdition Deployment (built 2019-04-19) with Chrome Version 79.0.3945.117 (Official Build) (64-bit)

    I believe I have followed the instructions correctly, e.g. I have added the following to my gwt.xml file:
    <inherits name="com.smartgwt.Drawing"/>
    <inherits name="com.smartgwt.Charts"/>

    Via Chrome's developer tools, I can see that scripts ISC_Charts.js and ISC_Drawing.js are included when gwt.xml has the above inherits, but aren't present when it doesn't. So I'm puzzled, because the Charts module does appear to be loaded, but Smartgwt doesn't think it is.

    Can you suggest anything I might have missed? Please ask if you need more information.

    Thanks.

    #2
    Depending on how you've configured loading of the SmartClient runtime files (ISC_*.js) in general (see Debugging overview), you may have ended up loading the Drawing and Charts modules before loading other modules, which will not work and will result in an obvious JS error.

    Comment


      #3
      I did have my configuration in the wrong order, I somehow misinterpreted the instructions in Loading Optional Modules. My gwt.xml file is now as follows and the project recognises that the Charts module exists:

      <inherits name="com.google.gwt.user.User"/>
      <inherits name="com.smartgwt.tools.SmartGwtTools"/>
      <inherits name="com.smartgwtee.SmartGwtEENoTheme"/>
      <inherits name="com.smartgwt.Drawing"/>
      <inherits name="com.smartgwt.Charts"/>
      <inherits name="com.smartgwtee.tools.Tools"/>
      <entry-point class="com.foo.Bar"/>

      Comment

      Working...
      X