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

0
0

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
Version
4.2.3.10185
  • Riley Huddleston
    Attached solution that reproduces the behavior we are seeing in our product.
  • You must to post comments
1
0

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
    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.