Highcharts Demo
author(s): Torstein Hønsi
by Geo George
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: [
'1987 / 88',
'1988 / 89',
'1989 / 90',
'1990 / 91',
'1991 / 92',
'1992 / 93',
'1993 / 94',
'1994 / 95',
'1995 / 96',
'1996 / 97',
'1997 / 98',
'1998 / 99',
'1999 / 00',
'2000 / 01',
'2001 / 02',
'2002 / 03',
'2003 / 04',
'2004 / 05',
'2005 / 06',
'2006 / 07',
'2007 / 08',
'2008 / 09',
'2009 / 10',
'2010 / 11',
'2011 / 12',
'2012 / 13',
'2013 / 14',
'2014 / 15',
'2015 / 16',
'2016 / 17',
'2017 / 18'
],
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Rainfall (mm)'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Tokyo',
data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4,49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4,44,66,33,22,66,44,78]
}]
});