You must be logged in to post your query.
Home › Forums › Chart Support › scroll mouse Y + animation
Tagged: mouse scroll
http://jsfiddle.net/k1vtz7nw/
Hello everyone Does anyone have a ready-made solution: 1. Scroll with the mouse along the Y axis as shown in the photo below. And it is desirable that it does not look rude. There was a smooth scrolling animation. And if you click 2 mouse clicks, the graph returns to the standard position.
https://ibb.co/yQPxZRx – gif
@mcigorli,
Adding scroller to y-axis is not available as a built-in feature as of now. However, you can place JQuery UI slider vertically to achieve the same as shown in the code-snippet below,
$("#slider").slider({ range: true, orientation: "vertical", min: chart.axisY[0].get("minimum"), max: chart.axisY[0].get("maximum"), values: [ 50, 100 ], //Default zoom state slide: function( event, ui ) { chart.axisY[0].set("viewportMinimum", ui.values[0], false); chart.axisY[0].set("viewportMaximum", ui.values[1]); } });
Please take a look at this JSFiddle for an example along with complete code.
— Adithya Menon Team CanvasJS
Thank you for the illustrative example! I’m smart enough to refine your example. Thanks!
mcigorli, hello. Are you smart enough to send me your code for scrolling with mouse without the slider? Thank you, Roger
You must be logged in to reply to this topic. Login/Register