Menu

#125 getSecondaryRangeAxis.setScaleToPrimary() would be handy

open
nobody
General (246)
6
2003-07-07
2003-05-29
Roger Hand
No

In another graphing product (which I'm in the process of
abandoning for JFreeChart) there was a handy feature
that would be nice to have in JFreeChart. It allowed you
to create a right Y-axis which was a scaled version of
the left Y-axis.

This is handy if, for instance, you want a graph that
shows the "MB Used" of a disk on the left axis, and
the "% Used" on the right axis.

I've done this in JFreeChart but it's a several step
process involving finding the max and min of the
RangeAxis, then calculating the appropriate max and
min of the SecondaryRangeAxis, and creating it. Ideally
I'd like to be able to do something like:

VerticalNumberAxis yAxisRight = new
VerticalNumberAxis("Percent of Max");
yAxisRight.setScale(100 / hdSize);

Where the numbers along the Secondary axis would be
equal to the Primary axis * the scaling factor.

Discussion

  • David Gilbert

    David Gilbert - 2003-07-07
    • priority: 5 --> 6
     
  • David Gilbert

    David Gilbert - 2003-07-07

    Logged In: YES
    user_id=112975

    Thanks for the request. I have some work scheduled for the
    axis classes next week, and while I'm going through the code
    I'll keep this requirement in mind.

    Regards,

    Dave Gilbert
    JFreeChart Project Leader

     

Log in to post a comment.