DefaultCategoryDataset & data array

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

DefaultCategoryDataset & data array

Post by Jose Miguel » Tue Oct 08, 2002 5:21 pm

I´m using DefaultCategoryDataset(seriesname,categories,data).
Categories have 4 elements and seriesnames 5 elements.
The data, indexed as data[series][category]. (series=5 and category=4)

But in constructor gives an exception "the number of categories does not match the data".

However If I change data to data[CATEGORY][SERIES] chart run correctly.

Only one problem. If I use getSeriesCount method gives me 4 but should return 5!!!!!

Is a bug?

David Gilbert

Re: DefaultCategoryDataset & data array

Post by David Gilbert » Tue Oct 08, 2002 5:25 pm

How is 'categories' defined? It should be an array of four Objects.

Regards,

DG

Jose Miguel

Re: DefaultCategoryDataset & data array

Post by Jose Miguel » Tue Oct 08, 2002 5:30 pm

String[] categorias=null;

//.....

I init them with String Objects.

Jose Miguel

Re: DefaultCategoryDataset & data array

Post by Jose Miguel » Tue Oct 08, 2002 5:33 pm

Sorry I´ve forgotten.
I have tried whitout categories and series and In XAxis only have 4 series (not 5).

Jose Miguel

Re: DefaultCategoryDataset & data array

Post by Jose Miguel » Wed Oct 09, 2002 9:04 am

Sorry, there was a mine problem. Forgot it. Thanks.

Locked