Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="http://code.highcharts.com/highcharts.src.js"></script>
<div id="container" style="height: 400px; width: 500px"></div>
JavaScript
$(function () {
$('#container').highcharts({
yAxis: {
labels: {
formatter: function() {
var ret,
numericSymbols = ['k', 'M', 'G', 'T', 'P', 'E'],
i = 6;
if(this.value >=1000) {
while (i-- && ret === undefined) {
multi = Math.pow(1000, i + 1);
if (this.value >= multi && numericSymbols[i] !== null) {
ret = (this.value / multi) + numericSymbols[i];
}
}
}
return '$' + (ret ? ret : this.value);
}
}
},
series: [{
data: [15000, 20000, 30000]
}]
});
});