Hi,
I implemented an IntervalXYDataset for a verticalXYBarchart...
but I do not know how i can set up the legend of the serie... Actually I have "Series 1 " with a red square. I would like to change "Series 1"
*****************************************
IntervalXYDataset categoryData = new SimpleIntervalXYDataset( Time, XValues, YValues);
JFreeChart chart = ChartFactory.createVerticalXYBarChart(YLabel.concat(" "+Title), XLabel, YLabel ,categoryData, true);
XYPlot bPlot = chart.getXYPlot();
VerticalNumberAxis yAxis = (VerticalNumberAxis)bPlot.getVerticalAxis();
yAxis.setRange(Ymin,Ymax);
bPlot.setDomainAxis(new HorizontalNumberAxis(XLabel, new Font("Button_Font", Font.PLAIN , 12), Xmin, Xmax));
*****************************************
Thanks
Mat
How to set up the legend of an IntervalXYDataset...
Re: How to set up the legend of an IntervalXYDataset...
The legend displays the series names, so the only way (at present) to change the text in the legend is to change the names of the series returned by your dataset. Note that SimpleIntervalXYDataset is a quick hack for demo purposes...everything in it is hard coded. You will need to write your own class that implements the IntervalXYDataset interface.
Regards,
DG.
Regards,
DG.