HTML5 & JS Line Chart - 0 | JSFiddle Sample Code
HTML5 & JS Line Chart - 0 | JSFiddle Sample Code
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>
JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
text: "Earthquakes - per month"
},
axisY:{
gridColor:"red",
labelFontColor:"red",
maximum: 512,
},
data: [
{
type: "line",
dataPoints: [
{ x: new Date(2012, 00, 1), y: 450 },
{ x: new Date(2012, 01, 1), y: 414 },
]
}
]
});
chart.render();
}