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 asked 7 years ago
- last edited 7 years ago
-
Attached solution that reproduces the behavior we are seeing in our product.
- You must login 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.
- Riley Huddleston answered 7 years ago
-
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 login to post comments
Please login first to submit.