Home Forums Chart Support How to disable toolbar with zoom and reset button?

How to disable toolbar with zoom and reset button?

Viewing 3 posts - 1 through 3 (of 3 total)
  • #38974

    I want to disable zoom and reset buttons, bot how?
    toolbar

    #38979

    @reactdeveloper,

    Zoom / Pan & Reset buttons will be shown when you enable zooming in the chart. If you like to enable zooming, show the buttons but disable them, you can set HTML button’s disabled property to true. Please find the code-snippet below.

    var buttons = document.getElementsByClassName("canvasjs-chart-toolbar")[0].children;
    for(var i = 0; i < buttons.length; i++) {
      buttons[i].disabled = true
    }

    However, if you like to enable zooming but hide the buttons, you can set display: none !important; to canvasjs-chart-toolbar class. Please take a look at this JSFiddle for an example.


    Vishwas R
    Team CanvasJS

    #39068

    This should be everything you need:

    <meta name=”viewport”
    content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0″>

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

You must be logged in to reply to this topic.