Drawing chart without using canvas tag in chart.js

👍:0

AFAIK Chart.js doesn’t need the canvas tag but it needs CanvasElement and its Context2d. The canvas must be added to DOM tree. Assuming that createCanvas is returning a Canvas Element

 var c = createCanvas(1024, 600);
 c.parent('app');
 var chart = new Chart(c, config);

Leave a comment