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

559 Коммитов

Автор SHA1 Сообщение Дата
Jason Davies 091f389499 Fix resampling interpolation close to poles. 2012-11-15 22:36:46 +00:00
Jason Davies 7164af752f Fix resampling interpolation along antemeridian. 2012-11-15 16:06:17 +00:00
Jason Davies bedff71625 Improve resampling and antemeridian cutting.
Lines going through poles are now detected, and multiple points are
inserted at the poles to aid resampling "along" a pole.

I've removed the distortion check for resampling, since this is no
longer necessary (this kind of distortion only really happens near
poles, which the cutting now takes care of).
2012-11-14 23:42:38 +00:00
Jason Davies dbd0745a8b Another fix for d3.geo.circle Polygon exteriors. 2012-11-14 14:07:33 +00:00
Jason Davies 0bb3d29539 Fix d3.geo.circle Polygon exterior insertion. 2012-11-14 13:24:16 +00:00
Jason Davies 18de5cd5c1 Fix d3.geo.circle clipping of [Multi]Point. 2012-11-14 12:44:29 +00:00
Jason Davies 8ac44493ce Fix resampling along antemeridian. 2012-11-14 11:50:37 +00:00
Jason Davies 4f1a849b63 Further simplifications. 2012-11-13 22:51:56 +00:00
Jason Davies 1932de8c4b Fix another bug in d3.geo.circle.
I made a typo in my previous simplification.
2012-11-13 22:50:52 +00:00
Jason Davies d98a20aaf0 Simplify. 2012-11-13 13:21:28 +00:00
Jason Davies 3c4af15ac6 Fix d3.geo.circle error.
Fixes a regression introduced in
ea7f617e92.

Also fixes a typo in an unrelated test name.
2012-11-13 13:08:06 +00:00
Mike Bostock 8ee6c126bc Squash warnings. 2012-11-11 09:44:40 -08:00
Mike Bostock b262629ada Merge branch 'treemap-slice' of https://github.com/jasondavies/d3 into 3.0 2012-11-11 09:28:41 -08:00
Jason Davies 5c97ac1411 Better fix for .precision. 2012-11-10 23:24:45 +00:00
Jason Davies b71d0c9c16 d3.geo.circle: fix .precision.
Thanks, @RandomEtc!
2012-11-10 23:23:06 +00:00
Jason Davies 38c304b68d Add test for d3.geo.circle.
Fixes an error when no angle is explicitly set.
2012-11-10 21:57:56 +00:00
Jason Davies ea7f617e92 d3.geo.circle: generate GeoJSON Polygon.
As well as clipping against a given circle, you can now generate a
GeoJSON object representing the circle.
2012-11-10 21:45:00 +00:00
Jason Davies fcb658b45a Add slice-dice, slice, and dice treemap modes.
See also: #653.
2012-11-03 00:02:43 +00:00
Mike Bostock f011f21354 Don't assign to arguments; it's unreliable. 2012-11-02 14:15:35 -07:00
Mike Bostock ecb333903a Switch to UglifyJS2. 2012-11-02 12:50:20 -07:00
Mike Bostock 835c3e12d0 Add support for 0, - and _ fill padding.
For example, "%-d" formats the day with no padding, "%_d" formats the day with
space-padding equivalent to "%e", and "%0d" formats the day with zero-padding
equivalent to "%d".
2012-10-30 14:42:05 -07:00
Mike Bostock 5cacd70702 Configurable graticule precision. 2012-10-29 19:49:35 -07:00
Mike Bostock 891acedc35 Fix merge error with localized decimal.
Also, don't use grouping when locale reports grouping "0".
2012-10-29 10:17:35 -07:00
Mike Bostock 903fbb0a9b Merge branch 'format-align' of git://github.com/jasondavies/d3 into 3.0
Conflicts:
	src/core/format.js
2012-10-29 09:35:01 -07:00
Mike Bostock 6d7b74241a Merge branch 'locale' of git://github.com/jasondavies/d3 into 3.0 2012-10-29 09:23:18 -07:00
Mike Bostock 9b1fefca81 Merge branch 'geo-bounds' of git://github.com/jasondavies/d3 into 3.0
Conflicts:
	src/geo/bounds.js
	src/geo/path.js
	src/geo/type.js
	test/geo/bounds-test.js
2012-10-29 09:07:00 -07:00
Mike Bostock 9828afda19 Merge branch 'simplify-arguments' of git://github.com/jasondavies/d3 into 3.0
Conflicts:
	src/core/ease.js
	src/core/selection-datum.js
2012-10-29 08:50:22 -07:00
Mike Bostock 92ae464cc9 Fix another Voronoi bug with N=2. 2012-10-26 17:29:00 -07:00
Jason Davies b04954bc9f Fix drawing of [Multi]Point geometries. 2012-10-25 18:31:12 +01:00
Mike Bostock 2358fd0fb4 Optimize d3_dsv.
Replace regular expression search with a simple if-else.

