Objo
Thanks for the FAST response ! It works!!
Thanks for the FAST response ! It works!!
model.Axes[0].AxisTitleDistance = 100;
Good luck.model.PlotMargins.Bottom
? If set to NaN
, the margin should be adjusted automatically. If that is not working, then it is a bug! Using the AxisTitleDistance
is a work-around :-)privatevoid Axis_OnAxisChanged(object sender, AxisChangedEventArgs args) { if (_syncChange || ((Axis) sender).IsHorizontal()) return; _syncChange = true; switch (args.ChangeType) { case AxisChangeTypes.Zoom: case AxisChangeTypes.Pan: _chartIsZoomed = true; foreach (var a in uiChartPlot.Model.Axes) { if (a.Key == ((Axis) sender).Key || a.IsHorizontal()) continue; double min = a.InverseTransform( ((Axis) sender).Transform(((Axis) sender).ActualMinimum)); double max = a.InverseTransform( ((Axis) sender).Transform(((Axis) sender).ActualMaximum)); a.Zoom(min, max); } break; // case AxisChangeTypes.Zoom:// break;case AxisChangeTypes.Reset: _chartIsZoomed = false; break; } uiChartPlot.InvalidatePlot(false); _syncChange = false; }
<ItemsControl x:Name="PART_ItemsControl" ItemsSource="{Binding Models}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border>
<oxy:PlotView MinHeight="600" Model="{Binding}" />
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
at System.Collections.Generic.List`1.set_Capacity(Int32 value)
at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
at System.Collections.Generic.List`1.Add(T item)
at OxyPlot.CanonicalSplineHelper.Segment(IList`1 points, ScreenPoint pt0, ScreenPoint pt1, ScreenPoint pt2, ScreenPoint pt3, Double t1, Double t2, Double tolerance) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Rendering\Utilities\CanonicalSplineHelper.cs:line 207
at OxyPlot.CanonicalSplineHelper.CreateSpline(IList`1 points, Double tension, IList`1 tensions, Boolean isClosed, Double tolerance) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Rendering\Utilities\CanonicalSplineHelper.cs:line 151
at OxyPlot.Series.LineSeries.RenderLineAndMarkers(IRenderContext rc, OxyRect clippingRect, IList`1 pointsToRender) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Series\LineSeries.cs:line 703
at OxyPlot.Series.LineSeries.RenderPoints(IRenderContext rc, OxyRect clippingRect, ICollection`1 points) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Series\LineSeries.cs:line 520
at OxyPlot.Series.LineSeries.Render(IRenderContext rc, PlotModel model) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Series\LineSeries.cs:line 366
at OxyPlot.PlotModel.RenderSeries(IRenderContext rc) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 387
at OxyPlot.PlotModel.RenderOverride(IRenderContext rc, Double width, Double height) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 116
at OxyPlot.PlotModel.OxyPlot.IPlotModel.Render(IRenderContext rc, Double width, Double height) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 53
at OxyPlot.Wpf.PlotView.UpdateVisuals() in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot.Wpf\PlotView.cs:line 1104
at OxyPlot.Wpf.PlotView.ArrangeOverride(Size arrangeBounds) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot.Wpf\PlotView.cs:line 560
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)