mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 02:52:22 +00:00
bug4562 properly set selection state on legend clicking
This commit is contained in:
1 parent
b813bf89fc
commit
15dd55ddc3
1 file changed
+11
-1
+11
-1
@@ -5,6 +5,8 @@ import org.moxieapps.gwt.highcharts.client.Legend;
|
||||
import org.moxieapps.gwt.highcharts.client.Series;
|
||||
import org.moxieapps.gwt.highcharts.client.events.SeriesCheckboxClickEvent;
|
||||
import org.moxieapps.gwt.highcharts.client.events.SeriesCheckboxClickEventHandler;
|
||||
import org.moxieapps.gwt.highcharts.client.events.SeriesLegendItemClickEvent;
|
||||
import org.moxieapps.gwt.highcharts.client.events.SeriesLegendItemClickEventHandler;
|
||||
import org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions;
|
||||
import org.moxieapps.gwt.highcharts.client.plotOptions.SeriesPlotOptions;
|
||||
|
||||
@@ -27,7 +29,15 @@ public class ChartUtil {
|
||||
series.setVisible(seriesCheckboxClickEvent.isChecked());
|
||||
return false; // don't toggle the select state of the series
|
||||
}
|
||||
}));
|
||||
}).setSeriesLegendItemClickEventHandler(new SeriesLegendItemClickEventHandler() {
|
||||
@Override
|
||||
public boolean onClick(SeriesLegendItemClickEvent seriesLegendItemClickEvent) {
|
||||
Series series = chart.getSeries(seriesLegendItemClickEvent.getSeriesId());
|
||||
series.setVisible(!series.isVisible());
|
||||
series.select(series.isVisible());
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user