FiscalNote 15-05-29 - Right to Work
by Adam Nekola
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="//use.typekit.net/zht7wtz.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<div id="graphic">
<h1>Proposed ‘right-to-work’ legislation in 2015</h1>
<h2>While no state legislature seems to have the support to alter anything this year, 18 states entertained the idea of changing their 'right-to-work' status quo.</h2>
<div id="container" style="height: 150px;"></div>
<div id="credit">Source: FiscalNote Prophecy
<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;
}
#graphic { width: 300px; }
#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: 'bar' },
colors: ['#AC6FB5', '#B5ADBC'],
title: { text: '' },
subtitle: { enabled: false },
yAxis: {
min: 0,
title: {
text: 'Total # of states',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
},
series: {
pointPadding: 0,
groupPadding: 0.1
}
},
tooltip: { enabled: false },
legend: { enabled: false },
credits: { enabled: false },
xAxis: {
categories: ['Would enact','Would repeal','Would modify'],
title: { text: null }
},
series: [{
name: 'Year 1800',
data: [13,2,3]
/* {
y: 216.4,
color: '#BF0B23'
} */
}]
});
});