Highcharts Demo
author(s): Torstein Hønsi
by Mike Rawling
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.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="height: 400px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>
CSS
.highcharts-tooltip h3 {
margin: 0.3em 0;
}
JavaScript
Highcharts.setOptions({
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4']
});
Highcharts.chart('container', {
chart: {
type: 'bubble',
plotBorderWidth: 1,
zoomType: 'xy'
},
legend: {
enabled: false
},
title: {
text: 'PostNord MVPs Prioritised'
},
subtitle: {
text: ''
},
xAxis: {
gridLineWidth: 1,
title: {
text: 'Relative complexity'
},
labels: {
format: '{value}'
},
/*plotLines: [{
color: 'black',
dashStyle: 'dot',
width: 2,
value: 10,
label: {
rotation: 0,
y: 15,
style: {
fontStyle: 'italic'
},
text: ''
},
zIndex: 3
}]*/
},
yAxis: {
startOnTick: false,
endOnTick: false,
title: {
text: 'Relative accessibility'
},
labels: {
format: '{value}'
},
maxPadding: 0.2,
plotLines: [{
color: 'black',
dashStyle: 'dot',
width: 2,
value: 17,
label: {
align: 'right',
style: {
fontStyle: 'italic'
},
text: 'Top 3 most valuable',
x: -10
},
zIndex: 3
}]
},
tooltip: {
useHTML: true,
headerFormat: '<table>',
pointFormat: '<tr><th colspan="2"><h3>{point.country}</h3></th></tr>' +
'<tr><th>Complexity:</th><td>{point.x}</td></tr>' +
'<tr><th>Impact:</th><td>{point.y}</td></tr>' +
'<tr><th>Business Value:</th><td>{point.z}%</td></tr>',
footerFormat: '</table>',
followPointer: true
},
plotOptions: {
...