Граф коммитов

581 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock ae9d4a402a Refactor format tests for minimal loading. 2013-03-14 09:19:27 -07:00
Mike Bostock af25181df8 Refactor event tests for minimal loading. 2013-03-14 09:17:39 -07:00
Mike Bostock 8e9db961f9 Refactor dsv tests for minimal loading. 2013-03-14 09:16:05 -07:00
Mike Bostock 2831f6c7c4 Refactor cor tests for minimal loading. 2013-03-14 09:09:50 -07:00
Mike Bostock 97f034a44d Refactor color tests for minimal loading. 2013-03-14 09:06:31 -07:00
Mike Bostock f37405d1b8 Refactor array tests for minimal loading. 2013-03-14 09:00:13 -07:00
Mike Bostock 0f2b61ae93 Refactor svg tests using smash. 2013-03-14 08:46:45 -07:00
Mike Bostock e65d455ac6 Reuse global d3's document for xhr test. 2013-03-14 08:42:29 -07:00
Mike Bostock 5627ecdb9a Allow load expression to be overridden. 2013-03-14 08:16:52 -07:00
Mike Bostock 608902c907 Checkpoint test refactoring. 2013-03-13 23:21:23 -07:00
Mike Bostock 3442685b36 Refactor core tests using smash. 2013-03-13 19:16:59 -07:00
Mike Bostock 04fe8f8e4b Refactor color tests using smash. 2013-03-13 19:13:38 -07:00
Mike Bostock fe0d6f3ea6 Refactor array tests using smash. 2013-03-13 19:10:53 -07:00
Mike Bostock 5c4282f51a Don't import index; move ns to core. 2013-03-13 13:58:41 -07:00
Jason Davies d93f45ee82 Fix small-circle clipping of lines.
This corrects the handling of lines that are long enough to have two
visible or invisible endpoints, but still cross the small circle and
thus have an invisible or visible intermediate segment.

Fixes #1127.
2013-03-13 17:47:52 +00:00
Jason Davies 9d1925012d Support for {selection,dispatch}.on(".foo", null).
This allows all listeners with a particular name to be removed.

Fixes #880.
2013-03-13 12:15:17 +00:00
Mike Bostock 58dc604177 Move tests to match new source structure. 2013-03-13 02:08:02 -07:00
Mike Bostock d0441e6170 Automatic precision for custom tick formats.
You can now pass a format specifier to scale.tickFormat (for linear, pow and
identity scales). If the format specifier doesn't have a defined precision, the
precision will be set automatically by the scale, returning the appropriate
format. This provides a convenient, declarative way of specifying a format whose
precision will be automatically set by the scale.

This works with axes, too! For example, `axis.ticks(10, "%")` will now use a
percentage format rather than the default format, while still computing the
appropriate precision.

This commit also includes a fix to make d3.format more robust when unreasonable
precisions are specified. Rather than throwing an error, the nearest reasonable
value is used instead.

Fixes #912.
2013-03-11 18:06:05 -07:00
Mike Bostock ed81d3db2f Merge branch 'rotation-invert' of git://github.com/jasondavies/d3 into 3.1.0 2013-03-11 15:33:49 -07:00
Mike Bostock 13e2781206 More comprehensive projection tests. 2013-03-11 15:33:40 -07:00
Jason Davies 759947a2ad Add rotation.invert.
Fixes #1134.
2013-03-11 21:49:54 +00:00
Mike Bostock 09f6c76329 Add conic projections. Fixes #1133. 2013-03-11 13:43:05 -07:00
Mike Bostock 28c7b46b5a Add transverseMercator; remove custom scales.
This adds d3.geo.transverseMercator and removes the custom default scales from
the mercator and equirectangular projections. Also, this commit removes the
built-in 2π scale factor from the mercator projection, simplifying the
implementation and making it consistent with transverseMercator and GDAL. This
is a partial fix for #1133; see also d3/d3-plugins#55.
2013-03-11 12:58:00 -07:00
Mike Bostock 8d3c6d43f6 JSDOM now correctly returns null.
Previous versions of JSDOM erroneously returned null rather than the empty
string, but this has now been fixed. Note: this depends on tmpvar/jsdom#582
which has not yet been merged to master.
2013-03-11 10:57:57 -07:00
Mike Bostock f1c8b090da Fix a couple bugs in d3_dsv.format. 2013-03-07 12:05:49 -08:00
Mike Bostock fe09bb0cc2 Allow objects as input to d3_dsv.format.
The previous implementation of format, which only supported arrays as input, is
retained as d3_dsv.formatRows; for backwards-compatibility, d3_dsv.format allows
both arrays and objects as input (to be removed in 4.0). This change makes
format and formatRows symmetric with parse and parseRows, respectively.

