Lock one axis for zoom and pan

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

snOOfy
Posts: 14
Joined: Mon Aug 29, 2016 5:45 pm

Lock one axis for zoom and pan

Post by snOOfy » Mon Sep 12, 2016 2:59 pm

Hi,

I would like to configure my chart so that the user can zoom and pan the x axis with the mouse, but not the y axis. The y axis should always display the range -0.5 to +0.5. How can I accomplish that?

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Lock one axis for zoom and pan

Post by ArctionPasi » Mon Sep 12, 2016 6:18 pm

Hi,

you can do that by setting
axis.PanningEnabled = False
axis.ZoomingEnabled = False

For all the axes you don't want to respond to zooming and panning gestures. Note these are available not only for Y axes, but X axes as well. :)
LightningChart Support Team, PT

snOOfy
Posts: 14
Joined: Mon Aug 29, 2016 5:45 pm

Re: Lock one axis for zoom and pan

Post by snOOfy » Tue Sep 13, 2016 7:32 am

Thanks for the quick reply. The two properties are really convenient, maybe you could mention them in the User Manual in chapter 6.21 Zooming and panning :)

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Lock one axis for zoom and pan

Post by ArctionPasi » Thu Sep 15, 2016 1:57 pm

Thanks for suggesting documentation improvements in this regard.

We added new section in the manual:

6.21.17 Excluding specific X or Y axes from zooming and panning operations

• To exclude specific X or Y axes from Zooming operations, set
axis.ZoomingEnabled = False

• To exclude specific X or Y axes from Panning operations, set
axis.PanningEnabled = False


It'll be included in the manual of SDK a little bit later.
LightningChart Support Team, PT