Highcharts Demo

author(s): Torstein Hønsi

by HemalathaThanigaivel

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: 200px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'PAST USAGE',
        align : 'left'
    },
    subtitle:{
        text : 'Whole House Monthly Spending',
        align: 'left'
    },
    xAxis: {
        categories: ['JULY', 'AUG', 'SEPT', 'OCT', 'NOV', 'DEC','JULY', 'AUG', 'SEPT', 'OCT', 'NOV', 'DEC'],
        tickWidth  : 0,
        lineWidth : 1,
        //lineColor : "#666",
    },
    yAxis: {
        title: {
            text: ''
        },
        stackLabels: {
            enabled: false
        },
        lineWidth : 1,
      //  lineColor : "#666",
        gridLineWidth : 1,
        tickWidth : 1,
        gridLineDashStyle: 'longdash',
    },
    tooltip: {
        headerFormat: '<b>{point.x}</b><br/>',
        pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
    },
    plotOptions: {
        column: {
            stacking: 'normal',
            dataLabels: {
                enabled: false
            },
            borderWidth: 0,
        }
    },legend :{
    		enabled : false
    },
    credits:{
    		enabled : false
    },
    series: [{
        name: 'John',
        data: [5, 3, 4, 7, 2, 3, 4, 1, 2, 5],
        color : "#596361"
    }, {
        name: 'Jane',
        data: [2, 2, 3, 2, 1, 5, 3, 4, 3, 2],
        color : "#00bec9"
    }, {
        name: 'Joe',
        data: [3, 4, 4, 2, 5, 2, 2, 3, 2, 1],
        color : "#9f897e"
    },{
        name: 'Hema',
        data: [3, 2, 2, 3, 2, 1, 4, 4, 2, 5],
         color : "#f95c41"
    }]
});