Hillary Clinton

Timeline for Hillary approval

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(1993,  2,  4),
                    to: Date.UTC(2001,  1,  4),
                    color: '#eee',
                    label: {
                        useHTML: true,
                        text: '<b>First Lady</b><br/>1993-2001',
                        textAlign: 'left',
                        align: 'left',
                        x: 10
                    }
                },{
                    from: Date.UTC(2001,  11,  4),
                    to: Date.UTC(2009,  1,  4),
                    color: '#eee',
                    label: {
                        useHTML: true,
                        text: '<b>U.S. Senator</b><br/>2001-2009',
                        textAlign: 'left',
                        align: 'left',
                        x: 10
                    }
                },{
                    from: Date.UTC(2009,  2,  4),
                    to: Date.UTC(2012,  11,  4),
                    color: '#eee',
                    label: {
                        useHTML: true,
                        text: '<b>Secretary of State</b><br/>2009-2012',
                        textAlign: 'left',
                        align: 'left',
                        x: 10
                    }
                }]
            },
            yAxis: {
                title: {
                    text: 'Approval Rating'
                },
                min: 0,
                max: 100
           ...