Giverly_bar_charts

by Bharathi Prasannaa

HTML

<div id="container" style="height: 400px; min-width: 600px"></div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
      rangeSelector: {
            buttons: [{
                type: 'month',
                count: 1,
                text: '1m',
                events: {
                    click: function () {
                        console.log(this);
                    }
                }
            }, {
                type: 'month',
                count: 3,
                text: '3m'
            }, {
                type: 'month',
                count: 6,
                text: '6m'
            }, {
                type: 'ytd',
                text: 'YTD'
            }, {
                type: 'year',
                count: 1,
                text: '1y'
            }, {
                type: 'all',
                text: 'All'
            }]
        },
     colors: ['#7cb5ec', '#f7a35c'],
    title: {
        text: 'Fundraising'
    },
    subtitle: {
        text: ''
    },
    xAxis: {
        categories: [
            'Jan \'\ 18 ',
            'Feb \'\ 18',
            'Mar \'\ 18',
            'Apr \'\ 18',
            'May \'\ 18',
            'Jun \'\ 18',
            'Jul \'\ 18',
            'Aug \'\ 18',
            'Sep \'\ 18',
            'Oct \'\ 18',
            'Nov \'\ 18',
            'Dec \'\ 18'
        ],
        crosshair: true
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Dollars'
        }
    },
    tooltip: {
        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
            '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
        footerFormat: '</table>',
        shared: true,
        useHTML: true
    },
    plotOptions: {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    },
    series: [{
        name: 'Affiliate Commissions',
        data: [49.9, 71.5, 106.4, 129.2, 144.0,...