Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

exception when changing axis max in wpf graph

$
0
0

I have a wpf graph control that shows a series of plots that are associated to some Y Axis. Sometimes (not for every collection of plots) when I click on the top value of an y-axis scale (it allows me to change the value) and insert a new value, it throws an Invalid Operation Exception. In other cases, the scale and the plots associated to the it are correctly rescaled.

I didn't notice particular differences between the cases in which the error occurs and the cases in which everything works.

 

The part of StackTrace that regards NationalInstruments libraries is the following:

 

 

Exception: System.InvalidOperationException
Message: Cannot draw outside of a draw cycle.
Source: NationalInstruments.Common
Data: System.Object:
StackTrace: in NationalInstruments.Restricted.Guard`1.Satisfies(Boolean condition, Func`4 exceptionCreator, String format, Object[] args)
in NationalInstruments.Restricted.Guard`1.Satisfies(Boolean condition, String format, Object[] args)
in NationalInstruments.Restricted.NIValidation.IsEqualTo[T](Guard`1 guard, T expected, String format, Object[] args)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.a(RenderTargetOptions A_0)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.a(RenderTargetOptions A_0, Buffer`1 A_1, Buffer`1 A_2)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.DrawLines(RenderTargetOptions options, Buffer`1 xRelativeValues, Buffer`1 yRelativeValues)
in NationalInstruments.Controls.Rendering.LineStep.NoneImpl.RenderCore(IRenderTarget target, RenderTargetOptions options, RelativeDataCollection data)
in NationalInstruments.Controls.Rendering.LineStep.Render(IRenderTarget target, RenderTargetOptions options, RelativeDataCollection data)
in NationalInstruments.Controls.Rendering.LinePlotRenderer.a(IRenderTarget A_0, RelativeDataCollection A_1)
in NationalInstruments.Controls.Rendering.LinePlotRenderer.RenderGraphCore(PlotRenderArgs renderArgs)
in NationalInstruments.Controls.Rendering.PlotRenderer.Render(RenderArgs renderArgs)
in NationalInstruments.Controls.Primitives.DataPlotArea.RenderDataInternal(IDictionary`2 plotRenderArgsCache, IDictionary`2 plotsToRender, IRasterRenderTarget rasterTarget)
in NationalInstruments.Controls.Primitives.DataPlotArea.RenderPlotData()
in NationalInstruments.Controls.Primitives.PlotArea.RenderPlotData(IQueryableGraph graph, IDictionary`2 plotData)
in NationalInstruments.Controls.Primitives.PlotArea.RenderCopiedPlotData(IQueryableGraph graph, IEnumerable`1 data)
in NationalInstruments.Controls.Graph.NationalInstruments.Controls.Internal.IDefaultDataProcessorTarget.ReceiveData(IDictionary`2 data)
in NationalInstruments.Controls.Internal.DefaultPipelineDataProcessor.a(ICollection`1 A_0)
in NationalInstruments.Controls.Internal.DefaultPipelineDataProcessor.RemapDataCore(ICollection`1 dataIndices)
in NationalInstruments.Controls.Primitives.DataProcessorBase.RemapData(ICollection`1 dataIndices)
in NationalInstruments.Controls.Primitives.GraphBase.RemapData(ICollection`1 plotIndices)
in NationalInstruments.Controls.Graph.d()
in NationalInstruments.Controls.Internal.GraphUpdateAction.a()
in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

 

 

Any suggestion?

 

Thank you


Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>