Hi, is there a modifier or possibly buttons for zoom in & zoom out that works similar to a MouseWheelZoomModifier but for users with no mouse wheel?
- Maryjes Chapman asked 2 months ago
- You must login to post comments
Found the fix for the related error to this issue: https://github.com/vuejs/core/issues/3024
Apparently, I have to define the property such as:
Object.defineProperty(axis, ‘visibleRange’, {
value: new NumberRange(newMin, newMax),
writable: true,
configurable: true
})
While that fix the error, my issue now is, I have to hover on to the chart before the updated ranges are applied. I subscribed to my axes visible range changes and it doesn’t trigger it if I’m clicking the button, but it does when using the mousewheel to zoom.
I might try to find a workaround, thanks!
- Maryjes Chapman answered 2 months ago
- last edited 2 months ago
- You must login to post comments
Hi Maryjes, I’m glad you fixed the error above which seems to be related to Vue.js not SciChart.
The second issue:
I have to hover on to the chart before the updated ranges are applied. I subscribed to my axes visible range changes and it doesn’t trigger it if I’m clicking the button, but it does when using the mousewheel to zoom.
I’ve never seen that before. if you set axis.visibleRange
in code, the chart will immediately update, whether you are hovering the chart or not.
I’d suggest trying to build your custom interaction without VueJS to isolate if Vue is causing extra problems. You can start off by taking our codepen in the documentation. If you find an error in SciChart.js that needs us to fix it, then just let me know!
- Andrew Burnett-Thompson answered 2 months ago
- You must login to post comments
It’s pretty easy to make this behaviour in SciChart.js
Check out this documentation page on Setting Axis.VisibleRange programmatically. In that one you have a button which updates the axis.visibleRange
property to effectively zoom. Quite easy to modify to achieve zoom in behaviour (make sure you adjust both X and Y axis ranges)
- Andrew Burnett-Thompson answered 2 months ago
- You must login to post comments
Hi Andrew, thanks for the response. I was able to fetch the NumericAxis defined with “this.sciChartSurface.yAxes.get(0)” but updating the yAxis.visibleRange, im getting a read-only and non-configurable data property error.
Full error:
“TypeError: ‘get’ on proxy: property ‘$$’ is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected ‘#
- Maryjes Chapman answered 2 months ago
- last edited 2 months ago
- You must login to post comments
Please login first to submit.