I'm working with SmartGWT 2.5 and GWT Highcharts 1.4.0 and have trouble to implement any event handler on a Chart. Through putting breakpoints to BaseChart.chartEventCallback(nativeEvent, eventType) and BaseChart.seriesEventCallback(nativeEvent, eventType) I could locate the problem that far, that the eventType which is passed is an empty string. Perhaps you could imagine where a possible mistake could result in this error/problem? I used one chart from the showcase to eliminate errors from that point, added a SeriesClickEventHandler to SeriesPlotOptions and a ClickEventHandler to the chart, and put it into a plain/empty module.
chart=newChart().setType(Series.Type.BAR).setChartTitleText("Historic World Population by Region").setChartSubtitleText("Source: Wikipedia.org").setBarPlotOptions(newBarPlotOptions().setDataLabels(newDataLabels().setEnabled(true))).setLegend(newLegend().setLayout(Legend.Layout.VERTICAL).setAlign(Legend.Align.RIGHT).setVerticalAlign(Legend.VerticalAlign.TOP).setX(-100).setY(100).setFloating(true).setBorderWidth(1).setBackgroundColor("#FFFFFF").setShadow(true)).setCredits(newCredits().setEnabled(false)).setToolTip(newToolTip().setFormatter(newToolTipFormatter(){publicStringformat(finalToolTipDatatoolTipData){returntoolTipData.getSeriesName()+": "+toolTipData.getYAsLong()+" million";}}));chart.getXAxis().setCategories("Africa","America","Asia","Europe","Oceania");chart.getYAxis().setAxisTitle(newAxisTitle().setText("Population (millions)").setAlign(AxisTitle.Align.HIGH));chart.addSeries(chart.createSeries().setName("Year 1800").setPoints(newNumber[]{107,31,635,203,2}));chart.addSeries(chart.createSeries().setName("Year 1900").setPoints(newNumber[]{133,156,947,408,6}));chart.addSeries(chart.createSeries().setName("Year 2008").setPoints(newNumber[]{973,914,4054,732,34}));// previous lines from the showcasechart.setClickEventHandler(newChartClickEventHandler(){@OverridepublicbooleanonClick(finalChartClickEventchartClickEvent){returnfalse;}});chart.setSeriesPlotOptions(newSeriesPlotOptions().setSeriesClickEventHandler(newSeriesClickEventHandler(){@OverridepublicbooleanonClick(finalSeriesClickEventseriesClickEvent){returnfalse;}}));
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A work around fix to the highstock JS file is mentioned in that thread (or you can just give the attached JS file a try if you prefer, which has that patch applied.)
Per the following thread, the Highslide guys are aware of this issue and have implemented a fix which should be included in an upcoming release of Highcharts and Highstock.
I'm working with SmartGWT 2.5 and GWT Highcharts 1.4.0 and have trouble to implement any event handler on a Chart. Through putting breakpoints to BaseChart.chartEventCallback(nativeEvent, eventType) and BaseChart.seriesEventCallback(nativeEvent, eventType) I could locate the problem that far, that the eventType which is passed is an empty string. Perhaps you could imagine where a possible mistake could result in this error/problem? I used one chart from the showcase to eliminate errors from that point, added a SeriesClickEventHandler to SeriesPlotOptions and a ClickEventHandler to the chart, and put it into a plain/empty module.
Link to the diagramme within the showcase: http://www.moxiegroup.com/moxieapps/gwt-highcharts/showcase/#bar-basic
This is the code to generate the chart:
You're likely being bit by the same SmartClient/Highcharts compatibility issue described in this thread:
https://sourceforge.net/p/gwt-highcharts/discussion/general/thread/ef263126/
A work around fix to the highstock JS file is mentioned in that thread (or you can just give the attached JS file a try if you prefer, which has that patch applied.)
Per the following thread, the Highslide guys are aware of this issue and have implemented a fix which should be included in an upcoming release of Highcharts and Highstock.
http://highslide.com/forum/viewtopic.php?f=9&t=24201&p=93648