LineAndShapeRenderer

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

LineAndShapeRenderer

Post by Stacey » Fri Sep 13, 2002 7:34 pm

The lineAndShapeRenderer does not allow for a series to have null values for categories. It works as: if a series' value's previous category is null, then the line is not drawn.
For example, I have a series of 60 categories and a second series that only has 15 of those categories in common (every 4th one). The second series never draws because each time I do have a value for (every 4th) category, that values previous category is null and therefore no line is drawn.

Please advise if I am using the wrong type of renderer for this sort of situation. Thanks for your help.
Stacey

David Gilbert

Re: LineAndShapeRenderer

Post by David Gilbert » Mon Sep 16, 2002 7:10 am

The current behaviour is intended to make it clear that there is missing data. When there is a lot of missing data, you will need to display shapes as well as lines...otherwise you won't see anything.

Alternatively, you could create a custom renderer that finds the previous non-null entry and draws a line between that and the current data point.

Regards,

DG.

Locked