Pre loader

Adding AnnotationLabel for each YAxis in HorizontalLineAnnotation

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

I have an HorizontalLineAnnotation. Normaly you can see one AnnotationLabel for the YAxis. How can i get my HorizontalLineAnnotation to show one AnnotationLabel on each YAxis. If i add or remove one YAxis then the lable must be added or removed. This is the same behaivour as the CursorModifier.

  • You must to post comments
0
0

Hi Bochelie,

It’s not currently possible to do this in SciChart. However I recommend this as a workaround:

  • Why not create N HorizontalLineAnnotations (one per axis by setting YAxisId) and bind Y1 on all of them to the same ViewModel property with a TwoWay Binding?

That way when you move one HorizontalLineAnnotation they will all move.

If that looks bad (because of overlaid lines). You could also hide the line on all but one HorizontalLineAnnotation by setting the Stroke to {x:Null} or Transparent.

Best regards,
Andrew

  • bochelie
    Hi Andrew, I dont realy understand to wich property i should bind Y1 to. Can you give me a bit more clarification? By the way i need to do this in code behind because i dont know how many YAxis the user will add.
  • You must to post comments
Showing 1 result
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