diff --git a/External/OxyPlot.WindowsForms.dll b/External/OxyPlot.WindowsForms.dll index 3580316..4d9a6dc 100644 Binary files a/External/OxyPlot.WindowsForms.dll and b/External/OxyPlot.WindowsForms.dll differ diff --git a/External/OxyPlot.dll b/External/OxyPlot.dll index eacb498..db6f80c 100644 Binary files a/External/OxyPlot.dll and b/External/OxyPlot.dll differ diff --git a/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs b/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs index a3fc41c..2cea7ca 100644 --- a/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs +++ b/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs @@ -302,37 +302,53 @@ namespace OxyPlot { rc.DrawRectangleAsPolygon(this.PlotArea, null, this.PlotAreaBorderColor, this.PlotAreaBorderThickness); - foreach (var axis in this.Axes) { - var actualMinimum = axis.Transform(axis.ActualMinimum); - var actualMaximum = axis.Transform(axis.ActualMaximum); + foreach (var axis in this.Axes) + { + if (!axis.IsAxisVisible) + continue; - if (!axis.IsAxisVisible) - continue; + if (axis.IsHorizontal()) + { + var start = this.PlotArea.Left + + this.PlotArea.Width * axis.StartPosition; + if (axis.StartPosition < 1 && axis.StartPosition > 0) + rc.DrawLine(new[] { + new ScreenPoint(start, this.PlotArea.Top), + new ScreenPoint(start, this.PlotArea.Bottom) }, + this.PlotAreaBorderColor, this.PlotAreaBorderThickness, + null, OxyPenLineJoin.Miter, true); - if (axis.IsHorizontal()) { - rc.DrawLine(new[] { - new ScreenPoint(actualMinimum, this.PlotArea.Top), - new ScreenPoint(actualMinimum, this.PlotArea.Bottom) }, - this.PlotAreaBorderColor, this.PlotAreaBorderThickness, - null, OxyPenLineJoin.Miter, true); - rc.DrawLine(new[] { - new ScreenPoint(actualMaximum, this.PlotArea.Top), - new ScreenPoint(actualMaximum, this.PlotArea.Bottom) }, - this.PlotAreaBorderColor, this.PlotAreaBorderThickness, - null, OxyPenLineJoin.Miter, true); - } else { - rc.DrawLine(new[] { - new ScreenPoint(this.PlotArea.Left, actualMinimum), - new ScreenPoint(this.PlotArea.Right, actualMinimum) }, - this.PlotAreaBorderColor, this.PlotAreaBorderThickness, - null, OxyPenLineJoin.Miter, true); - rc.DrawLine(new[] { - new ScreenPoint(this.PlotArea.Left, actualMinimum), - new ScreenPoint(this.PlotArea.Right, actualMinimum) }, - this.PlotAreaBorderColor, this.PlotAreaBorderThickness, - null, OxyPenLineJoin.Miter, true); - } + var end = this.PlotArea.Left + + this.PlotArea.Width * axis.EndPosition; + if (axis.EndPosition < 1 && axis.EndPosition > 0) + rc.DrawLine(new[] { + new ScreenPoint(end, this.PlotArea.Top), + new ScreenPoint(end, this.PlotArea.Bottom) }, + this.PlotAreaBorderColor, this.PlotAreaBorderThickness, + null, OxyPenLineJoin.Miter, true); + } + else + { + var start = this.PlotArea.Bottom - + this.PlotArea.Height * axis.StartPosition; + if (axis.StartPosition < 1 && axis.StartPosition > 0) + rc.DrawLine(new[] { + new ScreenPoint(this.PlotArea.Left, start), + new ScreenPoint(this.PlotArea.Right, start) }, + this.PlotAreaBorderColor, this.PlotAreaBorderThickness, + null, OxyPenLineJoin.Miter, true); + + var end = this.PlotArea.Bottom - + this.PlotArea.Height * axis.EndPosition; + if (axis.EndPosition < 1 && axis.EndPosition > 0) + rc.DrawLine(new[] { + new ScreenPoint(this.PlotArea.Left, end), + new ScreenPoint(this.PlotArea.Right, end) }, + this.PlotAreaBorderColor, this.PlotAreaBorderThickness, + null, OxyPenLineJoin.Miter, true); + } } + } }