SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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
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
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
Please login first to submit.