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

1309 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 4882a6448b Fix range generation for ordinal scales.
Using d3.range with a floating point step is a bit sketchy, because there's a
chance that too many or too few elements could be generated. Instead, we now we
generate an integer range and scale it accordingly.
2011-11-04 12:03:01 -07:00
Mike Bostock 6aad8c7c44 Use a single brush for scatterplot matrix. 2011-11-04 11:28:27 -07:00
Mike Bostock a9043b9650 Merge pull request #363 from jasondavies/extent
Use single loop for d3.extent.
2011-11-03 17:04:02 -07:00
Mike Bostock 98da365557 Merge branch 'master' of github.com:mbostock/d3 2011-11-03 17:02:19 -07:00
Jason Davies d11b5d9e4d Merge remote-tracking branch 'mbostock/brush' into extent
Conflicts:
	d3.js
	d3.min.js
	src/core/extent.js
	test/core/extent-test.js
2011-11-03 17:34:02 +00:00
Jason Davies a4abdc3c45 Use a single loop for d3.extent. 2011-11-03 16:59:41 +00:00
Mike Bostock 2b42dec930 Invoke accessor once per value in d3.extent.
This allows the use of nondeterministic accessors. Also add a test.
2011-11-03 09:20:06 -07:00
Mike Bostock 6c8b308aed Add .DS_Store to .gitignore. 2011-11-03 09:06:04 -07:00
Mike Bostock 149320f73f Add parallel coordinates example.
This includes a d3.extent convenience method for [d3.min, d3.max], and fixes the
brush component such that the resizers are hidden when the extent is empty.
2011-11-02 16:19:37 -07:00
Mike Bostock af589a01fc Update SPLOM example to use d3.svg.brush.
This required a couple core changes. First, the brush shouldn't notify listeners
when redrawing, because this commonly causes an infinite loop if one brush
triggers a change in another brush (as in a scatterplot matrix, where only one
brush is active at a given time). I suppose an alternative implementation might
use just a single brush, and assign the axes dynmically; I might try that in a
future commit. Second, I added a clear convenience method to reset a brush.
2011-11-02 11:44:29 -07:00
Mike Bostock 6ebc2fce95 Merge pull request #359 from jasondavies/brush
Remove stray global in brush example.
2011-11-02 09:18:57 -07:00
Jason Davies 6651c1785a Remove stray global in example. 2011-11-02 12:32:50 +00:00
Mike Bostock 49c5b60d42 The space key now lets you drag temporarily! 2011-11-01 19:14:12 -07:00
Mike Bostock 20b68c312b Use the altKey to preserve the brush center.
A somewhat hidden feature, but useful!
2011-11-01 18:08:54 -07:00
Mike Bostock 6e1cad402d Brush refinements.
The brush component now reports brushstart and brushend events at the start and
end of a brushing gesture, which is useful for some types of interaction. You
can now set the brush extent programmatically, as well. Note, however, that
you'll probably want to redraw the brush after setting the extent.
2011-11-01 16:53:09 -07:00
Mike Bostock a475cd5e5c Query the brush selection.
You can now query the brush for its selection. This commit also includes a new
d3.random.normal for generating random numbers with a normal distribution. This
is useful for jittering points for display.
2011-11-01 13:30:58 -07:00
Mike Bostock 42a59ac69f Resizeable brush. 2011-11-01 11:57:37 -07:00
Mike Bostock c72f10a2fb Add resize handles.
These aren't yet hooked up to interaction, but they show the right cursor!
2011-10-31 18:03:48 -07:00
Mike Bostock e3d59bd581 First cut at a brush component.
The d3.svg.brush component allows one- or two-dimensional rectangular brushing.
A future commit will allow the brushed region to be resized by grabbing an edge,
and also provide some way of reporting the selection (duh)!
2011-10-31 16:59:17 -07:00
Mike Bostock eda09f41c5 Merge branch 'touches' of https://github.com/jasondavies/d3 into 2.5.0 2011-10-29 10:50:09 -07:00
Mike Bostock 392ded0820 Namespaces for d3.dispatch events.
Fixes #294. This isn't backwards-compatible, but d3.dispatch is considered an
internal API so this doesn't require a major version bump.
2011-10-29 10:42:19 -07:00
Mike Bostock 0ad900ab19 Comment re. clipping and invalid inputs.
Fixes #235.
2011-10-29 09:39:52 -07:00
Mike Bostock 338094e6d8 Add main property to package.json.
Fixes #340.
2011-10-28 17:11:20 -07:00
Mike Bostock 6bf2071cc5 Merge branch 'pie' into 2.5.0 2011-10-28 17:05:50 -07:00
Mike Bostock d57e278485 Sort by descending value by default.
Fixes #348.
2011-10-28 17:04:03 -07:00
Mike Bostock 4a0c3842b9 Coerce pie values to numbers.
Fixes #347.
2011-10-28 16:53:58 -07:00
Mike Bostock bb19373c87 Merge branch 'calendar' into release 2011-10-28 16:48:03 -07:00
Mike Bostock 95a4dce023 Tiny simplification. 2011-10-28 16:47:31 -07:00
Johan Sundström 31d00a993f Prettify tooltips on non-data calendar dates. 2011-10-28 16:43:00 -07:00
Mike Bostock 9d56825122 Add comment re. Opera bug. 2011-10-28 16:29:23 -07:00
Mike Bostock b073edfc08 Merge branch 'opera-chord' of https://github.com/larskotthoff/d3 into chord 2011-10-28 16:15:07 -07:00
Jason Davies 8f98f81958 Simplify touchend handling.
We only care about changed touches for d3.behavior.drag.
2011-10-25 09:54:30 +01:00
Jason Davies c16417cbcc Better handling of "touchend".
We can't check for existence of event.touches to decide whether to use
it or not for touchend, as it always exists, just not containing the
touch that just ended.
2011-10-25 09:52:00 +01:00
Jason Davies d0d665c671 Optional touch array argument for d3.svg.touches.
By default, we probably want to use event.touches, but for "touchend"
events it's useful to retrieve the positions of event.changedTouches.
2011-10-25 09:30:59 +01:00
Jason Davies bd90a2f1bf Use changedTouches instead of touches.
This is because the "touchend" event removes the touch from
event.touches on iOS, but it can still be accessed via
event.changedTouches.
2011-10-25 09:12:42 +01:00
Mike Bostock c0e5b96336 Fix two sorting bugs in chord layout.
We still weren't sorting subgroups correctly. Also, we now sort chords by their
average value, rather than the source value, which works well with one-sided
chords (where either the source or target value is zero).
2011-10-23 22:39:40 -04:00
Jason Davies 81db54c263 Simplify code. 2011-10-20 15:54:24 +01:00
Jason Davies 8bfa56cf37 Fix another bug with infinite extents. 2011-10-20 15:52:06 +01:00
Jason Davies bc2394aabf Fix bug when no extents are specified. 2011-10-20 15:27:02 +01:00
Jason Davies a93a371878 Add configurable extents to d3.behavior.zoom.
The extents parameter is a 3-element array of ranges, corresponding to
the ranges allowed in pixel-space at zoom-level 0.  Each range is a
two-element array.  For example, to restrict zooming and panning to a
rectangle of width w and height h, with minimum zoom level 0, use:

    .extents([[0, w], [0, h], [0, Infinity]])
