A problem for creating a CategoryDataset

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
xtsu
Posts: 4
Joined: Sun Aug 12, 2007 4:09 am

A problem for creating a CategoryDataset

Post by xtsu » Sun Aug 12, 2007 4:20 am

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!

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Aug 13, 2007 11:31 am

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

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked