Home forums Using CanvasJS How can i get access to a canvasJS chart through a DOM-Container

This topic contains 1 reply, has 2 voices, and was last updated by  Sanjoy 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17327

    Donwey
    Member

    When i render a canvasJS-chart to a div container, how can i get access to the chart object through the div-Container? i dont want to make the chart variable global.

    I want to use it as: var chart=$(“#container”).canvasJS();

    Ayny ideas please.

    #17347

    Sanjoy
    Moderator

    @donwey,

    You can get access to the chart object using $("#container").canvasJS().

    ——-
    Sanjoy Debnath,
    Team CanvasJS

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

You must be logged in to reply to this topic.