|
y axis scale |
Posted by Dileep on Oct-20-2014 22:00 |
|
Hi There,
We are using java XYChart.
In that we use multiple y axis lines.
And the problem is its not displaying same scale, even though same max value being used
for all y axis lines.
Please see the image attached.
Could you please tell how can we make the chart to show same scale for all two y axis
lines?
|
Re: y axis scale |
Posted by Peter Kwan on Oct-21-2014 02:38 |
|
Hi Dileep,
The axis scale depends on many factors. It depends on both the minimum and maximum
data values (not just the maximum values).
For your case, the minimum and maximum values for the line is the same value. For the
bars, if there are some invisible 0 value bars, it would affect the bar axis scale to make the
scale different from the line axis scale. Note that for stacked bar, if your bars are of
Chart.NoValue, after stacked, the stacked bar will be of 0 value, so the axis will scale as if
there are 0 value bars.
By default, the scale can also depends on the font rotation angle. It is because the font
angle affects how many labels that can be automatically put on the axis. You can use
Axis.setTickDensity to manually set the label density to be used on the two axes to the
same value.
To ensure the two y-axis are of the same scale, you may use XYChat.syncYAxis. For
example:
c.syncYAxis();
Hope this can help.
Regards
Peter Kwan |
Re: y axis scale |
Posted by Dileep on Oct-21-2014 18:57 |
|
Thank You |
|