Permalink
Browse files

Merge branch 'release'

  • Loading branch information...
2 parents 817358a + 33ab885 commit fe671a70e236710412a514fa276e59f875f3c617 @mbostock mbostock committed Nov 30, 2011
Showing with 535 additions and 529 deletions.
  1. +14 −14 d3.js
  2. +2 −2 d3.min.js
  3. +4 −4 examples/albers/albers.html
  4. +4 −4 examples/area/area-radial.html
  5. +10 −10 examples/area/area.html
  6. +4 −4 examples/axis/axis-alternating.html
  7. +5 −5 examples/axis/axis-ggplot2.html
  8. +6 −6 examples/axis/axis-multiples.html
  9. +6 −6 examples/axis/axis-orientations.html
  10. +9 −9 examples/axis/axis-transition.html
  11. +3 −3 examples/azimuthal/azimuthal.js
  12. +10 −10 examples/bar/bar-hierarchy.html
  13. +3 −3 examples/bonne/bonne.html
  14. +2 −2 examples/box/box.js
  15. +6 −6 examples/brush/brush-ordinal.html
  16. +5 −5 examples/brush/brush-x.html
  17. +5 −5 examples/brush/brush-y.html
  18. +6 −6 examples/brush/brush.html
  19. +5 −5 examples/bubble/bubble.js
  20. +5 −5 examples/bullet/bullet.js
  21. +5 −5 examples/bundle/bundle-radial.js
  22. +2 −2 examples/bundle/bundle-treemap.js
  23. +8 −8 examples/calendar/dji-area.html
  24. +6 −6 examples/calendar/dji.js
  25. +6 −6 examples/calendar/vix.js
  26. +7 −7 examples/cartogram/cartogram.js
  27. +2 −2 examples/cartogram/demers.js
  28. +3 −3 examples/cartogram/dorling.js
  29. +6 −6 examples/chord/chord-flare.html
  30. +11 −11 examples/chord/chord.js
  31. +4 −4 examples/choropleth/choropleth-area.html
  32. +3 −3 examples/choropleth/choropleth-bounds.html
  33. +5 −5 examples/choropleth/choropleth.js
  34. +5 −5 examples/clock/clock.js
  35. +6 −6 examples/cluster/cluster-radial.js
  36. +6 −6 examples/cluster/cluster.js
  37. +4 −4 examples/contour/contour.html
  38. +8 −8 examples/crimea/crimea-stacked-area.html
  39. +8 −8 examples/crimea/crimea-stacked-bar.html
  40. +3 −3 examples/delaunay/delaunay.html
  41. +3 −3 examples/donut/donut.html
  42. +10 −10 examples/dot/dot.html
  43. +2 −2 examples/drag/drag.html
  44. +3 −3 examples/force/force-bounds.html
  45. +7 −7 examples/force/force-cluster.html
  46. +3 −3 examples/force/force-collapsible.html
  47. +5 −5 examples/force/force-dynamic.html
  48. +4 −4 examples/force/force-map.html
  49. +2 −2 examples/force/force-multi-foci.html
  50. +4 −4 examples/force/force.js
  51. +5 −5 examples/great-arc/great-arc.html
  52. +2 −2 examples/hello-world/hello-data-key.html
  53. +2 −2 examples/hello-world/hello-data.html
  54. +2 −2 examples/hello-world/hello-event.html
  55. +2 −2 examples/hello-world/hello-sort.html
  56. +2 −2 examples/hello-world/hello-transform.html
  57. +4 −4 examples/histogram/histogram.html
  58. +1 −1 examples/horizon/horizon.js
  59. +3 −3 examples/hull/hull.html
  60. +4 −4 examples/kde/kde.js
  61. +9 −9 examples/line/line.js
  62. +11 −11 examples/marimekko/marimekko.html
  63. +12 −12 examples/marker/marker.html
  64. +5 −5 examples/mercator/mercator.html
  65. +5 −5 examples/moire/moire.html
  66. +6 −6 examples/pack/pack.js
  67. +10 −10 examples/parallel/parallel.html
  68. +2 −2 examples/partition/partition-icicle-zoom.html
  69. +2 −2 examples/partition/partition-icicle.html
  70. +3 −3 examples/partition/partition-sunburst-zoom.html
  71. +3 −3 examples/partition/partition-sunburst.js
  72. +3 −3 examples/pie/pie-transition.html
  73. +4 −4 examples/pie/pie.html
  74. +13 −13 examples/population/population.js
  75. +5 −5 examples/qq/qq.js
  76. +4 −4 examples/quadtree/quadtree.html
  77. +13 −13 examples/showreel/showreel.html
  78. +2 −2 examples/sort/sort.js
  79. +4 −4 examples/spline/spline.js
  80. +7 −7 examples/splom/splom.js
  81. +6 −6 examples/stream/stack.js
  82. +2 −2 examples/stream/stream.js
  83. +10 −10 examples/superformula/dot.html
  84. +2 −2 examples/superformula/explorer.html
  85. +4 −4 examples/superformula/superformula.html
  86. +5 −5 examples/symbol-map/symbol-map.html
  87. +2 −2 examples/touch/touch.html
  88. +2 −2 examples/transform/test.html
  89. +2 −2 examples/transform/transform.html
  90. +5 −5 examples/tree/tree-dynamic.html
  91. +6 −6 examples/tree/tree-interactive.html
  92. +6 −6 examples/tree/tree-radial.js
  93. +6 −6 examples/tree/tree.js
  94. +5 −5 examples/treemap/treemap-svg.js
  95. +3 −3 examples/voroboids/voroboids.js
  96. +3 −3 examples/voronoi/voronoi.js
  97. +10 −10 examples/zoom-pan/zoom-pan-transform.html
  98. +11 −11 examples/zoom-pan/zoom-pan.html
  99. +9 −9 examples/zoom/zoom.html
  100. +1 −1 package.json
  101. +1 −1 src/core/core.js
  102. +3 −3 src/core/interpolate.js
  103. +1 −1 src/scale/log.js
  104. +5 −5 src/svg/axis.js
  105. +3 −3 src/svg/brush.js
  106. +1 −1 src/svg/mouse.js
  107. +2 −0 test/core/interpolate-test.js
  108. +4 −0 test/scale/log-test.js
