Percentage y-ticks for yield-curve

Discussion about JFreeChart related to stockmarket charts.
Locked
va1210
Posts: 3
Joined: Fri Jul 30, 2004 9:43 am

Percentage y-ticks for yield-curve

Post by va1210 » Fri Jul 30, 2004 9:45 am

How can I change the y-axis so that it shows a %-character after the tick-label? I am plotting a yield curve and have yield percentages on Y and maturities on X..

hongping
Posts: 14
Joined: Thu Jul 29, 2004 1:32 am

Post by hongping » Mon Aug 16, 2004 5:25 pm

You could try using

org.jfree.chart.axis.NumberAxis.setNumberFormatOverride

You can pass in a java.text.NumberFormat or java.text.DecimalFormat.

NumberFormat.getPercentInstance will actually give you a format for displaying percentages. Please do look up the javadocs and examples.

Locked