FiscalNote Bar 15-5-29 - Right to Work - Unions

by Adam Nekola

HTML

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

<script src="//use.typekit.net/ljj7qii.js"></script>
<script>try{Typekit.load();}catch(e){}</script>

<div id="graphic">
    <h1>Percent of U.S. workers with a union membership</h1>
    <h2>The unionization rate in the United States peaked at 35% in the mid-1950s and has been experiencing a steady decline since – hitting a new low in 2014.</h2>
    <div id="container" style="height: 200px;"></div>
 <!--   <h3>Note: 2015 number includes reported cases through Feb. 9</h3>-->
    <div id="credit">Source: Bureau of Labor Statistics
        <img src="http://localhost:3000/assets/logos/logofull_153.png"/>
    </div>
</div>

CSS

* {
    font-family: Helvetica,sans-serif;
}
h1 {
color: #333333;
line-height:125%;
font-size: 1.2em;
font-weight: bold;
}
h2 {
color: #aaa;
font-size: 0.9em;
line-height:135%;
font-weight: 100;
}
h3 {
color: #aaa;
font-size: 0.7em;
line-height:135%;
font-weight: 100;
margin: 0 10px 10px;
}
#graphic { width: 550px; }
#graphic .wide { width: 600px; }
#credit {
    padding: 10px;
    background:#f4f4f4;
    font-size:0.7em;
    line-height:20px;
    color:#aaa;
}
#credit img {
    height: 20px;
    width:auto;
    float:right;
}

JavaScript

$(function () {
    $('#container').highcharts({
        chart: { type: 'area' },
        colors: ['#9C91A5', '#B5ADBC'],
        title: { text: '' },
        subtitle: { enabled: false },
        yAxis: {
            min: 0,
            max: 25,
            endOnTick: false,
            title: {
                text: 'Percent of workers in unions',
                align: 'high'
            },
            labels: {
                overflow: 'justify'
            }
        },
        plotOptions: {
            area: {
                dataLabels: {
                    enabled: true,
                    color: '#793c82'
                },
                marker: {enabled:false}
            },
            series: {
                pointPadding: 0,
                groupPadding: 0.1
            }
        },
        tooltip: { enabled: false },
        legend: { enabled: false },
        credits: { enabled: false },
        xAxis: {
            categories: ['1983','','1985','','1987','','1989','','1991','','1993','','1995','','1997','','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015'],
            title: { text: null }
        },
        series: [{
            name: '',
            data: [20.1,18.8,18,17.5,17,16.8,16.4,16,16,15.7,15.7,15.5,14.9,14.5,14.1,13.9,13.9,13.4,13.3,13.3,12.9,12.5,12.5,12,12.1,12.4,12.3,11.9,11.8,11.3,11.3,{ y: 11.1, color: '#846f94', marker:{enabled:true}}]
            
          /*   {
                y: 216.4,
                color: '#BF0B23'
            } */
        }]
    });
});