Formatting numbers

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
MinusMyX
Posts: 1
Joined: Tue Mar 17, 2020 11:23 am
antibot: No, of course not.

Formatting numbers

Post by MinusMyX » Tue Mar 17, 2020 11:25 am

Hi

I am having problems with formatting the tick values, which it seems others have had as well...

Actually I don't have problems using simple patterns, but when I try using % it doesn't multiply the number with 100... I have used similar code in other applets with no problems, so I'm a bit confused... here is the code I use:

((HorizontalNumberAxis)chart.getPlot().getAxis(Plot.HORIZONTAL_AXIS)).getTickLabelFormatter().applyPattern("0.0%");

I have set AutoTickValues to false and the ticks are working ok, it's just the formatting that's giving me a hard time..

I even checked with the get multiplier method, and it was 100... I hope somebody can help... Thanks

Locked