Katja Worm - 2014-02-27

Hello,

I use the version 1.6.0 of moxieapps highcharts and would like to link two series of a line chart, so that only the first series appears in the legend. To link the series, the method "linkedTo" is used.
I tried the three different alternatives to link both series (setting the series id, setting the series itself or setting the string ":previous") as described in the documentation. Actually, the series are not linked, both appear in the legend.
Is the method used in a wrong way or did I forget anything? Help would be much appreciated. Thanks very much in advance.

Example code snippet:

Chart chart = new Chart();
chart.setType(Series.Type.LINE);

Series series1 = mChart.createSeries();
series1.setName("TEST1");
series1.setXAxis(0);
series1.setYAxis(0);
series1.addPoint(new Point(10, 1));
series1.addPoint(new Point(12, 3));
chart.addSeries(series1);

Series series2 = chart.createSeries();
series2.setPlotOptions(new SeriesPlotOptions().setLinkedTo(series1.getId()));
series2.setName("TEST2");
series2.setXAxis(0);
series2.setYAxis(0);
series2.addPoint(new Point(10, 10));
series2.addPoint(new Point(12, 12));
chart.addSeries(series2);