2011-10-20 13:19:16 +01:00
Jason Davies 6830a0fca2 Add configurable origin to d3.behavior.zoom.
This defaults to storing the absolute scale and transform across
multiple zooms.  However, it can be modified to retrieve state from
outside the behaviour e.g. if the offsets have been restricted in some
way, the true values should be returned in a custom offset accessor.

The offset accessor is called on "mousedown" or "touchstart", and so has
access to the current mouse position.
2011-10-20 12:02:53 +01:00
Mike Bostock 2f6d2fa07a Merge branch 'deps' of https://github.com/jasondavies/d3 2011-10-19 21:01:39 -04:00
Mike Bostock a62bd527ca Fix a bug in enter selection's empty.
Due to the ordering in which the prototypes are defined, it was still undefined!
Also, the empty method depends on the node method being defined. Added a test.
2011-10-19 20:57:53 -04:00
Mike Bostock b4cf93f8b0 Fix cartogram for IE9. 2011-10-19 17:23:14 -04:00
Mike Bostock fb07750993 Add state names. 2011-10-17 13:27:57 -04:00
Mike Bostock 99f3cb9bf1 Add labels to tree-interactive example. 2011-10-17 12:54:11 -04:00
Jason Davies 76bcd2a92f Update JSDOM to 0.2.8. 2011-10-17 08:43:27 +01:00
Mike Bostock 3f3569cc71 Consistent timing for subtransitions.
It was previously possible for small differences in the reference time for
subtransitions. This could lead to tearing with expensive transitions, as some
transitions would have slightly different reference times than the others. This
is fixed by passing the reference time along explicitly when deriving a new
transition, either by the transition or selection operators.
2011-10-14 13:45:16 -07:00
Jason Davies c724d95f77 Update UglifyJS, JSDOM and Vows.
I ran the tests on the newly minified files too, for good measure, and
everything passed.
2011-10-13 11:35:59 +01:00
Mike Bostock c623877461 Add hierarchical bar chart example. 2011-10-13 00:30:45 -07:00