Highcharts Demo
author(s): Torstein Hønsi
by Mahfuz Ahmed
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 300px; width: 300px"></div>
JavaScript
$(function() {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
width: 300
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
]
},
yAxis: {
min: 0,
title: {
text: 'Rainfall (mm)'
}
},
legend: {
layout: 'vertical',
backgroundColor: '#FFFFFF',
align: 'left',
verticalAlign: 'top',
x: 100,
y: 70,
floating: true,
shadow: true
},
tooltip: {
formatter: function() {
return '' + this.x + ': ' + this.y + ' mm';
}
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
backgroundColor: '#FFF',
borderWidth: 1,
borderColor: '#AAA',
formatter: function() {
return '$' + Highcharts.numberFormat(this.y, 2);
},
y: -9
},
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Tokyo',
data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0]
},
...