One day this'll be a network graph of The Very Many Varieties of Beer poster by Pop Chart Lab
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
var diff = require('virtual-dom/diff'); | |
var patch = require('virtual-dom/patch'); | |
var createElement = require('virtual-dom/create-element'); | |
var virtualize = require('vdom-virtualize'); | |
// 1: Create a function that declares what the DOM should look like | |
function render(count) { | |
var html = '<div id="test">Count is <span>' + count + '</span></div>'; | |
return virtualize.fromHTML(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
define('components/ui/add_profile', function(require) { | |
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
// var defineComponent = require('flight/lib/component'); | |
// Using flight global from standalone lib for demo purposes. | |
var defineComponent = flight.component; |
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
group | date | value | |
---|---|---|---|
1 | 2008-01 | 10 | |
1 | 2008-04 | 8 | |
1 | 2008-07 | 14 | |
1 | 2008-10 | 9 | |
1 | 2009-01 | 10 | |
1 | 2009-04 | 8 | |
1 | 2009-07 | 14 | |
1 | 2009-10 | 9 | |
2 | 2008-01 | 3 |
This line chart is constructed from a TSV file storing the daily average temperatures of New York, San Francisco and Austin over the last year. The chart employs conventional margins and a number of D3 features:
- d3.tsv - load and parse data
- d3.time.format - parse dates
- d3.time.scale - x-position encoding
- d3.scale.linear - y-position encoding
- d3.scale.category10, a d3.scale.ordinal - color encoding
- d3.extent, d3.min and d3.max - compute domains
- [d3.k
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://d3js.org/d3.v2.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/cfergus/d3-plugins/master/sankey/sankey.js"></script> | |
<title>Sankey Diagram</title> | |
<style> |
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
<html> | |
<head> | |
<title>Bar Chart</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script> | |
<style type="text/css"> | |
body { | |
font: 10px sans-serif; | |
} |
[ Launch: just another inlet to tributary ] 4533024 by jfsiiiNo Previous Gist
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
<html> | |
<head> | |
<script src='http://code.jquery.com/jquery-1.5.1.min.js'></script> | |
</head> | |
<body> | |
<h2>Naive canvas</h2> | |
<canvas id="naive" width="400" height="50"></canvas> | |
<h2>High-def Canvas</h2> |
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
(function () { | |
/*! | |
* expose.js | |
* | |
* @author Oleg Slobodskoi | |
* @website https://github.com/kof/expose.js | |
* @licence Dual licensed under the MIT or GPL Version 2 licenses. | |
*/ | |
function expose(namespace, api) { | |
var env = {}; |
NewerOlder