SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

I am getting a weird exception when appending data to my dataseries.

 SciChartSurface didn't render, because an exception was thrown:
  Message: Specified argument was out of the range of valid values. (Parameter 'You must have a width and height > than 0.')

  Stack Trace:    at geq.pne(Int32 dbt, Int32 dbu, Int32 dbv, Int32 dbw)
   at geq..ctor(Int32 dak, Int32 dal, Int32 dam, gfb dan)
   at SciChart.Charting.Common.Helpers.Strategies.CommonRenderContextDrawingStrategy.DrawPointMarkers(IRenderContext2D context, Color strokeColor, Color strokeBrush, Size spriteSize, Action`3 renderToCacheMethod)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.CreateSprite(IRenderContext2D context, Color strokeColor, Color strokeBrush)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.yry(IRenderContext2D bbr, Nullable`1 bbs, Nullable`1 bbt)
   at SciChart.Charting.Visuals.PointMarkers.BitmapSpriteBase.BeginBatch(IRenderContext2D context, Nullable`1 strokeColor, Nullable`1 fillColor)
   at vra.Begin(IPathColor pathColor, Double startX, Double startY, Int32 index)
   at wbb.udm(Double hmn, Double hmo, Double hmp, Double hmq, Int32 hmr)
   at vpx.ett(wba agi, IPointSeries agj, ICoordinateCalculator`1 agk, ICoordinateCalculator`1 agl)
   at SciChart.Charting.Visuals.RenderableSeries.DrawingProviders.LegacyPointMarkerRenderer.Draw(IRenderContext2D renderContext, IPointSeries pointSeries, IRenderPassData renderPassData)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable`1 enumerable, Action`1 operation)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.SciChart.Charting.Visuals.IDrawable.OnDraw(IRenderContext2D renderContext, IRenderPassData renderPassData)
   at vsb.ixq(RenderPassInfo caj, IRenderContext2D cak, Int32 cal)
   at vsb.ixp(ISciChartSurface cag, RenderPassInfo cah, IRenderContext2D cai)
   at vsb.RenderLoop(IRenderContext2D renderContext)
   at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

I have no idea what width and height it is referring to. My SciChartSurface height and width are NaN but the actual height and width are 509 and 1007. The despite the exception I am still getting the graph to render correctly. Does anyone know how to track this down?

Version
6.2.1
  • Oleksandr Shvets
    Hi Michael, Thanks for your inquiry. I am sorry for the late reply. Could you please provide us with a small sample project reproducing this issue for investigation or with steps to reproduce this in our examples? Thanks in advance. With best regards, Oleksandr
  • You must to post comments
0
0

Hi Michael

Does this exception actually stop or crash your application? Or is it a transient error in the output window which has no effect on drawing?

SciChart is designed to catch all rendering exceptions (even non-fatal ones) and output them to the Visual Studio output window. This is to aid in debugging if you get a blank chart or visual errors and want to know why.

If there is no effect on drawing, then this exception can be safety ignored.

If you continue to experience this error, make sure the SciChartSurface has a width & height greater than zero, and is displayed (on-screen).

Best regards
Andrew

  • You must to post comments
0
0

I figured it out. We were setting point markers like this

            seriesList1.PointMarker = new EllipsePointMarker()
            {
                Fill = seriesList1.Stroke,
                Width =  !DBShowPoints ? 5 : 0,
                Height = 5,
            };

now we are doing

                seriesList1.PointMarker = new EllipsePointMarker()
                {
                    StrokeThickness = !DBShowPoints ? 5 : 0,
                    Fill = seriesList1.Stroke,
                    Width = 5,
                    Height = 5,
                };

It was a Width of 0 for the EllipsePointMarker that caused the exception.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.