Im trying to implement gauge using gwt-highcharts, I get this exception: com.google.gwt.core.client.JavaScriptException: (TypeError): undefined is not a function
here is my code :
public Chart createChart ()
{
final Chart chart = new Chart ()
.setOption ("chart", getChartType ())
.setChartTitle (new ChartTitle ()
.setText ("speedometre")
)
.setOption ("yAxis", getYaxis ())
.setPane (new Pane ()
.setStartAngle (-150)
.setEndAngle (150)
.setOption ("background", new JSONObject (addBackground ())))
.setOption ("series",getSerie ());
System.out.println (chart.getOptions ().toString ());
return chart;
}
I print chart Options and put it at jsfiddle he is the link : http://jsfiddle.net/SFmft/ It seems working fine.
thx for help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Im trying to implement gauge using gwt-highcharts, I get this exception: com.google.gwt.core.client.JavaScriptException: (TypeError): undefined is not a function
here is my code :
public Chart createChart ()
{
I print chart Options and put it at jsfiddle he is the link : http://jsfiddle.net/SFmft/ It seems working fine.
thx for help
That's not quite a complete code example so I can't tell for sure what's going wrong, but one thing that you likely need to do is:
.setOption("type", getChartType())
[Instead of: .setOption("chart", getChartType()) ]
Here's a basic working gauge example for your reference in case it helps:
Note that you need to make sure you're including the "highcharts-more.js" in your source page if you're going to make use of gauge or polar charts.
Hope that helps,
Thanks for the Replay Shawn.
It helps a lot.