CEO column chart - dual colour
by Danielle Parkinson
HTML
<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: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
legend: {
itemStyle: {
color: '#2a3f54',
fontSize: '14px',
fontFamily: 'Metrophobic',
fontWeight: 'normal'
}
},
chart: {
type: 'column',
height: 400,
width: 1200
},
title: {
text: ' '
},
xAxis: {
categories: ['May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April'],
labels: {
style: {
color: '#2a3f54',
fontSize: '14px',
fontFamily: 'Metrophobic'
}
},
tickLength: 0,
},
yAxis: {
labels: {
style: {
color: '#2a3f54',
fontSize: '14px',
fontFamily: 'Metrophobic'
}
},
tickLength: 0,
min: 0,
gridLineColor: '#aec4db',
title: {
text: ' '
},
stackLabels: {
enabled: false,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
series: {
groupPadding: 0.15
},
column: {
dataLabels: {
enabled: false,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
style: {
textShadow: '0 0 3px black'
}
...