Hi
I am currently having trouble creating a CategoryDataset:
this is part of my code:
...
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultCategoryDataset;
...
JFreeChart chart = ChartFactory.createLineChart("Vis","Experiment","Expression Level",dataset,PlotOrientation.VERTICAL,false,true,false);
however, in JBuilder, it shows an error:
createLineChart(java.lang.String,java.lang.String,java.lang,String,org.jfree.data.CategoryDataset,org.jfree.chart.plot.PlotOrientation,boolean,boolean)in org.jfree.chart.ChartFactory cannot be applied to (java.lang.String,java.lang.String,java.lang.String,org.jfree.data.category.CategoryDataset,org.free.chart.plot.PlotOrientation,boolean,boolean,boolean)
I check the API: there is even not a class called: org.jfree.data.CategoryDataset
And I do not import this class and definitely import class CategoryDataset in package org.jfree.data.category. My question is: how come it is? How can I fix this problem?
btw, I use Jfreechart 1.0.4 and Jcommon 1.0.8
Greatly appreciate your any response!
A problem for creating a CategoryDataset
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Once upon a time, the CategoryDataset interface did exist in the org.jfree.data.* package. I would double check that you don't have an old version of JFreeChart lurking on your classpath somewhere.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