To compute the set of fields from all objects, two passes are required. Fields
are listed in discovery order, so that in the common case where all fields are
defined on all objects, the order of columns in the generated DSV will match the
property iteration order of the first object.

This supersedes #1106 and fixes #509; thank you to @smcgivern and @hammer for
suggesting this feature.
2013-03-07 07:53:08 -08:00
Mike Bostock c58471c9a9 Merge branch 'nest-map' into 3.1.0 2013-03-05 20:56:30 -08:00
Mike Bostock aad4969807 Merge branch 'insert-function' into 3.1.0 2013-03-05 20:54:58 -08:00
Mike Bostock 01f681213f Merge branch 'voronoi-layout' into 3.1.0 2013-03-05 20:49:22 -08:00
Mike Bostock 98d09c8aa7 Merge branch 'scale-log-base' into 3.1.0 2013-03-05 20:46:22 -08:00
Mike Bostock 66ca29e17a Merge branch 'dsv-parse-function' into 3.1.0 2013-03-05 20:45:54 -08:00
Mike Bostock e8d8b13498 Merge branch 'geo-length' into 3.1.0 2013-03-05 20:45:25 -08:00
Mike Bostock 995b69946b Merge branch 'rotation' into 3.1.0 2013-03-05 20:44:20 -08:00
Mike Bostock cac8883fe3 Merge branch 'albers-usa-invert' of git://github.com/jasondavies/d3 into 3.1.0 2013-03-05 20:43:51 -08:00
Mike Bostock a7294db376 Merge branch 'd3.set' of git://github.com/jfirebaugh/d3 into 3.1.0 2013-03-05 20:42:53 -08:00
Mike Bostock 48f3fa8716 Merge branch 'minor-graticule' into 3.1.0
Conflicts:
	src/geo/interpolate.js
2013-03-05 19:28:39 -08:00
Mike Bostock dcf6b26773 Merge branch 'master' into rotation 2013-03-05 10:07:34 -08:00
Mike Bostock 04e4b57e2a More sensible ticks when not base 10. 2013-03-05 09:40:00 -08:00
Mike Bostock 5ef9dcd38a Add d3.scale.log base. Fixes #928.
Still need to implement sensible behavior for log.ticks without base 10, but I
haven't decided what would be appropriate yet.
2013-03-05 09:26:46 -08:00
Mike Bostock a3bb93a749 Fix vows clobbering our custom asserts. 2013-03-05 09:01:18 -08:00
Mike Bostock ff137ede76 Fix tests for d3.rebind. 2013-03-03 09:06:48 -08:00
Mike Bostock 9323c2314f Add tests for d3.geo.rotation.
Also, fix vows clobbering our custom asserts.
2013-03-02 15:09:02 -08:00
Mike Bostock 88c4a86e71 Add d3.layout.voronoi.
A more user-friendly version of d3.geom.voronoi. Fixes #1100.
2013-03-02 14:46:45 -08:00
Mike Bostock 95543f7bab Allow optional row conversion function to d3_dsv. 2013-03-02 13:54:44 -08:00
Mike Bostock aeb620b3a8 Allow row conversion function for d3.dsv.parse. 2013-03-02 13:49:50 -08:00
Mike Bostock 873db8d893 Allow before function for selection.insert.
Similar to selection.select(function), the before argument to selection.insert
can now be specified as a function, so that the caller can specify the before
node dynamically. Supersedes #1071.
2013-03-02 10:32:22 -08:00
Mike Bostock f4a4d700dc Add tests for d3.geo.length.
Also return the perimeter for polygons.
2013-03-01 14:12:24 -08:00
Jason Davies 4ce9bffe91 Add d3.geo.albersUsa.invert. 2013-02-26 00:55:58 +00:00
Jason Davies 889aacc43d Fix d3.geo.interpolate for coincident points.
This also improves accuracy for small distances, using the haversine
distance formula instead of the law of cosines.

Fixes #1080.
2013-02-18 13:06:29 +00:00
Mike Bostock 50a552093f Allow d3.map to be used with d3.nest’s map.
You can now pass a map type to d3.nest’s map function. For example, if you pass
d3.map as the second argument to nest.map(array, type), the returned value will
be an instance of d3.map rather than a bar object. In addition to offering
better protection against built-in property names, d3.map offers more convenient
iteration methods.
2013-02-11 11:56:32 -08:00