Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pluck function to easily obtain an array of values from common properties #1

Closed
wants to merge 116 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
a35fc55
Inherit namespace from parent node.
mbostock Aug 27, 2011
06e9ba9
fix bug that causes chord layout to break in Opera
larskotthoff Oct 3, 2011
fb07750
Add state names.
mbostock Oct 17, 2011
6830a0f
Add configurable origin to d3.behavior.zoom.
jasondavies Sep 22, 2011
a93a371
Add configurable extents to d3.behavior.zoom.
jasondavies Oct 20, 2011
bc2394a
Fix bug when no extents are specified.
jasondavies Oct 20, 2011
8bfa56c
Fix another bug with infinite extents.
jasondavies Oct 20, 2011
81db54c
Simplify code.
jasondavies Oct 20, 2011
c0e5b96
Fix two sorting bugs in chord layout.
mbostock Oct 24, 2011
bd90a2f
Use changedTouches instead of touches.
jasondavies Oct 25, 2011
d0d665c
Optional touch array argument for d3.svg.touches.
jasondavies Oct 25, 2011
c16417c
Better handling of "touchend".
jasondavies Oct 25, 2011
8f98f81
Simplify touchend handling.
jasondavies Oct 25, 2011
b073edf
Merge branch 'opera-chord' of https://github.com/larskotthoff/d3 into…
mbostock Oct 28, 2011
9d56825
Add comment re. Opera bug.
mbostock Oct 28, 2011
31d00a9
Prettify tooltips on non-data calendar dates.
johan Oct 18, 2011
95a4dce
Tiny simplification.
mbostock Oct 28, 2011
bb19373
Merge branch 'calendar' into release
mbostock Oct 28, 2011
4a0c384
Coerce pie values to numbers.
mbostock Oct 28, 2011
d57e278
Sort by descending value by default.
mbostock Oct 29, 2011
6bf2071
Merge branch 'pie' into 2.5.0
mbostock Oct 29, 2011
338094e
Add main property to package.json.
mbostock Oct 29, 2011
0ad900a
Comment re. clipping and invalid inputs.
mbostock Oct 29, 2011
392ded0
Namespaces for d3.dispatch events.
mbostock Oct 29, 2011
eda09f4
Merge branch 'touches' of https://github.com/jasondavies/d3 into 2.5.0
mbostock Oct 29, 2011
e3d59bd
First cut at a brush component.
mbostock Oct 31, 2011
c72f10a
Add resize handles.
mbostock Nov 1, 2011
42a59ac
Resizeable brush.
mbostock Nov 1, 2011
a475cd5
Query the brush selection.
mbostock Nov 1, 2011
6e1cad4
Brush refinements.
mbostock Nov 1, 2011
20b68c3
Use the altKey to preserve the brush center.
mbostock Nov 2, 2011
49c5b60
The space key now lets you drag temporarily!
mbostock Nov 2, 2011
6651c17
Remove stray global in example.
jasondavies Nov 2, 2011
6ebc2fc
Merge pull request #359 from jasondavies/brush
mbostock Nov 2, 2011
af589a0
Update SPLOM example to use d3.svg.brush.
mbostock Nov 2, 2011
149320f
Add parallel coordinates example.
mbostock Nov 2, 2011
6c8b308
Add .DS_Store to .gitignore.
mbostock Nov 3, 2011
2b42dec
Invoke accessor once per value in d3.extent.
mbostock Nov 3, 2011
a4abdc3
Use a single loop for d3.extent.
jasondavies Nov 3, 2011
d11b5d9
Merge remote-tracking branch 'mbostock/brush' into extent
jasondavies Nov 3, 2011
98da365
Merge branch 'master' of github.com:mbostock/d3
mbostock Nov 4, 2011
a9043b9
Merge pull request #363 from jasondavies/extent
mbostock Nov 4, 2011
6aad8c7
Use a single brush for scatterplot matrix.
mbostock Nov 4, 2011
4882a64
Fix range generation for ordinal scales.
mbostock Nov 4, 2011
99963f0
Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into …
mbostock Nov 4, 2011
14b8d48
Fix silly bug.
jasondavies Nov 4, 2011
60e80dc
Remove unnecessary origin accessor from zoom.
jasondavies Nov 4, 2011
9006592
Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into …
mbostock Nov 4, 2011
a5b538b
More meaningful naming.
jasondavies Nov 4, 2011
d2c424a
A null extent should set extent to infinities.
jasondavies Nov 4, 2011
83f9b82
Merge remote-tracking branch 'mbostock/zoom' into zoom-extent
jasondavies Nov 4, 2011
1637c4b
Fix merge bug.
mbostock Nov 4, 2011
92b010f
Fix typo introduced in last commit.
jasondavies Nov 4, 2011
070b463
Reuse infinite extent.
jasondavies Nov 4, 2011
4cfdc94
Tiny simplification.
mbostock Nov 4, 2011
557abcc
Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into …
mbostock Nov 4, 2011
306d504
Disable sorting in donut transition example.
mbostock Nov 4, 2011
6fe70a8
Remove defunct d3_interpolateByName.
mbostock Nov 4, 2011
e60bc4d
Fix minor bug in exponent notation interpolation.
jasondavies Nov 4, 2011
151f0ba
Slightly shorter regex.
jasondavies Nov 4, 2011
e78cd68
Merge branch 'interpolate' of https://github.com/jasondavies/d3 into …
mbostock Nov 4, 2011
ff8225b
Add state names.
mbostock Nov 4, 2011
e3f6f33
Add d3.transform and d3.interpolateTransform.
mbostock Nov 4, 2011
a7ff9fa
Restore d3_interpolateByName for transforms.
mbostock Nov 4, 2011
8d68572
Merge branch 'interpolate' of https://github.com/jasondavies/d3 into …
mbostock Nov 5, 2011
d85d29e
Tolerate uninvertible matrices.
mbostock Nov 5, 2011
9460e7f
Add transform transition example.
mbostock Nov 5, 2011
7ae28f1
Merge branch 'transform' into 2.5.0
mbostock Nov 5, 2011
8cba1d7
Merge branch '2.5.0'
mbostock Nov 5, 2011
af5fccd
Use inclusive bounds for brush examples.
mbostock Nov 5, 2011
4d6b5bc
Update JSDOM and Vows versions.
jasondavies Nov 5, 2011
5ae34aa
Merge pull request #371 from jasondavies/deps
mbostock Nov 9, 2011
da47ae8
Remove spurious rounding.
mbostock Nov 10, 2011
3de298b
Fixed precision for the default log tick format.
mbostock Nov 10, 2011
18dcad7
Add drag.origin accessor.
mbostock Nov 10, 2011
2f16227
Restore conservative click canceling.
mbostock Nov 10, 2011
98b6abd
Improvements to collapsible force example.
mbostock Nov 14, 2011
4090261
Merge branch 'master' of github.com:mbostock/d3
mbostock Nov 14, 2011
7fe3ae4
Fix a couple bugs with transforms.
mbostock Nov 15, 2011
88c6f28
Merge branch 'master' into drag
mbostock Nov 16, 2011
faec4c8
Stop propagation on drag start, too.
mbostock Nov 16, 2011
204506c
Fix d3.transform and add browser-based tests.
jasondavies Nov 16, 2011
0ad865f
Bump epsilon.
jasondavies Nov 16, 2011
3007db2
Slightly smaller code.
mbostock Nov 16, 2011
64c4e78
Merge branch 'master' into log
mbostock Nov 16, 2011
b4c6b00
Merge branch 'transform' into release
mbostock Nov 16, 2011
b04112a
Merge branch 'release'
mbostock Nov 16, 2011
5d57fa7
Add .npmignore.
mbostock Nov 19, 2011
75ddc28
Fix a bug when removing a shared listener.
mbostock Nov 22, 2011
1b3a3b3
dispatch.on(name) returns the current listener.
mbostock Nov 22, 2011
2df8c62
Merge branch 'fix-dispatch'
mbostock Nov 22, 2011
552622d
Ordinal scales for axes.
mbostock Nov 23, 2011
532bf71
Brushing for ordinal scales.
mbostock Nov 23, 2011
3d6b4cf
Add transpose.
mbostock Nov 23, 2011
cc3f5da
Merge branch 'master' into default-namespace
mbostock Nov 23, 2011
11c1e7a
Infer namespaces for root element.
mbostock Nov 23, 2011
0404f35
Merge branch 'drag' into release
mbostock Nov 23, 2011
ee3954c
Merge branch 'ordinal-axis' into release
mbostock Nov 23, 2011
9c92666
Merge branch 'transpose' into release
mbostock Nov 23, 2011
9523f94
Merge branch 'release'
mbostock Nov 23, 2011
817358a
Namespaces are optional now!
mbostock Nov 23, 2011
5a87998
Examples: namespaces are optional as of v2.6.0.
jasondavies Nov 23, 2011
12711f2
d3.svg.*: namespaces are optional as of v2.6.0.
jasondavies Nov 23, 2011
a752b96
Fix #394.
mbostock Nov 30, 2011
2be4efd
Fix #392 - interpolate string to number.
mbostock Nov 30, 2011
4972113
Merge branch 'fix-log-precision' into release
mbostock Nov 30, 2011
33ab885
Merge branch 'fix-interpolate-number' into release
mbostock Nov 30, 2011
fe671a7
Merge branch 'release'
mbostock Nov 30, 2011
9ae8fee
add GeometryCollection support to d3.geo.bounds
natevw Dec 7, 2011
4a35d78
Add selection.order.
mbostock Dec 9, 2011
a6f87e7
Allow selectors for selection.filter.
mbostock Dec 9, 2011
1c1cb35
Merge branch 'geomcollection_bounds' of https://github.com/natevw/d3 …
mbostock Dec 9, 2011
b3848af
Fix minified file.
mbostock Dec 9, 2011
05d871b
Merge branch 'order'
mbostock Dec 9, 2011
7d2ce55
Fix a bug in SPLOM axes.
mbostock Dec 20, 2011
7e3c0d6
Included a new 'pluck' function to easily obtain an array of values f…
drslump Dec 27, 2011
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
_site
node_modules
.DS_Store
4 changes: 4 additions & 0 deletions .npmignore
@@ -0,0 +1,4 @@
examples/
test/
lib/
.DS_Store
9 changes: 8 additions & 1 deletion Makefile
Expand Up @@ -48,9 +48,12 @@ d3.core.js: \
src/core/median.js \
src/core/min.js \
src/core/max.js \
src/core/extent.js \
src/core/random.js \
src/core/number.js \
src/core/sum.js \
src/core/quantile.js \
src/core/transpose.js \
src/core/zip.js \
src/core/bisect.js \
src/core/first.js \
Expand All @@ -66,6 +69,7 @@ d3.core.js: \
src/core/range.js \
src/core/requote.js \
src/core/round.js \
src/core/pluck.js \
src/core/xhr.js \
src/core/text.js \
src/core/json.js \
Expand Down Expand Up @@ -96,6 +100,7 @@ d3.core.js: \
src/core/selection-data.js \
src/core/selection-filter.js \
src/core/selection-map.js \
src/core/selection-order.js \
src/core/selection-sort.js \
src/core/selection-on.js \
src/core/selection-each.js \
Expand All @@ -118,6 +123,7 @@ d3.core.js: \
src/core/transition-each.js \
src/core/transition-transition.js \
src/core/timer.js \
src/core/transform.js \
src/core/noop.js

