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!
CategoryDataset interface
RE: CategoryDataset interface
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.
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.