This file contains hidden or 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"></script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| var svg = d3.select("body").append("svg") | |
| .attr("width", 100) | |
| .attr("height", 100); |
This file contains hidden or 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
| .domain{ | |
| display: none; | |
| } |
This file contains hidden or 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
| <!-- Override Gist styling --> | |
| <style type="text/css"> | |
| iframe{background-color: #0a0a0a;} | |
| div.gist-syntax {background-color:#0a0a0a!important;} | |
| div.gist {color:#ccc!important;} | |
| span.nt, span.kd, span.k, span.o{color:aliceblue!important;} | |
| .gist .gist-file{border-color:#444!important;} | |
| .gist .gist-file .gist-meta{background-color:#0a0a0a!important;} | |
| </style> |
This file contains hidden or 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() { | |
| var φ = 1.618033988749895, | |
| ρ = 180 / Math.PI; | |
| var vertices = [ | |
| [1,φ,0], [-1,φ,0], [1,-φ,0], [-1,-φ,0], | |
| [0,1,φ], [0,-1,φ], [0,1,-φ], [0,-1,-φ], | |
| [φ,0,1], [-φ,0,1], [φ,0,-1], [-φ,0,-1] | |
| ]; |
This file contains hidden or 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"></script> | |
| </head> | |
| <body> | |
| <div class="viz"></div> | |
| <script type="text/javascript"> | |
| var sampleSVG = d3.select(".viz") |
This file contains hidden or 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
| wl | intensity | r | g | b | |
|---|---|---|---|---|---|
| 300.0 | 11596267742211.613 | 0 | 0 | 0 | |
| 301.00143061516451 | 11726043308732.258 | 0 | 0 | 0 | |
| 302.00286123032902 | 11855744306329.936 | 0 | 0 | 0 | |
| 303.00429184549358 | 11985353849584.15 | 0 | 0 | 0 | |
| 304.00572246065803 | 12114855226784.52 | 0 | 0 | 0 | |
| 305.0071530758226 | 12244231903068.889 | 0 | 0 | 0 | |
| 306.00858369098711 | 12373467523405.512 | 0 | 0 | 0 | |
| 307.01001430615162 | 12502545915422.795 | 0 | 0 | 0 | |
| 308.01144492131618 | 12631451092087.922 | 0 | 0 | 0 |
This file contains hidden or 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
| // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map | |
| // Production steps of ECMA-262, Edition 5, 15.4.4.19 | |
| // Reference: http://es5.github.com/#x15.4.4.19 | |
| if (!Array.prototype.map) { | |
| Array.prototype.map = function(callback, thisArg) { | |
| var T, A, k; | |
| if (this == null) { | |
| throw new TypeError(" this is null or not defined"); |
This file contains hidden or 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
| describe('New Pivot Function', function() { | |
| var pivot, data, columnNames; | |
| beforeEach(function () { | |
| data = [ | |
| ['P1', 'R1', 'T1', 10, 3], | |
| ['P1', 'R1', 'T2', 20, 12], | |
| ['P1', 'R2', 'T1', 3, 1], | |
| ['P2', 'R2', 'T2', 4, 40]]; |
This file contains hidden or 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 Table = function module() { | |
| var dispatch = d3.dispatch("edit"); | |
| function exports(_selection) { | |
| _selection.each(function (_dataset) { | |
| //________________________________________________ | |
| // Data | |
| //________________________________________________ | |
| var data = _dataset[0]; |