Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1052
Chart with multiple Y axis - the grid lines doesn't overlap
posted

Hello,

         When I have 2 Y axis, the gridlines for both axis doesn't overlap, so it is showing 2 grids. Please see the attached sample and tell me if I do something wrong.

Thanks

SampleChartMultipleAxis.rar
Parents
  • 30692
    Suggested Answer
    Offline posted

    If you have multiple y axes with disimilar ranges then their gridline will not align, and this is by design. Each y axis is using the optimal breakdown of its range into subranges. Here are some of the various options you can employ if the display is not as you desire:

    1. Color the gridlines and labels for the secondary axis a different color (MajorStroke) so that its clear which axis each set of gridlines are for.
    2. Alternatively you can hide the gridlines for the secondary y axis by setting MajorStroke to null or Transparent on the secondary axis.
    3. Lastly, if you manually control the MinimumValue and MaximumValue of each y axis, you can ensure that each seperate y axis displays the same number of gridlines at the same interval, such that the gridlines align with each other perfectly in the plot area.

    It would be possible to add the 3rd option as a native feature of the chart, but it is not a native option currently. If that is the most appealing scenario you may want to make a feature request for this behavior. In the meantime, you will need to control the minimumValue and MaximumValue manually to achieve the described effect.

    Hope this helps!

    -Graham

Reply Children
No Data