A basic HTML bar chart. Part of the Let’s Make a Bar Chart tutorial.
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
// TODO: add description of this library | |
// TODO: add README.md | |
// TODO: don't allow any hovering until the entire chart is drawn and done animating | |
var D3Chart = function (options) { | |
// options not yet needed | |
// ---------------------------------------------------- |
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
// TODO: add description of this library | |
// TODO: add README.md | |
// TODO: don't allow any hovering until the entire chart is drawn and done animating | |
var D3Chart = function (options) { | |
// options not yet needed | |
// ---------------------------------------------------- |
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
[ | |
{ | |
"a": "-1", | |
"b": "5", | |
"c": "1.35", | |
"d": "1187" | |
}, | |
{ | |
"a": "2", | |
"b": "100", |
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
[ | |
{ | |
"rank": 1, | |
"name": "Boston Marathon (4\/21\/14 - Boston, MA)", | |
"bostonQualifiers": 11.053, | |
"qualifyingPercent": "35.7%" | |
}, | |
{ | |
"rank": 2, | |
"name": "Pocono Mountain Run For The Red Marathon (5\/18\/14 - Pocono Mountains, PA)", |
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
// show how | |
$('body').append('<div id="elem"></div>'); | |
var el = $('#elem'); | |
// this pattern makes it difficult to unit test the console.log | |
function someFunction1() { | |
var localVar1 = "a", |