I've got HighStock running well in my application, but I can't seem to capture PointSelectEvents. I took the following code from another post in this forum:
public class Playground extends Canvas {
public Playground() {
Chart chart = new Chart().setType(Series.Type.LINE);
Series s = chart.createSeries();
s.addPoint(new Point("label 1", 10));
s.addPoint(new Point("label 2", 20));
s.addPoint(new Point("label 3", 30));
SeriesPlotOptions options = new SeriesPlotOptions();
options.setAllowPointSelect(true);
options.setPointSelectEventHandler(new PointSelectEventHandler() {
public boolean onSelect(PointSelectEvent pointSelectEvent) {
SC.say("selected");
return true;
}
});
chart.setSeriesPlotOptions(options);
chart.addSeries(s);
this.addChild(chart);
}
}
When I select a point in the chart, I do not get the alert. Am I doing anything obviously wrong? No errors are reported either on the JS console or in the server log. I'm using SmartGWT 3.0 and Highstock JS v1.2.5
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.
That was exactly the problem. I replaced my highstock.src.js with the one you gave me and everything started to work (including the much more complicated chart I had been working on for a day or two). Thanks for your fast response.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've got HighStock running well in my application, but I can't seem to capture PointSelectEvents. I took the following code from another post in this forum:
When I select a point in the chart, I do not get the alert. Am I doing anything obviously wrong? No errors are reported either on the JS console or in the server log. I'm using SmartGWT 3.0 and Highstock JS v1.2.5
Just tried your example out, and it looks like you're 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
That was exactly the problem. I replaced my highstock.src.js with the one you gave me and everything started to work (including the much more complicated chart I had been working on for a day or two). Thanks for your fast response.