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

963 Коммитов

Автор SHA1 Сообщение Дата
Jason Davies 04d2d546cf Fix negatively-sized rectangles in treemap.
Includes unit test!

Fixes #136.
2011-08-26 18:46:01 +01:00
Mike Bostock fb7e69f75e Fix albersUsa, again. 2011-08-24 18:11:35 -07:00
Mike Bostock 3f6fefb557 Merge branch 'release' 2011-08-24 18:04:29 -07:00
Mike Bostock 8a77b18d84 Fix the threshold for the Florida Keys. 2011-08-24 18:02:29 -07:00
Mike Bostock 4d161714b3 Add a handful of axis examples. 2011-08-24 17:56:34 -07:00
Mike Bostock d5533276bc Add transition.transition.
This derives a new transition from the existing transition, equivalent to (and
implemented as) transition.select(function() { return this; }).
2011-08-24 17:46:10 -07:00
Mike Bostock 0f4152e042 Fix the domain path for polylinear scales. 2011-08-24 16:20:59 -07:00
Mike Bostock ba2a68bb94 Allow tickFormat to be specified as a constant.
This was basically supported already, but there was a slight bug in the truthy
check for tickFormat. Now we check for null rather than falsiness.
2011-08-24 16:11:28 -07:00
Mike Bostock 4e96a35b66 More consistent timing for transitions.
Previously, the start time for a transition could be slightly different for
different elements, even when the transition was created at the same time. This
commit allows timers to be created with an explicit reference time (then),
allowing a transition to be temporaly consistent across elements.
2011-08-24 16:04:47 -07:00
Mike Bostock 6c4c7d8aae Merge branch 'release' 2011-08-24 14:12:59 -07:00
Mike Bostock c63abd74a0 Merge branch 'stray-globals' of https://github.com/jasondavies/d3 into release 2011-08-24 14:11:52 -07:00
Mike Bostock 9d4b6a02fb Fix a bug in selector functions.
They weren't being invoked with the correct syntax (being passed the data and
index, with the current node as the context). This commit also removes the
d3_array wrapper, which does not appear to be necessary; I've forgotten why it
was there in the first place.
2011-08-24 14:08:19 -07:00
Jason Davies 8223554e50 Remove some stray globals in d3.behavior.*. 2011-08-24 18:28:14 +01:00
Mike Bostock 2db0875d75 Merge branch 'd3-all-target' of https://github.com/xaviershay/d3 into custom 2011-08-23 13:09:39 -07:00
Mike Bostock 3ea08db753 Merge branch 'release' 2011-08-23 12:53:21 -07:00
Mike Bostock 2af6fbf172 Merge branch 'axis' into release 2011-08-23 12:51:44 -07:00
Mike Bostock 545e9de74c Merge branch 'drag' of https://github.com/jasondavies/d3 into release
This also fixes a few bugs in the new implementation, restoring support for the
offset between the mouse and the dragged element by reporting a delta rather
than an absolute offset. Also, this fixes an infinite loop when an element is
removed from the DOM.
2011-08-23 12:47:46 -07:00
Mike Bostock 95805adc9b Promote the axis component to the svg module.
I'm including the axis component in the core build because it should be useful
in many different visualization types, similar to the other svg components. The
chart module contains a hodgepodge of more obscure visualization types, and
there's no reason to pull those in for more common visualizations. Perhaps most
importantly, the axis component isn't a chart type!
2011-08-23 12:02:12 -07:00
Mike Bostock ce947ecf76 Allow minor and end tick size to be customized. 2011-08-23 11:07:18 -07:00
Mike Bostock 5126024ad3 Tick subdivision. 2011-08-23 10:45:04 -07:00
Xavier Shay ca159bfda8 Create d3.all.min.js Makefile target. 2011-08-23 09:15:21 -07:00
Xavier Shay 892b607a1f Add a semicolon to the end of minified JS files. 2011-08-23 09:06:00 -07:00
Mike Bostock 5eeff4f0fd Add a clip path. 2011-08-23 08:38:18 -07:00
Mike Bostock d8557e0efe Fix a bug in path z-index.
The test wasn't catching it because it wasn't updating the domain.
2011-08-22 23:01:53 -07:00
Mike Bostock 8df955283f Add support for axis orientations. 2011-08-22 22:53:51 -07:00
Mike Bostock a4500fcfb1 Allow `on` to return the current listener.
Fixes #216.
2011-08-22 18:50:14 -07:00
Mike Bostock a0fa7a00e5 Tolerate empty domains. Fixes #115. 2011-08-22 18:05:41 -07:00
Mike Bostock 770b24c742 Allow custom ticks and tickFormat.
Rather than specifying the ticks directly, you specify the arguments that will
be passed to the scale's ticks function. I suppose there are some obscure cases
where you might want more direct control over the generation of ticks, but this
makes the common case easy, and we could add a tickFunction property in the
future if we wanted to allow arbitrary control. Alternatively, you could write
a new scale type that supports the desired tick behavior (e.g., time scale).
2011-08-22 17:28:45 -07:00
Mike Bostock 15f1bee993 Axis transitions! 2011-08-22 16:35:23 -07:00
Mike Bostock 9dc97e87fe Merge branch 'master' into axis 2011-08-22 16:20:54 -07:00
Mike Bostock c421f90dc0 Tweak example parameters. 2011-08-22 14:20:54 -07:00
Mike Bostock b21cc8138d Merge branch 'release' 2011-08-22 14:08:18 -07:00
Mike Bostock 66598632f9 Merge branch 'zoom-click' of https://github.com/jasondavies/d3 into release 2011-08-22 14:05:06 -07:00
Mike Bostock 51c84a3b51 Merge branch 'force' into release 2011-08-22 14:03:32 -07:00
Mike Bostock 7ddb3ca0ea Merge branch 'chord' of https://github.com/jasondavies/d3 into release 2011-08-22 14:03:19 -07:00
Jason Davies dd2d490524 Prevent click events on drag in zoom behaviour.
You have to hold the mouse quite still though (see the zoom-pan
example).  Perhaps we should have a small allowance for jittery mice?

