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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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> | |
<script > | |
// Check that we have a supported browser | |
(function() { | |
var ua = window.navigator.userAgent, | |
in_chrome = /chrome/i.test(ua), | |
in_chrome_frame = /chromeframe/i.test(ua), // Notice inChrome is true if inChromeFrame is | |
in_ie = /msie/i.test(ua), |
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> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.0.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.csv.js?2.0.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js?2.0.0"></script> | |
<style type="text/css"> | |
body { | |
font: 10px sans-serif; |
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
// | |
// Chart example | |
// | |
// - Shows multiple lines in one chart | |
// - User can see scale showing the values and the timeframe | |
// - Each line has separate color | |
// - Show legend of groups with colors | |
// - Support transitions to: | |
// - Change data shown | |
// - Change the items shown (keep colors for old ones) |