FiscalNote Bar 15-3-24 - Powdered Alcohol
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>States considering powdered alcohol bans</h1>
<h2>After the Alcohol and Tobacco Tax and Trade Bureau issued an approval of Palcohol packaging, three states quickly approved bills banning the substance. Twenty more are considering legislation.</h2>
<div id="container" style="height: 200px;"></div>
<h3>Note: Reflects bills includes through March 24, 2015</h3>
<div id="credit">Source: FiscalNote Prophecy
<img src="http://localhost:3000/assets/logos/logofull_153.png"/>
</div>
</div>
CSS
* {
font-family: "proxima-nova",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: 'column' },
colors: ['#9C91A5', '#B5ADBC'],
title: { text: '' },
subtitle: { enabled: false },
yAxis: {
min: 0,
title: {
text: 'Total # of Measles Cases',
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: ['2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015'],
title: { text: null }
},
series: [{
name: '',
data: [116,44,56,37,66,55,43,140,71,63,220,55,188,644,{ y: 121, color: '#50435A'}]
/* {
y: 216.4,
color: '#BF0B23'
} */
}]
});
});