Highcharts Demo
author(s):
Torstein Hønsi
by Joanna Sobańska
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Production and Consumption in Poland'
},
subtitle: {
text: '(2005-2016)'
},
xAxis: {
categories: [
'2005',
'2006',
'2007',
'2008',
'2009',
'2010',
'2011',
'2012',
'2013',
'2014',
'2015'
]
},
yAxis: [{
min: 100000,
max: 170000,
title: {
text: '[GWh]'
}
}],
legend: {
shadow: false
},
tooltip: {
shared: true
},
plotOptions: {
column: {
grouping: false,
shadow: false,
borderWidth: 0
}
},
series: [{
name: 'Production',
color: 'rgba(165,170,217,1)',
data: [156024,
160848,
159528,
155567,
150923,
156342,
163153,
159853,
162501,
156567,
161772],
pointPadding: 0.1,
pointPlacement: 0
}, {
name: 'Consumption',
color: 'rgba(126,86,134,.9)',
data: [144838,
149847,
154170,
154980,
148718,
154987,
157909,
157013,
157980,
158734,
161438],
pointPadding: 0.3,
pointPlacement: 0
}]
});