You must be logged in to post your query.
Home › Forums › Chart Support › Drawing a graph on a pre-existing canvas
Hello,
I was wondering if was possible to draw a graph on a pre-existing canvas. From the docs I’ve seen, you’re not required to specify a canvas element beforehand. I’m making an application that runs a simulation on canvas and then shows the results, and I would prefer to have those results appear in the same area.
Yacob,
As of now it requires a div element inside which the chart is rendered. This is because chart includes various other DOM elements like menu button, etc.
I would suggest rendering chart inside a hidden div element and then copying the content of chart into your canvas using drawImage method.
— Sunil Urs
You must be logged in to reply to this topic. Login/Register