Hi,
The chart zooms in horizontally and vertically when we click-hold on left mouse button and drag the mouse from top left to bottom right of the chart. Are we able to customise this default action such that it only zooms horizontally when we click-hold on left mouse button and drag the mouse from top left to bottom right of the chart? Vertical axis remains unchanged.
And also similarly for the click-hold left mouse button and drag mouse from bottom left to top right, the chart will be updated to fit in all the line segments into the view port. ONce again am i able to customise such that it only fits the x-axis into the viewport while the y-axis remain unchanged? The y-axis comprises of customised ticks, thus currently, this click-hold left mouse button and drag mouse from bottom left to top right action will squeeze all the ticks on the y-axis so that all of them can be displayed in the viewport.
Please advise.
Once again, thanks for your help!
Zooming actions
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Zooming actions
Set ViewXY.ZoomPanOptions.RectangleZoomDirectionLayered = Horizontal.The chart zooms in horizontally and vertically when we click-hold on left mouse button and drag the mouse from top left to bottom right of the chart. Are we able to customise this default action such that it only zooms horizontally when we click-hold on left mouse button and drag the mouse from top left to bottom right of the chart? Vertical axis remains unchanged
There's not unfortunately any built-in feature for that. Get your data min/max values by using your code and then use xAxis.SetRange(min, max);And also similarly for the click-hold left mouse button and drag mouse from bottom left to top right, the chart will be updated to fit in all the line segments into the view port. ONce again am i able to customise such that it only fits the x-axis into the viewport while the y-axis remain unchanged? The y-axis comprises of customised ticks, thus currently, this click-hold left mouse button and drag mouse from bottom left to top right action will squeeze all the ticks on the y-axis so that all of them can be displayed in the viewport.
LightningChart Support Team, PT