JFreeChart bug: title annotation + inverted axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Gotcha
Posts: 7
Joined: Wed Oct 15, 2008 9:13 am

JFreeChart bug: title annotation + inverted axis

Post by Gotcha » Wed Jan 28, 2009 1:03 pm

Hi,
I've found that a legend made as annotation is shown incorrectly when an axis is inverted. Can be shown in the XYTitleAnnotationDemo1.java. Just insert inversion setting. JFreeChart 1.0.12.

Code: Select all

        DateAxis axis = (DateAxis) plot.getDomainAxis();
        axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
        axis.setInverted(true);

Locked