Home › forums › Using CanvasJS › Drawing with canvasjs?
This topic contains 2 replies, has 2 voices, and was last updated by cshickman 1 year, 7 months ago.
From my investigating, it seems very clear to me that CanvasJS is built upon the regular HTML5 canvas framework. As there are some things CanvasJS doesn’t do that I would like to be able to do, I thought that maybe I could do regular canvas drawing/rendering on top of CanvasJS charts.
Could someone tell me the correct syntax to do this? For example, I’ve tried this…
//renders the outer donut
var finalOuterChart = new CanvasJS.Chart(containers, outerDoughnutChart);
var canvas = finalOuterChart.ctx.canvas;
var context = canvas.getContext("2d");
That doesn’t seem to do anything though. I’m just trying to draw a simple line for starters. I’ve tried several other methods, but have thus far been unsuccessful. A little help please?
You can create an additional canvas and place it top of our rendering canvas. Please take a look at this jsFiddle.
Thank you sir!
You must be logged in to reply to this topic.