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!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.