ChartFactory problem...

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jramsdell
Posts: 1
Joined: Tue May 11, 2004 7:56 am

ChartFactory problem...

Post by jramsdell » Tue May 11, 2004 8:02 am

Hey everyone...im new to using JFreeChart and am having a strange problem regarding the ChartFactory class...basically I am using servlets to display some data as a graph...anyways...when calling ChartFactory to create a chart...it works fine for some charts such as ChartFactory.createTimeSeriesChart or createPieChart...but when calling certain methods such as createXYBarChart and createBarChart, my compiler gives me an error saying it cannot resolve the symbol...well here is the error...

Code: Select all

compile:
    [javac] Compiling 1 source file to C:\slocomb\build
    [javac] C:\slocomb\src\com\slocombwindows\ServletDemo.java:93: cannot resolv
e symbol
    [javac] symbol  : method createXYBarChart (java.lang.String,java.lang.String
,boolean,java.lang.String,org.jfree.data.XYDataset,org.jfree.chart.plot.PlotOrie
ntation,boolean,boolean,boolean)
    [javac] location: class org.jfree.chart.ChartFactory
    [javac]             JFreeChart chart = ChartFactory.createXYBarChart("Comple
te On Time","Date", true,"Value",data,PlotOrientation.VERTICAL,true,false,false)
;
    [javac]                                                ^
    [javac] 1 error
I don't understand it...my classpath is correct or else it would not be able to find the other methods...I even tried recompiling the source, but still no luck. Hope someone can help! Thanks!

Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Post by Stacey » Thu May 13, 2004 1:30 pm

I see it is failing on the PlotOrientation.VERTICAL argument. Is it possible that you have forgotten an import or include statement? Try fully qualifying the argument (org.jfree.chart.plot.PlotOrientation). Just a thought. Good luck.

Locked