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
- Sean Clifford asked 11 years ago
- You must login to post comments
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
- Yuriy Zadereckiy answered 11 years ago
- You must login to post comments
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
- Yuriy Zadereckiy answered 11 years ago
-
Unfortunately I need the box on top of the chart but under the text.
- You must login to post comments
Please login first to submit.