Highcharts Demo

author(s): Torstein Hønsi

by mlmason

HTML

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

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
    Highcharts.setOptions({
		lang: {
			thousandsSep: ','
		}
	});
    
    // Create the chart
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Cash Balance'
        },
        subtitle: {
            text: 'April 19, 2016'
        },
        xAxis: {
            type: 'category'
        },
        yAxis: {
            title: {
                text: 'Amount'
            }

        },
        legend: {
            enabled: false
        },
        plotOptions: {
            series: {
                borderWidth: 0,
                dataLabels: {
                    enabled: true,
                    format: '${point.y:,.0f}'
                }
            }
        },

        tooltip: {
            headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
            pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>${point.y:,.0f}</b> '
        },

        series: [{
            name: 'Cash Balance',
            colorByPoint: true,
            data: [{
                name: 'Operating Fund',
                y: 97163,
                drilldown: 'Operating Fund Accounts'
            }, {
                name: 'Regatta Fund',
                y: 18493,
                
            }, {
                name: 'Building Improvement Fund',
                y: 80974,
                
            }, {
                name: 'Capital Improvement Fund',
                y:759556,
              
            }, ]
        }],
        drilldown: {
            series: [{
                name: 'Operating Fund Accounts',
                id: 'Operating Fund Accounts',
                data: [
                    	{
            		name: 'General',
            		y: 92837,
            	
            	}, {
            		name: 'Simple',
            		y: 704,
            	
            	}, {
                    name: 'Payroll',
                    y: 3622,}
             ...