Highcharts Demo
author(s): Torstein Hønsi
by easter bunny
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
title: {
text: 'Combination chart'
},
xAxis: {
categories: ['2016', '2017', '2018']
},
labels: {
items: [{
html: 'Last 3 years treatment summary',
style: {
left: '50px',
top: '18px',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
}
}]
},
series: [{
type: 'column',
name: 'Fever',
data: [3, 2, 1, 3, 4]
}, {
type: 'column',
name: 'ENT',
data: [2, 3, 5, 7, 6]
}, {
type: 'column',
name: 'Skin Diseases',
data: [4, 3, 3, 9, 0]
}, {
type: 'pie',
name: 'Total consumption',
data: [{
name: 'Fever',
y: 13,
color: Highcharts.getOptions().colors[0] // Jane's color
}, {
name: 'ENT',
y: 23,
color: Highcharts.getOptions().colors[1] // John's color
}, {
name: 'Skin Diseases',
y: 19,
color: Highcharts.getOptions().colors[2] // Joe's color
}],
center: [100, 80],
size: 100,
showInLegend: false,
dataLabels: {
enabled: false
}
}]
});