Fixes #243.
2011-08-22 21:48:21 +01:00
Mike Bostock b275d26e38 Weight nodes according to number of links.
The previous implementation was very unstable if a large number of nodes were
connected to a single node (a single node connecting many). The problem was that
the single node in the center would be moved many times for each connected node,
never converging to a stable solution. The fix is to weight each node according
to the number of links; in effect, the Gauss-Seidel relaxation then becomes the
average of the connected links, rather than relaxing each link individually.
2011-08-22 13:43:41 -07:00
Jason Davies 07affa2265 "psuedo" -> "pseudo". 2011-08-22 21:23:26 +01:00
Mike Bostock 12c5de92bc If fixed is set externally, make it sticky.
Previously, if you set a node to be `fixed`, it was forgotten on mouseover. Now
the preference is sticky. This changes the fixed attribute from a boolean to a
two-bit integer, but truthiness remains for backwards compatibility.
2011-08-22 12:40:45 -07:00
Jason Davies 2ddc0f62e3 Add d3.behavior.drag.
Extracted from d3.layout.force.  Fires "dragstart", "drag" and "dragend"
events, with a "position" property.  Note: this introduces a dependency
on d3.behavior to d3.layout.force if used (in addition to the existing
dependency on d3.geom).

Fixes #249.
2011-08-22 20:30:31 +01:00
Mike Bostock eecd123ecc Add missing semicolons. 2011-08-22 11:33:13 -07:00
Mike Bostock 2f1472b67d Expose selection and transition prototypes.
This means that you can now extend D3's selections and transitions with custom
functionality! Also, you can use now instanceof to see whether something is an
instanceof d3.selection or d3.transition.
2011-08-22 11:26:40 -07:00
Mike Bostock 21f605bae5 Add test for time scale.copy. 2011-08-21 21:07:29 -07:00
Mike Bostock 553bd4e36b Expose transition id. 2011-08-21 20:34:22 -07:00
Mike Bostock 1704957cb0 Add test for transition.tween. 2011-08-21 17:50:22 -07:00
Mike Bostock 3f22d76fb3 Better tests for transition.attr. 2011-08-21 17:43:37 -07:00
Mike Bostock f577542eff Add test for transition.selectAll. 2011-08-21 17:36:24 -07:00
Mike Bostock 80fa16a351 Add test for transition.select. 2011-08-21 17:28:32 -07:00
Mike Bostock e2b112bc81 Add tests for attrTween and styleTween. 2011-08-21 17:16:57 -07:00
Mike Bostock 51c7e58fdb Add test for transition.remove.
Also fix a bug where it would be possible for an earlier to transition to become
the lock owner. We now guarantee that the lock owner can only increase while
transitions are scheduled on an element.
2011-08-21 15:54:17 -07:00