ONA 16 Board - Revenue

by Adam Nekola

HTML

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

<div id="container" style="width: 500px; height: 350px; margin: 0 auto"></div>

JavaScript

$(function () {

    Highcharts.setOptions({
        lang: {
            thousandsSep: ","
        }
    });
    
    Highcharts.chart('container', {
        title: {
            text: 'Total Revenue',
            align: 'left',
            style: {
            	fontWeight: 800,
              fontSize: "2em"
            }
        },
        series: [{
            name: 'Total Revenue',
            data: [2.2, 2.6, 2.9],
            dataLabels: {
                enabled: true,
                color: '#213563',
                align: 'right',
                format: '${point.y:,.1f}M', // one decimal
                y: 45, // 10 pixels down from the top
                x: 22,
                style: {
                    fontSize: '23px',
                    textOutline: 0
                }
            },
            marker: {
            	fillColor: '#213563' 
            }
        }],
        xAxis: {
            categories: [
                '2014',
                '2015',
                '2016'
            ],
        		tickLength: 0,
            lineColor: "#eeeeee"
        },
        yAxis: {
            min: 0,
            max: 3,
            endOnTick: false,
            title: {
              text: 'Total Revenue (in millions)',
            	align: "low"
            }
        },
        chart: {
            type: 'area',
            style: {
            	fontFamily: "\"Source Sans Pro\", Verdana, Arial, Helvetica, sans-serif"
            }
        },
        plotOptions: {
            column: {
                pointPadding: 0,
                borderWidth: 0
            }
        },
        colors: ["#63bad6"],
        tooltip: { enabled: false },
        credits: { enabled: false },
        legend:  { enabled: false },
        subtitle: { text: '' }
    });
});