Trust in Government

by Adam Nekola

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

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

JavaScript

$(function () {
        $('#container').highcharts({
            chart: {
                type: 'line'
            },
            title: {
                text: ''
            },
            subtitle: {
                enabled: false
            },
            legend: {
                enabled: false
            },
            exporting: {
                enabled: false
            },
            credits: {
                enabled: false
            },
            xAxis: {
                type: 'datetime',
                plotBands: [{
                    from: Date.UTC(1953,  0,  20),
                    to: Date.UTC(1961,  0,  20),
                    color: '#EEECE4',
                    label: {
                        useHTML: true,
                        text: '<b>Eisenhower</b><br/>1953-1961',
                        textAlign: 'left',
                        align: 'left',
                        x: 10,
                        style: {
                            fontSize: '0.8em'   
                        }
                    }
                },{
                    from: Date.UTC(1961,  0,  20),
                    to: Date.UTC(1963,  10,  22),
                    color: '#F8F7F4',
                    label: {
                        useHTML: true,
                        text: '<b>Kennedy</b><br/>1961-1963',
                        textAlign: 'left',
                        align: 'left',
                        x: 10,
                        style: {
                            fontSize: '0.8em'   
                        }
                    }
                },{
                    from: Date.UTC(1963,  10,  11),
                    to: Date.UTC(1969,  0,  20),
                    color: '#F8F7F4',
                    label: {
                        useHTML: true,
                        text: '<b>Johnson</b><br/>1963-1969',
                        textAlign: 'left',
                        align: 'left',
                        x: 10,
       ...