Home Forums Chart Support scroll mouse Y + animation

scroll mouse Y + animation

Viewing 5 posts - 1 through 5 (of 5 total)
  • #41885


    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.




    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,

      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.

    Line Chart with JQuery UI Vertical Slider

    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

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.