FiscalNote Pie 15-06-10 - Pie - RideSharing
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 seeking or prohibiting additional licensing of Uber/Lyft drivers</h1>
<h2>Transportation network companies cite additional driver licensing, registration, and permitting among causes for ceasing operations in a city. States are taking opposite approaches to these requirements.</h2>
<h2>Of 22 states with enacted or advancing legislation…</h2>
<div id="container" style="height: 200px;"></div>
<div class="footnote">Note: Reflects bills introduced through June 23, 2015</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;
margin-bottom: 0;
}
#graphic { width: 400px; margin: 0 15px;}
#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;
}
.footnote {
margin:0px 2px 15px;
font-size:0.7em;
line-height:1.5;
color:#aaa;
}
JavaScript
$(function () {
$('#container').highcharts({
chart: { type: 'pie',
marginTop: 0, marginBottom: 0, marginLeft:0,
marginRight:0},
colors: ['#592C5F', '#B5ADBC', '#6A5977', '#dfdfdf', '#50435A', '#dfdfdf'],
title: { text: '' },
subtitle: { enabled: false },
yAxis: {
min: 0,
title: {
text: 'Total # of bills',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
distance: 10,
useHTML: true,
formatter: function(){
return '<b>'+this.point.name+'</b> ('+this.y+')';
}
}
},
series: {
pointPadding: 0,
groupPadding: 0.1
}
},
tooltip: { enabled: false },
legend: { enabled: false },
credits: { enabled: false },
xAxis: { title: { text: null } },
series: [{
name: 'Year 1800',
data: [
['License or permit<br/>required statewide', 4],
['Only business license<br/>requirement allowed', 2],
['Prohibiting municipality<br/>requirements', 4],
['No mention<br/>of permitting;<br/>still at discretion<br/>of municipalities<br/>', 13]
]
/* {
y: 216.4,
color: '#BF0B23'
} */
}]
});
});