HighCharts Income Demo
onTrack Brighten Your Outlook
by Leandro Barbosa
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
//renderTo: "container",
type: 'bar',
width: null,
height: 150,
inverted: false, // isnt changing anything...?
//margin: [0,0,0,0],
spacing: [0,0,0,0],
animation: false,
backgroundColor: "blue"
},
colors: ['red','orange','yellow'],
pointPadding: 0,
groupPadding: 0,
title: {
text: null
},
exporting: {
enabled: false
},
xAxis: {
title: {
enabled: false
},
visible: false,
labels: {
enabled: false
}
},
yAxis: {
title: {
enabled: false
},
visible: false,
labels: {
enabled: false
}
},
tooltip: {
followPointer: true,
headerFormat: "{series.name}: ",
valueSuffix: ' dollars',
pointFormatter: function() {
return Highcharts.numberFormat((this.y / 1000),0) + "K";
}
},
plotOptions: {
series: {
pointPadding: 0,
groupPadding: 0,
},
bar: {
animation: false,
borderWidth: 0,
dataLabels: {
enabled: true,
allowOverlap: true,
align: "right",
formatter: function() {
return Highcharts.numberFormat((this.y / 1000),0) + "K";
}
},
enableMouseTracking: true
}
},
legend: {
enabled: true,
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 0,
y: 0,
...