Basic Column Chart - CanvasJS
Basic Column Chart
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: "Basic Column Chart"
},
data: [
{
type: "column",
fillOpacity: .5,
showInLegend: true,
name: "Q1",
// color: "#EDCA93",
dataPoints: [
{y: 6.82, x: new Date(2016, 0)},
{y: -9.02, x: new Date(2016, 1)},
{y: 11.80, x: new Date(2016, 2)},
{y: 14.11, x: new Date(2016, 3)},
{y: 15.96, x: new Date(2016, 4)},
{y: 17.73, x: new Date(2016, 5)},
{y: 21.5, x: new Date(2016, 6)}
]
},
{
type: "column",
fillOpacity: .5,
showInLegend: true,
name: "Q2",
// color: "#EDCA93",
dataPoints: [
{y: 16.82, x: new Date(2016, 0)},
{y: 9.02, x: new Date(2016, 1)},
{y: 11.80, x: new Date(2016, 2)},
{y: 14.11, x: new Date(2016, 3)},
{y: 15.96, x: new Date(2016, 4)},
{y: 17.73, x: new Date(2016, 5)},
{y: 21.5, x: new Date(2016, 6)}
]
}
]
});
chart.render();