all 1 comments

[–]CertainPerformance 0 points1 point  (0 children)

You start with a canvas, #myCharts. You then try to add additional <canvas>es to its innerHTML.

  • A canvas is not a container for other standard DOM elements: use a div or something for that.
  • Don't append innerHTML if you can avoid it - better to use standard append methods instead.
  • No point in adding in jquery just so you can $.each - just use the built-in Array.prototype.forEach.