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


I’m currently trying to adapt an example to post here as an example repro– But in the meantime I figured I’d post and see if there are any fundamental problems with trying to do this.

The exception message states:

Additional information: Cannot get data-value from coordinate as the associated Axis is null
  • Riley Huddleston
    Attached solution that reproduces the behavior we are seeing in our product.
  • You must to post comments

The issue is because annotations need to belong to a specific Y Axis (id).

Is this because it looks for values that are on that Y-Axis? Either way for this case we aren’t displaying series values and so I just used the “DefaultAxisId” for the YAxisId — this works in our context more easily because we generate all of the Y-Axes on the fly.

Please follow up if there is a better way to approach this. That message would be nice if it said that you were missing an id instead of a null axis.

  • Andrew Burnett-Thompson
    Hi Riley, this is the case. Horizontal/VerticalLineAnnotation requires a YAxisId and XAxisId. This is because in some cases we are measuring against the YAxis even for vertical lines. We do output a message to the Visual Studio console but this is easily missed. Best regards, Andrew
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.