DefaultCategoryDataset to set labels

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

DefaultCategoryDataset to set labels

Post by Mike Isaacs » Mon Feb 11, 2002 1:31 pm

Hello,

I'm trying to use the third contructor:
DefaultCategoryDataset(seriesNames,categories,data) to set the names of Category Labels.

I use a String[] for the series naming, and that works fine.
I use a Double[][] for the data, and this is also fine.

The problem is with the Object[] used to set the Category labels. I am constructing a String[] with the labels for the Categories.

However, at runtime I always get an IllegalArgumentException: DefaultCategoryDataset.getValue(...): unknown category.

Can anybody help with this?

Thanks,

Mike

David Gilbert

Re: DefaultCategoryDataset to set labels

Post by David Gilbert » Mon Feb 11, 2002 1:48 pm

Hi Mike,

If you are using 0.7.1 then you have come across a bug that is fixed in 0.7.2. If you are using 0.7.2 then I didn't do a very good job of fixing the bug...

DG

Mike Isaacs

Re: DefaultCategoryDataset to set labels

Post by Mike Isaacs » Mon Feb 11, 2002 2:17 pm

Hi,

I was using 0.7.1. Just downloaded 0.7.2 - and the problem is fixed!

Thanks,

Mike

Locked