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

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.