d3.scale.js: \
Expand Down Expand Up @@ -147,7 +153,8 @@ d3.svg.js: \
src/svg/mouse.js \
src/svg/touches.js \
src/svg/symbol.js \
src/svg/axis.js
src/svg/axis.js \
src/svg/brush.js

d3.behavior.js: \
src/behavior/behavior.js \
Expand Down
7 changes: 7 additions & 0 deletions d3.geo.js
Expand Up @@ -652,6 +652,7 @@ function d3_geo_bounds(o, f) {
var d3_geo_boundsTypes = {
Feature: d3_geo_boundsFeature,
FeatureCollection: d3_geo_boundsFeatureCollection,
GeometryCollection: d3_geo_boundsGeometryCollection,
LineString: d3_geo_boundsLineString,
MultiLineString: d3_geo_boundsMultiLineString,
MultiPoint: d3_geo_boundsLineString,
Expand All @@ -670,6 +671,12 @@ function d3_geo_boundsFeatureCollection(o, f) {
}
}

function d3_geo_boundsGeometryCollection(o, f) {
for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {
d3_geo_bounds(a[i], f);
}
}

function d3_geo_boundsLineString(o, f) {
for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
f.apply(null, a[i]);
Expand Down
2 changes: 1 addition & 1 deletion d3.geo.min.js

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion d3.geom.js
Expand Up @@ -268,14 +268,24 @@ function d3_geom_polygonIntersect(c, d, a, b) {
// http://blog.thejit.org/assets/voronoijs/voronoi.js
// See lib/jit/LICENSE for details.

// Notes:
//
// This implementation does not clip the returned polygons, so if you want to
// clip them to a particular shape you will need to do that either in SVG or by
// post-processing with d3.geom.polygon's clip method.
//
// If any vertices are coincident or have NaN positions, the behavior of this
// method is undefined. Most likely invalid polygons will be returned. You
// should filter invalid points, and consolidate coincident points, before
// computing the tessellation.

/**
* @param vertices [[x1, y1], [x2, y2], …]
* @returns polygons [[[x1, y1], [x2, y2], …], …]
*/
d3.geom.voronoi = function(vertices) {
var polygons = vertices.map(function() { return []; });

// Note: we expect the caller to clip the polygons, if needed.
d3_voronoi_tessellate(vertices, function(e) {
var s1,
s2,
Expand Down