Home Forums Chart Support Drawing a graph on a pre-existing canvas

Drawing a graph on a pre-existing canvas

Viewing 2 posts - 1 through 2 (of 2 total)
  • #8538

    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.

    #8552

    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

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

You must be logged in to reply to this topic.