Yeah, that looks like the "highcharts.js" file hasn't been included in your main page. Note that both highcharts.js (or highstock.js) as well as some DOM wrapper (e.g. jquery) are required to be included in your page in order for Highcharts (and GWT Highcharts) to work. More details here:
Looks like you haven't included the "highcharts.js" file in your application. Here's a simple sample of how your HTML file should roughly look:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>TestGWT Application</title></head><scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><scripttype="text/javascript"src="js/highcharts.js"></script><scripttype="text/javascript"language="javascript"src="org.moxieapps.gwt.highcharts.test.GWTTest/org.moxieapps.gwt.highcharts.test.GWTTest.nocache.js"></script><body><divid="container"style="height: 500px"></div></body></html>
But, in order for that to work you'll need to have first unzipped the Highcharts library distribution into your application's "/js" folder. You can get the Highcharts library from either of the following locations:
i add the Highcharts library to the "WAR" folder , and i now did not have the message of " .Highcharts is undefined " , but now i have an other message Error that is :
om.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
Any assistance would be greatly appreciated!
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Glad you're up and running! In case others run across this thread, note that we use SmartGWT 2.4 and GWT Highcharts together here with success. But, I'm looking forward to giving SmartGWT 3.0 a try.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just want to add that I also ran into this error when hovering the mouse over a series. Seems like the error is coming from the tooltipFormatter function. Works fine with highcharts 2.1.9 but getting the error with v2.2.0 and later. The function used to take in a boolean as a parameter, but now takes a pointFormat. Tested with both gwt-highcharts 1.1.3 and 1.4.0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello ,
i tried to add a chart to TabSet , but i get this error :
com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.Highcharts is undefined
please some one have an idea how to fix this ??
thanks
That sounds pretty fundamental. Are you sure you've included the necessary JS libs in your HTML page and added the modules to your .gwt.xml?
yeah i add the JS libs in Html and also in XML file ...but i don't know why it's not working
Yeah, that looks like the "highcharts.js" file hasn't been included in your main page. Note that both highcharts.js (or highstock.js) as well as some DOM wrapper (e.g. jquery) are required to be included in your page in order for Highcharts (and GWT Highcharts) to work. More details here:
http://www.moxiegroup.com/moxieapps/gwt-highcharts/userguide.jsp#installation
Keep us posted on how it goes.
hello ,
i add the "script" to my Html page , but i still have the same problem.
this is my code of HTML file :
And my code of onModuleLoad
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.tab.TabSet;
import com.smartgwt.client.widgets.tab.Tab;
import com.project.com.client.ui.DrawCharts;
public class MonitoringApplication implements EntryPoint {
}
Last edit: Adil 2012-07-20
and as Warning i get this :
[WARN] 404 - GET /js/highcharts.js (127.0.0.1) 1402 bytes
Request headers
Host: 127.0.0.1:8888
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: /
Referer: http://127.0.0.1:8888/MonitoringApplication.html?gwt.codesvr=127.0.0.1:9997
Accept-Encoding: gzip,deflate,sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1402
Looks like you haven't included the "highcharts.js" file in your application. Here's a simple sample of how your HTML file should roughly look:
But, in order for that to work you'll need to have first unzipped the Highcharts library distribution into your application's "/js" folder. You can get the Highcharts library from either of the following locations:
http://www.moxiegroup.com/moxieapps/gwt-highcharts/download.jsp
http://www.highcharts.com/download
thanks you Shawn , i did all that you told me , but it's not working ..i'm disappointed
best regards
i add the Highcharts library to the "WAR" folder , and i now did not have the message of " .Highcharts is undefined " , but now i have an other message Error that is :
om.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'create' of undefined
Any assistance would be greatly appreciated!
thanks
Ok , it's working now i was working with SmartGWT 2.4 and when i move to SmartGWT 3.0 it works very well .
thanks god
Glad you're up and running! In case others run across this thread, note that we use SmartGWT 2.4 and GWT Highcharts together here with success. But, I'm looking forward to giving SmartGWT 3.0 a try.
thanks Shawn for your reply . i still have a small problem with the chart that i drew .
when I pass the mouse over the chart that I draw, it gives me this Error :
Uncaught JavaScript exception [Uncaught TypeError: Cannot read property 'undefined' of undefined] in http://127.0.0.1:8888/js/highcharts.js, line 183
please , do you have an idea wy i'm getting this strange error !!!
is there a forum for SmartGWT 3.0 ?
thanks
best regards
Just want to add that I also ran into this error when hovering the mouse over a series. Seems like the error is coming from the tooltipFormatter function. Works fine with highcharts 2.1.9 but getting the error with v2.2.0 and later. The function used to take in a boolean as a parameter, but now takes a pointFormat. Tested with both gwt-highcharts 1.1.3 and 1.4.0.