JFreeChart 0.9.20 and setSecondaryDataset ??

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Micht

JFreeChart 0.9.20 and setSecondaryDataset ??

Post by Micht » Tue Jun 22, 2004 10:38 am

Hi

I've just instaled the new version of JFreeChart but now I've a compilation error.

I use a XYPlot with 2 graphs on it so I use the setSecondaryDataset fonction. But now this function has disapeared :shock: :?

Is it normal? Is-there a solution?
Please help otherwise I'll have to return to previous version :(

++
Micht

Guest

Post by Guest » Tue Jun 22, 2004 12:39 pm

:? OK, I don't what I've done but now it's compiling ... :?

But when I try to make my graphs, I've an error :

Code: Select all

java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at org.jfree.chart.axis.Axis.<clinit>(Axis.java:169)
        at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:1194)
So I don't understand why I need this librairy anymore?
I've done something wrong?


...
Arg, next time, I'll try the new update on another pc ...
++
Micht

DopeForADay
Posts: 32
Joined: Thu Apr 22, 2004 9:15 am

Post by DopeForADay » Tue Jun 22, 2004 1:55 pm

This looks like a Classpath error to me. Do you have log4j in your classpath?

Micht

Post by Micht » Tue Jun 22, 2004 3:24 pm

Well, good point, that was my problem but I have fixed it

By the way, It's still not working and I have now my first error again :(
I've gone back to an old version of JFreeChart and it's working well so ... I'll keep it.

thx
Micht

astenwick
Posts: 13
Joined: Tue Apr 13, 2004 8:03 pm
Location: Seattle

Post by astenwick » Tue Jun 22, 2004 11:25 pm

if you read the release notes for the new release you'll find that the function you are referring to has been removed. Instead use this new one:

XYPlot.setDataset(int index, XYDataset dataset)

If you've already set the first dataset in the constructor, then use index of 1 for your second plot. Datasets are now stored in an array, same with renders.

bdsmith
Posts: 1
Joined: Wed Jul 07, 2004 8:42 pm

Deprecation?

Post by bdsmith » Wed Jul 07, 2004 8:47 pm

How about using deprecation?!? Even if it were only for a few versions of the product, it would be sufficient to allow developers time to plan an upgrade strategy while at the same time allowing them to use the latest version. :x

Locked