Block all chart interactions

A forum dedicated to WinForms version of LightningChart Ultimate.

Block all chart interactions

Postby mike » Mon Mar 25, 2019 1:48 pm

Hi,

Can you help how to block all possible ways of interacting with chart, and leaving only possibility to click to show/hide series?
I have live chart with up to 30 series with 50ms refreshing rate. I don't want user to zoom, move, range changes and other things
while chart is running. I have some things disabled, but might not know about all ways.

Many thanks,
Mike
mike
 
Posts: 1
Joined: Thu Mar 14, 2019 10:10 am

Re: Block all chart interactions

Postby ArctionKestutis » Tue Mar 26, 2019 12:29 pm

Hello Mike,

You could disable all interaction on the Chart with
Code: Select all
_Chart.Options.MouseInteraction = false;

Most of the objects down in the tree also has MouseInteraction property: Axis, Series, Title etc. Disabling those would prevent highlighting, moving-by-mouse, raising mouse event etc. If you need less drastic limitation of interaction, you should use object specific mouse interaction change.

The zooming and panning behavior is mostly controlled by properties in the ZoomPanOptions tree. If you to prevent any zoom and pan action you should modify corresponding properties to 'None' or 'Off'. For example,
Code: Select all
            _chart.ViewXY.ZoomPanOptions.AxisMouseWheelAction = AxisMouseWheelAction.None;
            _chart.ViewXY.ZoomPanOptions.LeftMouseButtonAction = MouseButtonAction.None;
            _chart.ViewXY.ZoomPanOptions.MiddleMouseButtonAction = MouseButtonAction.None;
            _chart.ViewXY.ZoomPanOptions.MouseWheelZooming = MouseWheelZooming.Off;
            _chart.ViewXY.ZoomPanOptions.MultiTouchPanEnabled = false;
            _chart.ViewXY.ZoomPanOptions.MultiTouchZoomEnabled = false;
            _chart.ViewXY.ZoomPanOptions.RightMouseButtonAction = MouseButtonAction.None;
            _chart.ViewXY.ZoomPanOptions.RightToLeftZoomAction = RightToLeftZoomActionXY.Off;

Hope this helps.
ArctionKestutis
 
Posts: 363
Joined: Mon Mar 14, 2016 9:22 am


Return to LightningChart Ultimate WinForms

Who is online

Users browsing this forum: No registered users and 9 guests