Single Series and current

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

Single Series and current

Post by Swamy Ananthanarayan » Mon Oct 29, 2001 10:42 pm

Hello,

I am using the current version of JFreeChart (obtained from CVS) and
I have noticed that it doesn't allow me to create a VerticalBarChart using a single series. It requires you to have atleast two series.
For example, if I define

Number [][] data = new Integer [][] {
{new Integer(5), new Integer(4)}
};

I am assuming this means two categories and 1 series (so it should plot the one series over the two categories). The plot however comes up empty. The legend, x and y axis show up fine but there are no bars. If I add another series, then it plots fine. Is this a bug or is there another way to do this?

Also I am told the current version has capabilities for a target line for a vertical bar chart. Can someone point me in the right direction with respect to this? A function name or a class name I could search for through the source...?

Thank you..

Cheers,
Swamy

David Gilbert

RE: Single Series and current

Post by David Gilbert » Tue Oct 30, 2001 9:04 am

Hi Swamy,

It's a bug. I've been cleaning up the code for the gaps between bars and at the same time implementing some "stacked" bar charts. I've still got to do some debugging on it - sorry!

The target line stuff is actually in the XYPlot class, not the bar charts...but it shouldn't be too difficult to add something similar to the VerticalBarPlot class.
Regards,

DG.

Locked