Changing axis scale

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Thomas Barry

Changing axis scale

Post by Thomas Barry » Mon Jun 24, 2002 10:00 pm

New to JFreeChart, so I'm sorry if this a stupid question.

I'm creating a TimeSeries chart, which graphs bytes (y axis) over time (x axis). My values are in bytes, but I'd like the y axis to be displayed in MBytes. I think the solution may involved the TickUnit class, but haven't got that figured out yet...

Thanks,
Tom Barry

David Gilbert

Re: Changing axis scale

Post by David Gilbert » Tue Jun 25, 2002 10:07 am

Hi Tom,

The NumberTickUnit class just lets you apply a format to the numbers displayed on the axis (using a NumberFormat instance). It won't convert bytes to megabytes...to do that you'll have to modify the data in your dataset.

Regards,

DG.

Locked