Permalink
Browse files

Update to 1.27.2.

  • Loading branch information...
1 parent 6059265 commit 69be02fae35fba879e6be841c257b0aeac9b9e1c @mbostock mbostock committed Jul 17, 2011
View
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>d3.js{% if page.title %} ~ {{ page.title }}{% endif %}</title>
- <script type="text/javascript" src="../d3.js?1.27.1"></script>
+ <script type="text/javascript" src="../d3.js?1.27.2"></script>
<style type="text/css">
@import url("../style.css?1.10.0");
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>d3.js{% if page.title %} ~ {{ page.title }}{% endif %}</title>
- <script type="text/javascript" src="d3.js?1.27.1"></script>
+ <script type="text/javascript" src="d3.js?1.27.2"></script>
<style type="text/css">
@import url("style.css?1.10.0");
View
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>d3.js{% if page.title %} ~ {{ page.title }}{% endif %}</title>
- <script type="text/javascript" src="../d3.js?1.27.1"></script>
+ <script type="text/javascript" src="../d3.js?1.27.2"></script>
<style type="text/css">
@import url("../style.css?1.10.0");
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>d3.js{% if page.title %} ~ {{ page.title }}{% endif %}</title>
- <script type="text/javascript" src="../d3.js?1.27.1"></script>
+ <script type="text/javascript" src="../d3.js?1.27.2"></script>
<style type="text/css">
@import url("../style.css?1.10.0");
View
@@ -712,13 +712,13 @@ d3.chart.horizon = function() {
};
horizon.width = function(x) {
- if (!arguments.length) return width;
+ if (!arguments.length) return w;
w = +x;
return horizon;
};
horizon.height = function(x) {
- if (!arguments.length) return height;
+ if (!arguments.length) return h;
h = +x;
return horizon;
};
View
Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-(function(){d3 = {version: "1.27.1"}; // semver
+(function(){d3 = {version: "1.27.2"}; // semver
if (!Date.now) Date.now = function() {
return +new Date;
};
@@ -1332,7 +1332,7 @@ function d3_selection(groups) {
for (i = 0; i < n; i++) {
key = join.call(node = group[i], node.__data__, i);
if (key in nodeByKey) {
- exitNodes[j++] = group[i]; // duplicate key
+ exitNodes[j++] = node; // duplicate key
} else {
nodeByKey[key] = node;
}
@@ -1932,7 +1932,7 @@ function d3_transition(groups) {
var owner = tx.owner;
if (owner === transitionId) {
delete this.__transition__;
- if (remove) this.parentNode.removeChild(this);
+ if (remove && this.parentNode) this.parentNode.removeChild(this);
}
d3_transitionInheritId = transitionId;
event.end.dispatch.apply(this, arguments);
View
@@ -560,12 +560,18 @@ function d3_layout_forceAccumulate(quad) {
cy = 0;
quad.count = 0;
if (!quad.leaf) {
- quad.nodes.forEach(function(c) {
+ var nodes = quad.nodes,
+ n = nodes.length,
+ i = -1,
+ c;
+ while (++i < n) {
+ c = nodes[i];
+ if (c == null) continue;
d3_layout_forceAccumulate(c);
quad.count += c.count;
cx += c.count * c.cx;
cy += c.count * c.cy;
- });
+ }
}
if (quad.point) {
// jitter internal nodes that are coincident
@@ -669,6 +675,7 @@ d3.layout.pie = function() {
// Compute the arcs!
var arcs = index.map(function(i) {
return {
+ data: data[i],
value: d = values[i],
startAngle: a,
endAngle: a += d * k
@@ -1712,8 +1719,9 @@ d3.layout.treemap = function() {
// Recursively compute the node area based on value & scale.
function scale(node, k) {
- var children = node.children;
- node.area = node.value * k;
+ var children = node.children,
+ value = node.value;
+ node.area = isNaN(value) || value < 0 ? 0 : value * k;
if (children) {
var i = -1,
n = children.length;
@@ -1789,7 +1797,9 @@ d3.layout.treemap = function() {
}
s *= s;
u *= u;
- return Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio));
+ return rmin || rmax
+ ? Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio))
+ : Infinity;
}
// Positions the specified row of nodes. Modifies `rect`.
View
Oops, something went wrong.
View
Oops, something went wrong.
View
@@ -13,8 +13,8 @@ title: Box Plots
<link type="text/css" rel="stylesheet" href="button.css"/>
<link type="text/css" rel="stylesheet" href="box.css"/>
-<script type="text/javascript" src="../d3.csv.js?1.27.1"> </script>
-<script type="text/javascript" src="../d3.chart.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.csv.js?1.27.2"> </script>
+<script type="text/javascript" src="../d3.chart.js?1.27.2"> </script>
<script type="text/javascript" src="box.js"> </script>
Data from the [Michelson–Morley experiment](http://en.wikipedia.org/wiki/Michelson%E2%80%93Morley_experiment).
View
@@ -7,7 +7,7 @@ title: Bubble Chart
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="bubble.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="bubble.js"> </script>
Implementation based on work by [Jeff Heer](http://jheer.org/). Data shows the
View
@@ -13,7 +13,7 @@ title: Bullet Charts
<link type="text/css" rel="stylesheet" href="button.css"/>
<link type="text/css" rel="stylesheet" href="bullet.css"/>
-<script type="text/javascript" src="../d3.chart.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.chart.js?1.27.2"> </script>
<script type="text/javascript" src="bullet.js"> </script>
Layout inspired by [Stephen Few](http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf).
@@ -8,8 +8,8 @@ title: Calendar View
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="calendar.css"/>
<link type="text/css" rel="stylesheet" href="colorbrewer.css"/>
-<script type="text/javascript" src="../d3.csv.js?1.27.1"> </script>
-<script type="text/javascript" src="../d3.time.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.csv.js?1.27.2"> </script>
+<script type="text/javascript" src="../d3.time.js?1.27.2"> </script>
<script type="text/javascript" src="calendar.js"> </script>
<script type="text/javascript" src="dji.js"> </script>
@@ -7,8 +7,8 @@ title: Non-Contiguous Cartogram
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="cartogram.css"/>
-<script type="text/javascript" src="../d3.geo.js?1.27.1"> </script>
-<script type="text/javascript" src="../d3.geom.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.geo.js?1.27.2"> </script>
+<script type="text/javascript" src="../d3.geom.js?1.27.2"> </script>
<script type="text/javascript" src="cartogram.js"> </script>
Inspired by [Zachary Johnson](http://indiemaps.com/blog/2011/02/noncontiguous-cartograms-in-openlayers-and-polymaps/).
View
@@ -7,7 +7,7 @@ title: Chord Diagram
<div id="chart"> </div>
<link type="text/css" rel="stylesheet" href="chord.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="chord.js"> </script>
Layout inspired by [Martin Krzywinski](http://mkweb.bcgsc.ca/)'s beautiful
@@ -8,7 +8,7 @@ title: Choropleth
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="choropleth.css"/>
<link type="text/css" rel="stylesheet" href="colorbrewer.css"/>
-<script type="text/javascript" src="../d3.geo.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.geo.js?1.27.2"> </script>
<script type="text/javascript" src="choropleth.js"> </script>
Choropleth design invented by [Charles Dupin](http://en.wikipedia.org/wiki/Charles_Dupin).
View
@@ -7,7 +7,7 @@ title: Dendrogram
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="cluster.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="cluster.js"> </script>
Data shows the [Flare](http://flare.prefuse.org/) class hierarchy, courtesy
View
@@ -7,8 +7,8 @@ title: Force-Directed Graph
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="force.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
-<script type="text/javascript" src="../d3.geom.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
+<script type="text/javascript" src="../d3.geom.js?1.27.2"> </script>
<script type="text/javascript" src="force.js"> </script>
Layout algorithm inspired by [Tim Dwyer](http://www.csse.monash.edu.au/~tdwyer/) and
View
@@ -7,7 +7,7 @@ title: Circle Packing
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="pack.css?1"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="pack.js"> </script>
Implementation based on work by [Jeff Heer](http://jheer.org/). Data shows the
View
@@ -16,7 +16,7 @@ title: Stacked Bars
<link type="text/css" rel="stylesheet" href="stack.css"/>
<link type="text/css" rel="stylesheet" href="button.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="stream_layers.js"> </script>
<script type="text/javascript" src="stack.js"> </script>
View
@@ -13,7 +13,7 @@ title: Streamgraph
<link type="text/css" rel="stylesheet" href="stream.css"/>
<link type="text/css" rel="stylesheet" href="button.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="stream_layers.js"> </script>
<script type="text/javascript" src="stream.js"> </script>
@@ -15,7 +15,7 @@ title: Sunburst
</div>
<link type="text/css" rel="stylesheet" href="button.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="sunburst.js"> </script>
Sunburst design by [John Stasko](http://www.cc.gatech.edu/gvu/ii/sunburst/).
View
@@ -7,7 +7,7 @@ title: Node-Link Tree
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="tree.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="tree.js"> </script>
Implementation based on work by [Jeff Heer](http://jheer.org/) and
View
@@ -16,7 +16,7 @@ title: Treemap
<link type="text/css" rel="stylesheet" href="button.css"/>
<link type="text/css" rel="stylesheet" href="treemap.css"/>
-<script type="text/javascript" src="../d3.layout.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.layout.js?1.27.2"> </script>
<script type="text/javascript" src="treemap.js"> </script>
Treemap design invented by [Ben Shneiderman](http://www.cs.umd.edu/~ben/).
View
@@ -8,7 +8,7 @@ title: Voronoi Diagram
<div class="gallery" id="chart"> </div>
<link type="text/css" rel="stylesheet" href="colorbrewer.css"/>
<link type="text/css" rel="stylesheet" href="voronoi.css"/>
-<script type="text/javascript" src="../d3.geom.js?1.27.1"> </script>
+<script type="text/javascript" src="../d3.geom.js?1.27.2"> </script>
<script type="text/javascript" src="voronoi.js"> </script>
Colors by [Cynthia Brewer](http://colorbrewer.org/). Voronoi design

0 comments on commit 69be02f

Please sign in to comment.