Home Forums Chart Support call methods

call methods

Viewing 4 posts - 1 through 4 (of 4 total)
  • #28953

    mat

    hello how can i call canvas methods like this

    document.getElementById(‘id’).canvasmethod()

    ?

    #28974

    @mat,

    Please refer to this tutorial for a complete list of methods and properties on canvas.


    Shashi Ranjan
    Team CanvasJS

    #28975

    mat

    thanks . I want to know how can i call canvas.js methods like this.

    for example lets say render method.

    document.getElementById(‘mychart’).render()

    or lets say set method

    document.getElementById(‘mychart’).set(“zoomEnabled”, true);

    #28995

    @mat,

    The document.getElementById() method returns the HTML DOM element that has the ID attribute with the specified value. To access the methods and properties of the chart, you will have to use its reference(e.g chart.render()). Please refer to this documentation page for more information on accessing the methods and properties of the chart.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.