Scaling factor

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

Scaling factor

Post by Vijaya Natarajan » Wed Feb 14, 2001 2:41 am

Hi,
We are using JFreeChart for our file transfer GUI application.
It works pretty good. We were showing file transfer by %
before. We show the % values in y-axis and a vertical bar
chart for file names etc.
Recently, our requirements are changed, we think it will
make sense if we show file transfer by file size. If we want
to show filesizes in the y-axis and vertical bars for filenames
as before.
The problem that we are facing is, the file sizes are so
weird, such as the smallest file size is 1 MB and the largest
file size is 2GB. I would like to show only 20 tick values
in the y-axis at a single time. The mininum value for the
y-axis is 0 KBs. and the maximum value is
2000000 KBs. (or 2GBs). To calculate unit, I divided
the maximum file size which is 2000000 KBs (or 2GBs) by
20 which is the maximum ticks that I want to show in the
graph. Each unit is 2000000/20=>100000 KBs.
The y-axis looks like {0KBs, 100000 KBs, 200000 KBs ...
2000000 KBS}.
Now, my smallest file is only of size 1 MB or (1000 KBS).
which is kind of very close to the 0 KBS. in the y-axis.
Which is kind of very wierd. Can anybody please suggest
me any better idea.
Thanks.
Sincerely,
Viji

David Gilbert

RE: Scaling factor

Post by David Gilbert » Sun Feb 18, 2001 7:43 am

Hi Viji,

It sounds like you need a logarithmic axis. Unfortunately this hasn't been implemented in JFreeChart yet, but it has been requested a number of times (SourceForge task id = 22709). It will be fairly high in the priority list when I find some more time for developing JFreeChart.

Regards,

DG.

Locked