junaidp
junaidp

Reputation: 11201

GWT: HighChart error '$wnd.Highcharts' is null or not an object

I am trying to run a simple High chart in my GWT Application but getting this error

         '$wnd.Highcharts' is null or not an object

my OnModule

     public void onModuleLoad() {
      RootPanel.get().add(createChart());  
}  

public Chart createChart() {  

    Chart chart = new Chart()
       .setType(Series.Type.SPLINE)
       .setChartTitleText("Lawn Tunnels")
       .setMarginRight(10);
    Series series = chart.createSeries()
       .setName("Moles per Yard")
       .setPoints(new Number[] { 163, 203, 276, 408, 547, 729, 628 });
    chart.addSeries(series);
    return chart;  
}  

}

my xml

     <!-- Inherit the core Web Toolkit stuff.                        -->
    <inherits name='com.google.gwt.user.User'/>
   <inherits name="org.moxieapps.gwt.highcharts.Highcharts"/>

my HTML

       </script>
        <script type="text/javascript" src="js/highcharts.js"></script>
    <script type="text/javascript" src="js/themes/dark-blue.js"></script>
 <script type="text/javascript" src="js/modules/exporting.js"></script>

</script>

included this jar file in my classpath

                 org.moxieapps.gwt.highcharts-1.1.3.jar

Any suggestion

Thanks

Upvotes: 0

Views: 824

Answers (2)

Naveen
Naveen

Reputation: 830

I guess you already know the answer for this.. Please include Jquery.js befor highcharts.js

Upvotes: 1

Abhijith
Abhijith

Reputation: 2632

You need to use another javascript library .

"Highcharts needs only two JS files to run: The highcharts.js core and either the jQuery, MooTools or Prototype framework"

Upvotes: 0

Related Questions