Highcharts Demo

author(s): Torstein Hønsi

by Black Label

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container"></div>

CSS

#container {
    min-width: 310px;
    max-width: 800px;
    height: 400px;
    margin: 0 auto
}

JavaScript

Highcharts.chart('container', {
    xAxis: {
        type: 'category'
    },
    plotOptions: {
        series: {
            grouping: false
        }
    },
    series: [{
        type: 'column',
        data: [{
                x: 0,
                y: 1,
                dataLabels: {
                    align: 'center',
                    enabled: true,
                    useHTML: true,
                    formatter: function() {
                        return '<img src="https://www.highcharts.com/samples/graphics/sun.png"><img>';
                    }
                }
            },
            [1, 2],
            [2, 3]
        ]
    }, {
        type: 'column',
        data: [
            [4, 1],
            [5, 2],
            [6, 3]
        ]
    }]
});