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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

I am adding annotations to a chart that is bound to MVVM data and has multiple Y axes. The annotation data all applies to a single series/axis. I have seen that the IsHidden property can be used to toggle the visibility of an annotation. Is there a way to have the annotations tied to the visibility of a series/axis? So if the series is hidden by unchecking its box in the legend, can the associated annotations all be hidden also?

I realize that I can iterate my annotation collection and toggle the property when the series visibility changes, but it would be nice if there were a way for that to happen automatically.

  • You must to post comments
0
0

There’s no easy way to do this other than ‘Foreach annotation in Annotations where YAxisId = …’.

I was going to suggest a default style, but since AnnotationBase.YAxis is not a dependency property you can’t bind AnnotationBase.IsHidden directly to YAxis.Visibility.

Maybe you could do it with an element name binding from AnnotationBase.IsHidden to YAxis.Visibility but it wouldn’t be clean or easy. I think stick with what you have!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.