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.
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.
You can get access to the chart object using $("#container").canvasJS().
You must be logged in to reply to this topic.