Basic HTML5 Chart Example - CanvasJS

Basic HTML5 Chart Example

HTML

<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>

JavaScript

var chart = new CanvasJS.Chart("chartContainer",
	{
      data: [
          {
              legendText: "A",
              showInLegend: true,
              type: "area"
          },
          {
              legendText: "B",
              showInLegend: true,
              type: "column"
          },
          {
              legendText: "C",
              showInLegend: true,
              type: "line" //change it to area or column and the legend is rendered correctly
          }
      ]
    });

 chart.render();