Created
December 14, 2017 22:01
-
-
Save bradoyler/77b0805c8c9dfb5d65195ad45a7e645c to your computer and use it in GitHub Desktop.
U.S. Airline Quality Scores (2016) U.S. Airline Quality Scores (2016) // source http://jsbin.com/lajovir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="U.S. Airline Quality Scores (2016)"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.3/d3.min.js"></script> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/billboard.js/1.1.1/billboard.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/billboard.js/1.1.1/billboard.min.js"></script> | |
<title>U.S. Airline Quality Scores (2016)</title> | |
</head> | |
<body> | |
<h3>U.S. Airline market share (2016 Passengers)</h3> | |
<div id="bbchart3" style="max-width:940px; margin:auto;"></div> | |
<script id="jsbin-javascript"> | |
'use strict'; | |
var data = [['Southwest', 151740277], ['United', 99769952], ['American', 144189749], ['Delta', 142286020], ['JetBlue', 38241080], ['Alaska', 24370439], ['SkyWest', 31204880], ['Other', 299051986]]; | |
bb.generate({ | |
data: { | |
columns: data, | |
type: 'pie' | |
}, | |
pie: { | |
label: { | |
format: function format(value, ratio, id) { | |
return id; | |
} | |
} | |
}, | |
bindto: '#bbchart3' | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">const data = [ | |
['Southwest', 151740277], | |
['United', 99769952], | |
['American', 144189749], | |
['Delta', 142286020], | |
['JetBlue', 38241080], | |
['Alaska', 24370439], | |
['SkyWest', 31204880], | |
['Other', 299051986] | |
] | |
bb.generate({ | |
data: { | |
columns: data, | |
type: 'pie' | |
}, | |
pie: { | |
label: { | |
format: function (value, ratio, id) { | |
return id | |
} | |
} | |
}, | |
bindto: '#bbchart3' | |
})</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var data = [['Southwest', 151740277], ['United', 99769952], ['American', 144189749], ['Delta', 142286020], ['JetBlue', 38241080], ['Alaska', 24370439], ['SkyWest', 31204880], ['Other', 299051986]]; | |
bb.generate({ | |
data: { | |
columns: data, | |
type: 'pie' | |
}, | |
pie: { | |
label: { | |
format: function format(value, ratio, id) { | |
return id; | |
} | |
} | |
}, | |
bindto: '#bbchart3' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment