I have a CombinedRangeXYPlot and I 'd like to use the same label in the legend for 2 series in different subplots.
Currently I get different labels (and so different colors) for the 2 series, despite that they represent the same domain object (machine in my case).
For the pseudo code below gives 6 labels, but I only want 3 (one for each machine):
Code: Select all
OHLCSeriesCollection seriesCollection = new OHLCSeriesCollection();
OHLCSeries machine1Series = new OHLCSeries("Machine 1");
OHLCSeries machine2Series = new OHLCSeries("Machine 2");
OHLCSeries machine3Series = new OHLCSeries("Machine 3");
XYPlot plot = new XYPlot(seriesCollection, ...);
XYSeriesCollection seriesCollectionB = new XYSeriesCollection();
XYSeries machine1SeriesB = new XYSeries("Machine 1");
XYSeries machine2SeriesB = new XYSeries("Machine 2");
XYSeries machine3SeriesB = new XYSeries("Machine 3");
XYPlot plotB = new XYPlot(seriesCollectionB, ...);
CombinedRangeXYPlot combinedPlot = new CombinedRangeXYPlot(...);
combinedPlot.add(plot, 5);
combinedPlot.add(plotB, 1);