Changes in version 0.9.4

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Dan

Changes in version 0.9.4

Post by Dan » Mon Nov 04, 2002 1:06 pm

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

Dave Gilbert

Re: Changes in version 0.9.4

Post by Dave Gilbert » Tue Nov 05, 2002 10:17 am

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

Dan

Re: Changes in version 0.9.4

Post by Dan » Wed Nov 06, 2002 10:58 am

Thanks DG, I'm happy now.

Dave Gilbert

Re: Changes in version 0.9.4

Post by Dave Gilbert » Wed Nov 06, 2002 6:30 pm

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

Locked