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 src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<title>barStack</title> | |
<style> | |
.axis text { | |
font: 10px sans-serif; | |
} | |
.axis path, .axis line { |
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> | |
<title>D3 + Leaflet (fork from bost.ocks.org/mike/leaflet/)</title> | |
<style> | |
#map { width: 960px; height: 500px;} | |
path { fill: #000; fill-opacity: .2; stroke: #fff; stroke-width: 1.5px;} | |
path:hover { fill: brown;fill-opacity: .7;} | |
</style> | |
<p id="map"><p> | |
<script src="http://d3js.org/d3.v2.min.js?2.9.3"></script> | |
<script src="leaflet.js"></script> |
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() { | |
// D3.layout.force3d.js | |
// (C) 2012 [email protected] | |
// BSD license (http://opensource.org/licenses/BSD-3-Clause) | |
d3.layout.force3d = function() { | |
var forceXY = d3.layout.force() | |
,forceZ = d3.layout.force() | |
,zNodes = {} | |
,zLinks = {} |
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
/* global d3 */ | |
var svg=d3.select("body") | |
.append("svg") | |
.style("width","100%"); | |
var nodes = d3.range(400).map(function(d,i) { | |
var radius = Math.random()*10+5 + (i<0 ? 55 : 0), | |
x=Math.random()*300+radius, | |
y=Math.random()*300+radius; | |
return {radius:radius,mass:radius,x:x,y:y,px:x+Math.random()*2,py:y+Math.random()*2}; |
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
/* | |
Newtonian collision checking (draft) | |
based on the paper: http://www.vobarian.com/collisions/2dcollisions2.pdf | |
[email protected] | |
*/ | |
if (typeof d3.z != "object") d3.z = {}; | |
(function() { |
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() { | |
d3.force_labels = function force_labels() { | |
var labels = d3.layout.force(); | |
// Update the position of the anchor based on the center of bounding box | |
function updateAnchor() { | |
if (!labels.selection) return; | |
labels.selection.each(function(d) { | |
var bbox = this.getBBox(), | |
x = bbox.x + bbox.width / 2, |
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
<html> | |
<head><script type="text/javascript" src="https://raw.github.com/gist/1595803/d3mod.js"></script></head> | |
<body> | |
<script type="text/javascript"> | |
d3.select("body") | |
.append("svg:svg") | |
.property("__chart__",function() { | |
return { |
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(){if (!Date.now) Date.now = function() { | |
return +new Date; | |
}; | |
try { | |
document.createElement("div").style.setProperty("opacity", 0, ""); | |
} catch (error) { | |
var d3_style_prototype = CSSStyleDeclaration.prototype, | |
d3_style_setProperty = d3_style_prototype.setProperty; | |
d3_style_prototype.setProperty = function(name, value, priority) { | |
d3_style_setProperty.call(this, name, value + "", priority); |
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> | |
<script type="text/javascript" src="multiplot.js"></script> | |
</head> | |
<body></body> | |
<script type="text/javascript"> |
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?1.29.1"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script> |