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", {
title: {
text: "Olympic Medals of all Times (till 2012 Olympics)"
},
axisY: {
title: "Medals won",
maximum: 50000
},
data: [{
type: "bar",
showInLegend: true,
legendText: "blue",
color: "blue",
dataPoints: [{
y: 1,
label: "Italy"
}, {
y: 30000,
label: "China"
}, {
y: 20000,
label: "France"
}, {
y: 10000,
label: "Great Britain"
}, {
y: 15000,
label: "Soviet Union"
}, {
y: 16000,
label: "USA"
}]
}]
});
chart.render();