Basic HTML5 Chart Example - CanvasJS
Basic HTML5 Chart Example
by canvasjs
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
axisX: {
interval: 1
},
data: [
{
type: "column",
dataPoints: [
{ x: 1, y: 11},
{ x: 1, y: 9 },
{ x: 1, y: 3 },
{ x: 1, y: 1 },
{ x: 2, y: 11},
{ x: 2, y: 9 },
{ x: 2, y: 3 },
{ x: 2, y: 1 },
]
}
]
});
chart.render();