Replace a for-loop with a new Function to convert rows to objects, such that
each row is defined in a single step as an object literal rather than lazily
defining properties on a blank object. Note that parseRows can still be
substantially faster for large files provided you convert strings to smaller
types (e.g., numbers or booleans); greedy type-conversion reduces peak memory
usage and accelerates garbage collection.
2012-10-18 23:09:51 -07:00
Mike Bostock 2356206587 Use reference time for scheduling transitions. 2012-10-16 21:51:11 -07:00
Mike Bostock 9abaad9763 Consolidate some code, again. 2012-10-16 17:17:35 -07:00
Mike Bostock b1844d7453 Consolidate some code. 2012-10-16 16:58:37 -07:00
Mike Bostock 3af91c35e4 Greedy evaluation of transition.{style,attr,text}.
Rather than computing the ending value when the transition starts, the ending
value is computed when the transition is scheduled. This gives more predictable
behavior and makes it easier to debug evaluation errors since they occur
immediately (during user code) rather than inside a d3_timer callback.

The behavior of attrTween and styleTween are unchanged, since the interpolator
can only be constructed once the starting value is known. This commit also
removes d3.tween; I may add this back in a future commit, but I think there is
probably a better way to specify an interpolator for transitions.
2012-10-16 16:47:20 -07:00
Mike Bostock 0794607c39 Changes to transition start & end.
The start event is now fired before any tweens are evaluated, such that you can
do any necessary preprocessing work beforehand. The end event no longer causes
the transition id to be inherited, since we can do that more elegantly now using
transition.transition.
2012-10-16 14:02:08 -07:00
Mike Bostock 200bdea796 Fix callback index with transition events. 2012-10-16 13:15:26 -07:00
Mike Bostock f1c87d7e3a Easier programmatic zooming.
Setting the translate and scale now propagates the changes to the scale domains
in the same manner as user interaction. Likewise, setting new scales resets the
translate and scale back to their default values ([0, 0] and 1 respectively).
2012-10-15 08:13:40 -07:00
Mike Bostock 06dae9c6d2 Implement albersUsa.{point,line,polygon}. 2012-10-11 17:10:26 -07:00
Mike Bostock 136a380a88 More concise inheritance of transition properties. 2012-10-11 14:39:59 -07:00
Mike Bostock 1e4b261b39 No more private state for transitions!
This commit moves easing and event listeners down to the node's transition
object, allowing these fields to be modified via post-selection. This removes
the last vestige of private state for transitions.

This required a few changes to tests that depended on the order of callbacks for
tweens and events. Because timers are called back in reverse order, tweens are
now initialized in reverse order, and listeners are now invoked in order.
2012-10-11 12:39:24 -07:00
Mike Bostock d9a1281e08 Fix #438 - degenerate voronoi polygons. 2012-10-06 16:40:37 -07:00
Mike Bostock a77079280a Add tests for d3.geom.quadtree.
Also remove backwards-compatibility for [x, y] input.
2012-10-06 13:19:05 -07:00
Mike Bostock d580a64eba Merge branch 'geo-centroid' of git://github.com/jasondavies/d3 into 3.0 2012-10-06 07:08:59 -07:00
Mike Bostock d3f855ae01 Rename d3.v3.js to d3.js.
We'll still use the major-versioned name file for d3js.org, but this is simpler.
2012-10-05 18:46:05 -07:00
Mike Bostock 3081dd45ef Consolidate everything into d3.v2.js.
Rather than producing separate files for each module, the default build now
produces a single file. This should encourage better page-load performance as
the files were relatively small. Also, it's easier to deal with only one file
rather than many, especially if you're not quite sure what the dependencies are.
You may still create minimized builds, if you don't want every feature.

This commit also demotes the chart components to the examples directory, rather
than keeping them as part of the core library. As always, D3 is not a charting
library, and these were ever only intended to serve as examples.
2012-02-18 14:04:01 -08:00
Mike Bostock 230d8e9080 Merge branch 'v2.7.5' 2012-02-18 13:10:03 -08:00
Mike Bostock 1643aa9b46 Merge branch 'master' of https://github.com/trevnorris/d3 into v2.8.0
I simplified the implementation, though it still seems somewhat magical. I
would be more confident if there were an easy way to extract the mantissa and
exponent from a floating point number, but since JavaScript does not expose the
bitwise representation of numbers, there's no easy way to do it.
2012-02-18 13:05:02 -08:00
Trevor Norris 8178c2961b clean up step calculations. add better method for values with no decimal part. included additional tests to demonstrate fixes. 2012-02-15 14:23:27 -08:00
Trevor Norris 25c0bca405 update d3.js and d3.min.js 2012-02-14 16:04:03 -08:00
Mike Bostock 744aa9696e Define behavior for mismatched domain & range. 2012-02-13 23:11:05 -08:00