To display a single data point on a line chart

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

To display a single data point on a line chart

Post by Madhu Mathew » Fri Jan 11, 2002 10:07 pm

Hi,

I create line charts (x-y plot) based on data retrieved from a database. These line charts are basically trends for a month. My problem is that at the first of a month , when there is only one data point , the line chart appears blank.

Is there a way to bolden a data point , so that at least one boldened point is visible on the graph.

While browsing the forum I came across a reference to task id = 26480 on the JFreeChart tasklist on SourceForge . I was unable to find the status or any further information

Any help or suggestion will be greatly greatly appreciated

Thanks
Madhu

David Gilbert

RE: To display a single data point on a line chart

Post by David Gilbert » Mon Jan 14, 2002 8:54 am

Hi Madhu,

You could change the type of the StandardXYItemRenderer from LINES to SHAPES_AND_LINES. That will draw small shapes at each data point, as well as the lines. There's still some work to do on the shapes though...

Otherwise you'd need to make some modification in the drawItem(...) method in the StandardXYItemRenderer class. I think I need to change it anyway, as technically the XYDataset could supply the odd null value, and it won't handle this at present. While I'm doing that, I'll look at how to handle lone points...

Regards,

DG.

Locked