series name in horizontal bar chart

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

series name in horizontal bar chart

Post by Ann » Tue Aug 20, 2002 6:56 am

I'm quite confused. Should the number of series names be equal to the length of the sub-arrays I created?

Any advice will be greatly appreciated! Thanks.

David Gilbert

Re: series name in horizontal bar chart

Post by David Gilbert » Thu Aug 22, 2002 11:29 am

The DefaultCategoryDataset fetches data values from a two dimensional array where the first dimension is the series and the second dimension is the category:

return data[series][categoryIndex]

So the number of series names should be equal to the size you use for the first dimension, and the number of categories should be equal to the size you use for the second dimension.

It is confusing...

Regards,

DG.

Locked