% in Y axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

% in Y axis

Post by sumanseshadri » Wed Mar 29, 2006 2:22 am

Hi,
I wanted to display % along my Y axis values. such as 10%, 20% etc..

So, I used

Code: Select all

final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        if (axisType!=null && axisType.equals("%"))
          rangeAxis.setNumberFormatOverride(NumberFormat.getPercentInstance());
After doing this, my percentages are displayed..but wrongly..Instead of 10%, it gives 1000% and instead of 100% , 10,000% .

I dont know why thats happening..

[However, getCurrencyInstance() is working fine. ]

Any thoughts ..

Thanks
Suman

Locked