Basic Column Chart - CanvasJS
Basic Column Chart
HTML
<script src="http://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", {
animationEnabled: true,
zoomEnabled: true,
title: {
text: ""
},
toolTip: {
shared: true
},
axisX: {
labelAngle: -50
},
legend: {
cursor: "pointer",
itemclick: function(e) {
if (typeof(e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
e.dataSeries.visible = false;
} else {
e.dataSeries.visible = true;
}
chart.render();
}
},
data: [{
type: "splineArea",
lineThickness: 2,
name: "Users",
showInLegend: true,
xValueType: "dateTime",
dataPoints: [{
x: new Date('2016-02-25T09:26:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T09:21:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T09:16:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T09:11:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T09:06:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T09:01:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:56:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:51:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:46:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:41:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:36:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:31:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:26:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:21:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:16:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:11:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:06:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T08:01:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T07:56:39-06:00'),
y: 11
}, {
x: new Date('2016-02-25T07:51:39-06:00'),
y: 11
...