Basic Column Chart - CanvasJS JavaScript Charts
Basic Column Chart - CanvasJS JavaScript Charts
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", {
title:{
text: "StepLine Chart"
},
axisX: {
lineThickness: 2
},
data: [
{
type: "stepLine",
dataPoints: [
{ x: new Date(2008,02), y: 4.00 },
{ x: new Date(2008,03), y: 42.50 },
{ x: new Date(2008,04), y: 9.00 },
{ x: new Date(2008,05), y: 45.30 },
{ x: new Date(2008,06), y: 20.55 },
{ x: new Date(2008,07), y: 45.00 },
{ x: new Date(2008,08), y: 30.70 },
{ x: new Date(2008,09), y: 37.00 }
]
}
]
});
chart.render();