Pre loader

System.InvalidOperationException in project

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Good day, everybody!
Recently I’ve upgraded my project to new SciChart version (v3.1.0.4761 (13th July 2014)). Previos version is 3.0.2.4282 (1st May 2014).
I noticed that the project had a lot of freezes. I watched output data and found out this:

A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
 SciChartSurface didn't render, because an exception was thrown:
  Message: AxisCollection.GetAxisById('DefaultAxisId') returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart

  Stack Trace:    в Abt.Controls.SciChart.AxisCollection.GetAxisById(String axisId, Boolean assertAxisExists)
   в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.JoinControl(ISciChartSurface firstFont, RenderPassInfo currentValues, IRenderContext2D currentId)
   в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.RenderLoop(IRenderContext2D renderContext)
   в Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()

A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Abt.Controls.SciChart.Wpf.dll
 SciChartSurface didn't render, because an exception was thrown:
  Message: AxisCollection.GetAxisById('DefaultAxisId') returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart

  Stack Trace:    в Abt.Controls.SciChart.AxisCollection.GetAxisById(String axisId, Boolean assertAxisExists)
   в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.JoinControl(ISciChartSurface firstFont, RenderPassInfo currentValues, IRenderContext2D currentId)
   в Abt.Controls.SciChart.Wpf.TreeNodeAttribute.RenderLoop(IRenderContext2D renderContext)
   в Abt.Controls.SciChart.Visuals.SciChartSurface.DoDrawingLoop()

How can I fix this error?

  • You must to post comments
1
0

I had this problem too, and managed to boil it down to reproduce with this:

    <SciChart:SciChartSurface>
        <SciChart:SciChartSurface.RenderableSeries>
            <SciChart:FastLineRenderableSeries />
        </SciChart:SciChartSurface.RenderableSeries>
        <SciChart:SciChartSurface.XAxis>
            <SciChart:NumericAxis Id="BottomAxis"/>
        </SciChart:SciChartSurface.XAxis>
        <SciChart:SciChartSurface.YAxis>
            <SciChart:NumericAxis Id="YAxis"/>
        </SciChart:SciChartSurface.YAxis>
    </SciChart:SciChartSurface>

However, after working through the Multiple X-Axis example, I worked out the problem: if you have put Ids on your axes, you must also explicitly specify which axis is associated on each series.

So in the example above, either you have to remove the Ids on the axes, or change the Series definition to include:

XAxisId="BottomAxis" YAxisId="YAxis"
  • You must to post comments
0
0

Hi Egor,

Without stating the obvious, the exception message says:

AxisCollection.GetAxisById(‘DefaultAxisId’) returned more than one axis with the ID=DefaultAxisId. Please check you have assigned correct axis Ids when you have multiple axes in SciChart

Did you check this? If all your axis have different axis IDs then let me know, it might be a problem on our side.

Best regards,
Andrew

  • Egor
    Good day! Yes, all axisid are differrent and in the previous version all worked correctly. And when I try to add annotation, they aren't displayed on the surface, but they are shown in annotation collection.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies