2

The essential of question is declared at the title.

More details: I have the Time series chart, and vertical axis should has labels in currency format like this

$100, 000, 000
$50, 000
...

Now I have the same labels, but without dollar sign and range delimiter.

For horizontal axis I used this approach:

DateAxis axis = (DateAxis) plot.getDomainAxis();
axis.setDateFormatOverride(new SimpleDateFormat("yyyy"));

And it works.

When I try to do similar

ValueAxis valueAxis = (ValueAxis) plot.getRangeAxis();

I can't find any method to format labels.

Please, help me.

Eugene Shmorgun
  • 2,083
  • 12
  • 42
  • 67

1 Answers1

2

The ChartFactory.createTimeSeriesChart() factory supplies a NumberAxis for the range, so you can use setNumberFormatOverride() for with a localized currency formatter, as shown here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • You may have overlooked this tangential [answer](http://stackoverflow.com/a/14443791/230513) to your previous [question](http://stackoverflow.com/q/14442404/230513). – trashgod Mar 06 '13 at 18:17