Pre loader

Placing Text Annotation above Box Annotation

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

Is there any way that I can make it where a text annotation is always above the box annotations? Right now it seems to give a greater Z-Index to whatever annotation was last rendered onto the chart as the chart is panned, so I end up with some box annotations in front of the text annotation and some behind.

Thanks for your help, I appreciate it.

Greg

  • You must to post comments
1
0

Hi Greg,

Please, try following code(it\’s looks tricky a bit, but works exactly as desired):

            if (textAnnotation != null)
            {
                textAnnotation.OnDetached();
                textAnnotation.IsAttached = false;
            }

            sciChart.Annotations.Insert(0, boxAnnotation);

You should do this for the textAnnotations you want to keep on the top before adding any new annotation.

Hope this helps!

Best regards,
Yuriy

  • You must to post comments
0
0

Hi Greg,

There is the AnnotationBase.AnnotationCanvas property, you could set AnnotationCanvas=AnnotationCanvas.BelowChart, but in this case the annotation will appear under chart series too. Is this suitable solution for you?

Best regards,
Yuriy

  • Sean Clifford
    Unfortunately I need the box on top of the chart but under the text.
  • You must to post comments
Showing 2 results
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