Highcharts Demo

author(s): Torstein Hønsi

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: 'Revenue Streams'
    },
    xAxis: {
        categories: [ 'Arbitrage+Balancing+PV Support', 'Arbitrage+Balancing+PV Support +Network Support', 'Arbitrage+Balancing+PV Support+Network Support+FR Provision']
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Total fruit consumption'
        },
        stackLabels: {
            enabled: true,
            style: {
                fontWeight: 'bold',
                color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
            }
        }
    },
    legend: {
        align: 'right',
        x: -30,
        verticalAlign: 'top',
        y: 25,
        floating: true,
        backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
        borderColor: '#CCC',
        borderWidth: 1,
        shadow: false
    },
    tooltip: {
        headerFormat: '<b>{point.x}</b><br/>',
        pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
    },
    plotOptions: {
        column: {
            stacking: 'normal'
        }
    },
    series: [
    	{
        name: 'FR Provision',
        data: [0, 0, 0, 0, 15]
    },{
        name: 'Network Support',
        data: [0, 0, 0, 15, 15]
    },{
        name: 'PV Support',
        data: [0, 0, 5, 5, 5]
    }]
});