CategoryDataset interface

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

CategoryDataset interface

Post by Keith » Wed Jan 16, 2002 6:33 pm

Hi,

I'm trying to write a class which I can use as a Dataset to pass to a JFreechart Object for a vertical bar chart. The DefaultCategoryDataset takes a 2 dimensional array, is that correct? I would like to only pass in a one dimensional array or even a Vector. Do I implement the CategoryDataset interface to do this? If so, where do I find the documentation to say which methods I must implement?

many thanks!

David Gilbert

RE: CategoryDataset interface

Post by David Gilbert » Wed Jan 16, 2002 9:40 pm

Hi Keith,

Yes, you implement the CategoryDataset interface - that is the only thing that JFreeChart knows about when it comes to bar charts. The DefaultCategoryDataset is one implementation of the interface (and it's not the world's best implementation either!).

The CategoryDataset interface is in the JCommon Class Library. Download source from:

http://www.jrefinery.com/jcommon

Good luck...

DG.

Locked