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!

Answered
1
0

Hi, I would like to do Pan and Zoom using WPF 4 Multi touch manipulation events. I believe I need to implement a Modifier class to do that. But how should i invoke methods on the chart to do the zooming and panning? And also, when I zoom, I would like it to be in the centre of the manipulation, meaning i would like to zoom at a specific centre on the chart. Please advise. Thanks!

  • You must to post comments
Best Answer
1
0

Hello Icube,

In Wpf the touch events are promoted to the mouse equivalent, if they are unhandled, so you could use existing modifiers instead of creating your own. But if you need, you could subscribe to manipulation events on Modifier surface and implement desired behavior:

        public override void OnParentSurfaceRendered(SciChartRenderedMessage e)
        {
            base.OnParentSurfaceRendered(e);

            if (!_isSubscribed)
            {
                SubscribeModifierSurface();
                _isSubscribed = true;
            }
        }

        private void SubscribeModifierSurface()
        {
            ((ChartModifierSurface)ModifierSurface).ManipulationStarted += OnManipulationStarted;
            ((ChartModifierSurface)ModifierSurface).ManipulationCompleted += OnManipulationCompleted;
        }

What about zoom, RubberBandXyZoomModifier allows to zoom in specific selected area on the chart (please, see this example: http://http://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/ZoomAndPanAChart/DragAreaToZoom.xaml ). If your desired functionality is different, please, tell us and we will be glad to help.

If you have any more questions, don’t hesitate to ask!
Best regards,
Yuriy

  • You must to post comments
0
0

Update: SciChart v3.0

In SciChart v3.0 the modifiers have all been enabled to use MultiTouch. Please see our Release note on SciChart v3.0.2 What’s New

4. MultiTouch support

Zooming, panning, axis manipulations, cursors, annotation manipulations via touch screens in WPF and SL

Usage:

Multitouch is enabled by default in SciChart and all existing modifiers now have touch-support. To get a touch-specific pinch zoom action please use the PinchZoomModifier.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.