Replies: 1 comment
-
Update: I've tracked down the method that controls the zoom by selection logic (I think). It's in /src/skiasharp/LiveChartsCore.SkiaSharp.Avalonia/CartesianChart.axaml.cs and the code is:
IsSecondary looks like the trigger that I'm looking for. I think I could potentially avoid IsSecondary from being set to true by overriding the method and not calling this method on RightButton presses or double taps within 500ms, but I'm hoping there's a more straightforward way to disable this functionality that I'm not noticing. InvokePointerDown for the cartesian chart (what I'm currently using) doesn't appear to have any method to ignore the secondary option either. (src/LiveChartsCore/CartesianChart.cs) |
Beta Was this translation helpful? Give feedback.
-
I would like to disable Zoom By Selection in my application. By that I mean that I want the user to be able to use the mouse wheel or pinch to zoom for zooming, but I don't want them to double click and drag to zoom. My touch monitor sometimes registers to fingers close together as a single finger that's tapping on the screen which randomly triggers the zoom by selection behavior when I don't want it to.
I found documentation on this feature from this page: https://livecharts.dev/docs/Avalonia/2.0.0-rc2/samples.lines.zoom#zoom-by-selection which then links to the following page saying that you can customize the trigger of the function here: https://livecharts.dev/docs/avalonia/2.0.0-rc2/CartesianChart.Axes%20properties#zooming-and-panning. When I search for 'Zoom by Selection' I can't seem to find any information on how to disable it or capture the trigger to potentially ignore it.
I've also looked in the API browser and searched for 'Zoom By Selection', 'Selection', and 'Zoom' and didn't find anything explaining how to disable this feature. Does anyone have some documentation they could point me towards on how to disable this function?
Beta Was this translation helpful? Give feedback.
All reactions