saleyn/ZedGraph

Bug in Y2Axis Scaling in Scale.cs

Closed this issue · 6 comments

Fix is:

  // If this is a Y axis, and the main Y axis is valid, use it for defaults
  if (_ownerAxis is IYAxis)
  {
    Scale scale;
    if (pane.YAxis.Scale.Valid && _ownerAxis is YAxis) // NGE12162020 Added  && _ownerAxis is YAxis
        scale = pane.YAxis.Scale;
    else if (pane.Y2Axis.Scale.Valid && _ownerAxis is Y2Axis) // NGE12162020 Added  && _ownerAxis is Y2Axis
        scale = pane.Y2Axis.Scale;
    else
      return;

    if (ReferenceEquals(this, scale))
      return;

    _rangeMin = scale._rangeMin;
    _rangeMax = scale._rangeMax;
  }

Could you submit this as a pull request?

Did you receive the pull request?

Added pull request

Thank you! Merged.