I've just updated my JFreeChart from 0.9.3 to 0.9.4. I have been using ChartFactory.createLineChart(...) but the new version isn't displaying the data points on the line. How do I do this?
Thanks
Dan
Changes in version 0.9.4
Re: Changes in version 0.9.4
I don't think anything has changed there, but I could be wrong. Anyway, you need to replace the renderer with one that draws lines *and* shapes:
CategoryPlot plot = myChart.getCategoryPlot();
CategoryItemRenderer renderer = new LineAndShapeRenderer(LineAndShapeRenderer.SHAPES_AND_LINES);
plot.setRenderer(renderer);
If you need tooltips, you'll need to look at one of the other LineAndShapeRenderer constructors.
Regards,
DG
CategoryPlot plot = myChart.getCategoryPlot();
CategoryItemRenderer renderer = new LineAndShapeRenderer(LineAndShapeRenderer.SHAPES_AND_LINES);
plot.setRenderer(renderer);
If you need tooltips, you'll need to look at one of the other LineAndShapeRenderer constructors.
Regards,
DG
Re: Changes in version 0.9.4
Great! I think I may have been mistaken, I seem to recall (now) changing the default for the line chart to only display lines (not shapes as well) to be consistent with the line chart on the XYPlot.
Regards,
DG
Regards,
DG