8.0 -> 9.1

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

8.0 -> 9.1

Post by Krazey » Mon Jun 17, 2002 9:55 am

Hi,

Lot of my samples code have wrong with the new Version of JFC.

Exemple : Transforming a chart with logarithmic scale.

----Plot p=chart.getPlot();
p.setVerticalAxis(new VerticalLogarithmicAxis());
p.sertCchat(chart);
---
in 9.1, the both method Plot.setVerticalAxis and Plot.setChart are missing.
Any idee ????


Thx for all !

David Gilbert

Re: 8.0 -> 9.1

Post by David Gilbert » Mon Jun 17, 2002 10:46 am

The axes are now defined in subclasses of Plot if they are required (PiePlot doesn't need them). So if you have an XYPlot you will need to use this code:

XYPlot plot = myChart.getXYPlot();
plot.setRangeAxis(new VerticalLogarithmicAxis());

If you have a category plot:

CategoryPlot plot = myChart.getCategoryPlot();
plot.setRangeAxis(new VerticalLogarithmicAxis());

The reference that the plot used to refer back to its chart is redundant, so I removed it.

Regards,

DG.

P.S. When the code reaches version 1.0.0, I'll stop changing the API.

Krazey

Re: 8.0 -> 9.1

Post by Krazey » Tue Jun 18, 2002 9:46 am

Thanks for all :)

Locked