Bar Chart
by patelsan
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
var colors = ['#806a9b', '#4573a7','#aa4644','#89a54e']
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
title: {
text: ''
},
xAxis: {
categories: ['Closed','Lost','Engaged','New Pursuits'],
title: {
text: 'Sales Cycle'
}
},
yAxis: {
min: 0,
title: {
text: 'Revenue',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
formatter: function() {
return ''+
this.series.name +': '+ this.y;
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
enabled: false
},
series: [{
name: 'Revenue',
data: [{ y: 500000, color: colors[0] }, { y: 1100000, color: colors[1] }, { y: 1500000, color: colors[2] }, { y: 1800000, color: colors[3] }]
}],
credits:{
enabled: false
}
});
});
});