View
@@ -10,7 +10,7 @@ try {
d3_style_setProperty.call(this, name, value + "", priority);
};
}
-d3 = {version: "2.6.0"}; // semver
+d3 = {version: "2.6.1"}; // semver
var d3_array = d3_arraySlice; // conversion for NodeLists
function d3_arrayCopy(pseudoarray) {
@@ -977,9 +977,9 @@ function d3_interpolateByName(n) {
d3.interpolators = [
d3.interpolateObject,
function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },
- function(a, b) { return (typeof b === "string") && d3.interpolateString(a + "", b); },
- function(a, b) { return (typeof b === "string" ? b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a + "", b); },
- function(a, b) { return (typeof b === "number") && d3.interpolateNumber(+a, b); }
+ function(a, b) { return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + ""); },
+ function(a, b) { return (typeof b === "string" ? b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b); },
+ function(a, b) { return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b); }
];
function d3_uninterpolateNumber(a, b) {
b = b - (a = +a) ? 1 / (b - a) : 0;
@@ -2542,7 +2542,7 @@ function d3_scale_log(linear, log) {
if (arguments.length < 2) format = d3_scale_logFormat;
if (arguments.length < 1) return format;
var k = n / scale.ticks().length,
- f = log === d3_scale_logn ? (e = -1e-15, Math.floor) : (e = 1e-15, Math.ceil),
+ f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil),
e;
return function(d) {
return d / pow(f(log(d) + e)) < k ? format(d) : "";
@@ -3646,7 +3646,7 @@ function d3_svg_mousePoint(container, e) {
var point = (container.ownerSVGElement || container).createSVGPoint();
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
var svg = d3.select(document.body)
- .append("svg:svg")
+ .append("svg")
.style("position", "absolute")
.style("top", 0)
.style("left", 0);
@@ -3807,30 +3807,30 @@ d3.svg.axis = function() {
// Minor ticks.
var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),
subtick = g.selectAll(".minor").data(subticks, String),
- subtickEnter = subtick.enter().insert("svg:line", "g").attr("class", "tick minor").style("opacity", 1e-6),
+ subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6),
subtickExit = transition(subtick.exit()).style("opacity", 1e-6).remove(),
subtickUpdate = transition(subtick).style("opacity", 1);
// Major ticks.
var tick = g.selectAll("g").data(ticks, String),
- tickEnter = tick.enter().insert("svg:g", "path").style("opacity", 1e-6),
+ tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6),
tickExit = transition(tick.exit()).style("opacity", 1e-6).remove(),
tickUpdate = transition(tick).style("opacity", 1),
tickTransform;
// Domain.
var range = d3_scaleRange(scale),
path = g.selectAll(".domain").data([0]),
- pathEnter = path.enter().append("svg:path").attr("class", "domain"),
+ pathEnter = path.enter().append("path").attr("class", "domain"),
pathUpdate = transition(path);
// Stash a snapshot of the new scale, and retrieve the old snapshot.
var scale1 = scale.copy(),
scale0 = this.__chart__ || scale1;
this.__chart__ = scale1;
- tickEnter.append("svg:line").attr("class", "tick");
- tickEnter.append("svg:text");
+ tickEnter.append("line").attr("class", "tick");
+ tickEnter.append("text");
tickUpdate.select("text").text(tickFormat);
switch (orient) {
@@ -3991,19 +3991,19 @@ d3.svg.brush = function() {
e;
// An invisible, mouseable area for starting a new brush.
- bg.enter().append("svg:rect")
+ bg.enter().append("rect")
.attr("class", "background")
.style("visibility", "hidden")
.style("pointer-events", "all")
.style("cursor", "crosshair");
// The visible brush extent; style this as you like!
- fg.enter().append("svg:rect")
+ fg.enter().append("rect")
.attr("class", "extent")
.style("cursor", "move");
// More invisible rects for resizing the extent.
- tz.enter().append("svg:rect")
+ tz.enter().append("rect")
.attr("class", function(d) { return "resize " + d; })
.attr("width", 6)
.attr("height", 6)
View
@@ -47,18 +47,18 @@
path = d3.geo.path().projection(xy);
d3.select("body")
- .append("svg:svg")
- .append("svg:g")
+ .append("svg")
+ .append("g")
.attr("id", "states");
d3.json("../data/us-states.json", function(collection) {
d3.select("#states")
.selectAll("path")
.data(collection.features)
- .enter().append("svg:path")
+ .enter().append("path")
.attr("d", path);
d3.select("#states")
- .append("svg:circle")
+ .append("circle")
.attr("r", 10)
.attr("transform", "translate(" + xy(xy.origin()).join(",") + ")")
});
@@ -23,21 +23,21 @@
var r = 960 / 2,
data = d3.range(361).map(function(i) { return .8 + Math.sin(i / 20 * Math.PI) / 6; });
-var svg = d3.select("body").append("svg:svg")
+var svg = d3.select("body").append("svg")
.data([data])
.attr("width", r * 2)
.attr("height", r * 2)
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + r + "," + r + ")");
-svg.append("svg:path")
+svg.append("path")
.attr("class", "area")
.attr("d", d3.svg.area.radial()
.innerRadius(r / 2)
.outerRadius(function(d) { return r * d; })
.angle(function(d, i) { return i / 180 * Math.PI; }));
-svg.append("svg:path")
+svg.append("path")
.attr("class", "line")
.attr("d", d3.svg.line.radial()
.radius(function(d) { return r * d; })
@@ -48,61 +48,61 @@
y = d3.scale.linear().domain([0, 1]).range([h, 0]);
var vis = d3.select("body")
- .append("svg:svg")
+ .append("svg")
.data([data])
.attr("width", w + p * 2)
.attr("height", h + p * 2)
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + p + "," + p + ")");
var rules = vis.selectAll("g.rule")
.data(x.ticks(10))
- .enter().append("svg:g")
+ .enter().append("g")
.attr("class", "rule");
-rules.append("svg:line")
+rules.append("line")
.attr("x1", x)
.attr("x2", x)
.attr("y1", 0)
.attr("y2", h - 1);
-rules.append("svg:line")
+rules.append("line")
.attr("class", function(d) { return d ? null : "axis"; })
.attr("y1", y)
.attr("y2", y)
.attr("x1", 0)
.attr("x2", w + 1);
-rules.append("svg:text")
+rules.append("text")
.attr("x", x)
.attr("y", h + 3)
.attr("dy", ".71em")
.attr("text-anchor", "middle")
.text(x.tickFormat(10));
-rules.append("svg:text")
+rules.append("text")
.attr("y", y)
.attr("x", -3)
.attr("dy", ".35em")
.attr("text-anchor", "end")
.text(y.tickFormat(10));
-vis.append("svg:path")
+vis.append("path")
.attr("class", "area")
.attr("d", d3.svg.area()
.x(function(d) { return x(d.x); })
.y0(h - 1)
.y1(function(d) { return y(d.y); }));
-vis.append("svg:path")
+vis.append("path")
.attr("class", "line")
.attr("d", d3.svg.line()
.x(function(d) { return x(d.x); })
.y(function(d) { return y(d.y); }));
vis.selectAll("circle.area")
.data(data)
- .enter().append("svg:circle")
+ .enter().append("circle")
.attr("class", "area")
.attr("cx", function(d) { return x(d.x); })
.attr("cy", function(d) { return y(d.y); })
@@ -29,18 +29,18 @@
x = d3.scale.linear().domain([.05, .95]).range([0, w]),
y = d3.scale.linear().range([0, h]);
-var svg = d3.select("body").append("svg:svg")
+var svg = d3.select("body").append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
-svg.append("svg:g")
+svg.append("g")
.attr("class", "x minor")
.attr("transform", "translate(0," + h + ")")
.call(d3.svg.axis().scale(x).tickSubdivide(2).tickSize(-6));
-svg.append("svg:g")
+svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(d3.svg.axis().scale(x));
@@ -43,22 +43,22 @@
x = d3.scale.linear().domain([.05, .95]).range([0, w]),
y = d3.scale.linear().range([0, h]);
-var svg = d3.select("body").append("svg:svg")
+var svg = d3.select("body").append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
-svg.append("svg:rect")
+svg.append("rect")
.attr("width", w)
.attr("height", h);
-svg.append("svg:g")
+svg.append("g")
.attr("class", "x grid")
.attr("transform", "translate(0," + h + ")")
.call(d3.svg.axis().scale(x).tickSubdivide(1).tickSize(-h));
-svg.append("svg:g")
+svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(d3.svg.axis().scale(x));
@@ -82,30 +82,30 @@
// Add an SVG element for each symbol, with the desired dimensions and margin.
var svg = d3.select("body").selectAll("svg")
.data(symbols)
- .enter().append("svg:svg")
+ .enter().append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
// Add the area path elements. Note: the y-domain is set per element.
- svg.append("svg:path")
+ svg.append("path")
.attr("class", "area")
.attr("d", function(d) { y.domain([0, d.maxPrice]); return area(d.values); });
// Add the x-axis.
- svg.append("svg:g")
+ svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(xAxis);
// Add the line path elements. Note: the y-domain is set per element.
- svg.append("svg:path")
+ svg.append("path")
.attr("class", "line")
.attr("d", function(d) { y.domain([0, d.maxPrice]); return line(d.values); });
// Add a small label for the symbol name.
- svg.append("svg:text")
+ svg.append("text")
.attr("x", w - 6)
.attr("y", h - 6)
.attr("text-anchor", "end")
@@ -34,26 +34,26 @@
var yAxis = d3.svg.axis()
.scale(y);
-var svg = d3.select("body").append("svg:svg")
+var svg = d3.select("body").append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
-svg.append("svg:g")
+svg.append("g")
.attr("class", "bottom axis")
.attr("transform", "translate(0," + h + ")")
.call(xAxis.orient("bottom"));
-svg.append("svg:g")
+svg.append("g")
.attr("class", "top axis")
.call(xAxis.orient("top"));
-svg.append("svg:g")
+svg.append("g")
.attr("class", "left axis")
.call(yAxis.orient("left"));
-svg.append("svg:g")
+svg.append("g")
.attr("class", "right axis")
.attr("transform", "translate(" + w + ",0)")
.call(yAxis.orient("right"));
@@ -91,45 +91,45 @@
y.domain([0, d3.max(values, function(d) { return d.price; })]);
// Add an SVG element with the desired dimensions and margin.
- var svg = d3.select("body").append("svg:svg")
+ var svg = d3.select("body").append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
// Add the clip path.
- svg.append("svg:clipPath")
+ svg.append("clipPath")
.attr("id", "clip")
- .append("svg:rect")
+ .append("rect")
.attr("width", w)
.attr("height", h);
// Add the area path.
- svg.append("svg:path")
+ svg.append("path")
.attr("class", "area")
.attr("clip-path", "url(#clip)")
.attr("d", area(values));
// Add the x-axis.
- svg.append("svg:g")
+ svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(xAxis);
// Add the y-axis.
- svg.append("svg:g")
+ svg.append("g")
.attr("class", "y axis")
.attr("transform", "translate(" + w + ",0)")
.call(yAxis);
// Add the line path.
- svg.append("svg:path")
+ svg.append("path")
.attr("class", "line")
.attr("clip-path", "url(#clip)")
.attr("d", line(values));
// Add a small label for the symbol name.
- svg.append("svg:text")
+ svg.append("text")
.attr("x", w - 6)
.attr("y", h - 6)
.attr("text-anchor", "end")
Oops, something went wrong. Retry.

0 comments on commit fe671a7

Please sign in to comment.