Stacked CEO chart

author(s): Torstein Hønsi

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

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: '  '
    },
    xAxis: {
        categories: ['Innovation', 'Recruitment', 'Workforce training', 'Regulatory compliance', 'Digital infrastructure', 'Physical infrastructure', 'Governance and risk', 'Cyber security', 'Emerging technologies'],
        
                 labels: {
                style: {
                    fontFamily: 'Arial',
                    fontSize: '12px',
                    color: '#333333',
                },
                },
    },
    yAxis: {
        min: 0,
        title: {
            text: ' '
        },
         labels: {
                style: {
                    fontFamily: 'Arial',
                    fontSize: '12px',
                    color: '#333333',
                },
                },
        stackLabels: {
            enabled: false,
            style: {
                fontWeight: 'normal',
                fontcolor: '#333',
            }
        }
    },
    legend: {
        align: 'center',
        x: -30,
        verticalAlign: 'bottom',
        y: 25,
        floating: false,
        backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
        borderColor: '#fff',
        borderWidth: 1,
        shadow: false
    },
    tooltip: {
        headerFormat: '<b>{point.x}</b><br/>',
        pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
    },
    plotOptions: {
        column: {
            stacking: 'normal',
            dataLabels: {
                enabled: false,
                color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
            }
        }
    },
    series: [{
        name: 'We will decrease investment in this area',
        data: [0,0,0,0,0,1,1,0,0],
        color: '#6d2077',
    }, {
        name: 'No new investment – except for maintaining current business needs',
        data: [47,24,36,40,32,37,42,33,51],
        color:...