CategoryMarker class missing from build path

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
socrateone
Posts: 13
Joined: Fri Apr 28, 2006 2:53 pm

CategoryMarker class missing from build path

Post by socrateone » Mon May 01, 2006 8:54 pm

I'm having trouble adding a CategoryMarker to a bar chart.
This was my code:

Code: Select all

JFreeChart chart = ChartFactory.createBarChart(			                  
                        "Chart Title", 
                        null, 	
                        null, 
                        catDataSet, 
                        PlotOrientation.VERTICAL, 
                        false,
                        false,
                        false 
		);

Marker averageMarker = new CategoryMarker(100);
averageMarker.setLabel("Average");
plot.addDomainMarker(averageMarker); 


I get a compile-time error:
cannot resolve symbol: CategoryMarker

I checked my imports, and I'm importing the entire plot package:

Code: Select all

import org.jfree.chart.plot.*;
But it still can't find it.
I decided to try and import the import the class explicitly:

Code: Select all

import org.jfree.chart.plot.CategoryMarker
and I get another "cannot resolve symbol" error when I try to compile. This time, it's triggered on the import statement!

I unzipped the jar file in my lib directory, and found that the class was, in fact, there.

Does anybody have any idea what's going on? Why can't I import this file?

socrateone
Posts: 13
Joined: Fri Apr 28, 2006 2:53 pm

Wrong library

Post by socrateone » Mon May 01, 2006 9:28 pm

I was including version 0.9.2, which doesn't have the class, but referencing the javadocs for 1.0.1.
I had deployed the demo application, which seams to have been made with 0.9.2. When I unzipped the lib file, I was unzipping the file the I had in my /lib directory, which was the right one. However, I was building against the old version, hence the compile time errors.

Locked