Pre loader

How to zoom in/out custom annotation images?


Hi there,

I created a simple map application. The map itself is displayed as a custom annotation (image) below the chart. The problem is, I can’t zoom into the custom annotation (map). The map will keep it’s original dimensions when zoomed. Is there a way to zoom in/out a custom annotation?


  • You must to post comments
Best Answer

I think I know what you want Tim.

You have placed a custom annotation that covers a certain area, then want to zoom in/out of the chart our using our ChartModifiers, but you want some notification of the size of the annotation so that you can scale an image (such as a map tile).

I guess, one way to do this, is listen to Axis.VisibleRangeChanged (or SciChartSurface.Rendered) and then query the ActualWidth, ActualHeight of the custom annotation. You will then need to update the Image.Source of the annotation with a new image.

One caveat: UIElements in WPF (annotations are UIElements) have a maximum width, height. If you go over this, you risk a crash in WPF itself. A better way to handle this is by compositing map tiles or images onto a bitmap.

I’m going to email you to discuss more as it sounds interesting! 🙂


  • You must to post comments
Showing 1 result
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