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

652 Коммитов

Автор SHA1 Сообщение Дата
vtstarin 6b9d0337a5 removing trailing commas inside object 2011-06-28 08:36:59 +09:30
Nathan Vander Wilt f74ccb9243 make `make` work 2011-06-25 17:31:02 -07:00
Mike Bostock e2cedca817 Better stroke colors. 2011-06-25 13:26:32 -07:00
Mike Bostock a0fd9853f5 Always use the larger value for chord sources. 2011-06-25 10:48:31 -07:00
Mike Bostock b14b441f55 Add flare dependency chord diagram. 2011-06-25 10:41:38 -07:00
Mike Bostock 7927a5739a Merge branch 'release' 2011-06-23 20:52:17 -07:00
Mike Bostock 779de6e93e Merge branch 'area' into release 2011-06-23 20:50:36 -07:00
Mike Bostock eac8831208 Add d3.svg.area.radial. 2011-06-23 20:49:33 -07:00
Mike Bostock 9619d87953 Merge branch 'bundle' into area 2011-06-23 20:17:06 -07:00
Mike Bostock 906e7eefc3 Add x0 & x1 accessors to d3.svg.area.
Thanks for the inspiration, @strongh!
2011-06-23 20:03:27 -07:00
Mike Bostock b5465489e7 Merge remote-tracking branch 'jasondavies/area' into area 2011-06-23 19:53:28 -07:00
Mike Bostock 886c4db94d Use a constant for the default y0. 2011-06-23 19:52:09 -07:00
Mike Bostock 2eba032040 Refactor ticks implementation.
This commit adds a new static function for computing the extent (min and max) of
a scale's domain, simplifying the logic in the ticks functions and ensuring
standard behavior (such as repeated values). Also, the linear ticks function is
extracted for reuse by the pow scale.

I opted not to reverse the tick order for descending domains; this might be nice
but it doesn't seem required, so we might as well keep the code small.
2011-06-23 19:45:23 -07:00
Mike Bostock cb3ffebc89 Replace basis+beta with bundle+tension.
There's already a tension parameter, and it seems reasonable to overload this
parameter (originally intended for cardinal splines) to also apply to bundle
splines. The new "bundle" interpolation is identical to "basis" interpolation;
the only difference is that the tension parameter is used to straighten the
basis spline.
2011-06-23 11:28:55 -07:00
Mike Bostock b7fde1118c Update comments for clarity. 2011-06-23 10:40:39 -07:00
Mike Bostock a934fd0511 Extract duplicate code from bundle examples. 2011-06-22 17:09:31 -07:00
Mike Bostock 641ccf18c3 Rename bundle.css. 2011-06-22 16:49:01 -07:00
Mike Bostock 2069d26e1a Simplify mouseover interaction. 2011-06-22 16:42:14 -07:00
Mike Bostock 96a565e314 Add d3.svg.diagonal.radial. 2011-06-22 14:33:34 -07:00
Mike Bostock e60ac77e25 Add d3.svg.line.radial. 2011-06-22 13:17:18 -07:00
Jason Davies 9915e30d9c Listen for "mousemove" on window.
I think this gives a better experience on big monitors. :-) I've also used
d3.timer to update the paths in case there is a backlog of mousemove events.
I'm not sure this is necessary but in testing on a fast machine sometimes it
processes two mousemove events and only draws the most recent one with this
change.
2011-06-22 20:03:49 +01:00
Jason Davies 4efd99f6be Revert "Use approximate sin/cos for faster interpolation."
This reverts commit c5450fa62a.

It turns out this approximation is not that much faster than Math.{sin,cos}; I
think the perceived performance is more related to the responsiveness to the
"mousemove" event.
2011-06-22 19:54:43 +01:00
Jason Davies c5450fa62a Use approximate sin/cos for faster interpolation.
This particular approximation is taken from
<http://www.devmaster.net/forums/showthread.php?t=5784> but there may well be
better ones out there.  This seems to work nicely though!
2011-06-22 18:56:58 +01:00
Mike Bostock 5f41452ed2 Change bundle strength on mousemove. 2011-06-22 10:25:57 -07:00
Mike Bostock 0aba0702a5 Hierarchical edge bundling improvements.
The input to the layout is now an array of edges to bundle, rather than nodes.
This eliminates the need for an `outgoing` accessor, since the links are passed
to the bundle layout directly.

The svg line generator now supports a beta (straightening; bundle strength)
parameter. I haven't decided if this is the right place or the right name for
it, but it seems like a reasonable starting point. I'm not happy with the cos &
sin needed to produce radial lines (both here and for the diagonal projection in
other examples), but I don't have a good alternative yet.

This commit also tries to make the construction of the links from the layout
nodes a bit easier to follow. The previous code was used another intermediate
representation, and I think it's cleaner to construct the default format
expected by the layouts. However, there's still a good chunk of code required to
massage the JSON format into a node hierarchy and array of dependencies, so I'd
like to find a way to simplify that, too.
2011-06-22 09:46:52 -07:00
Jason Davies 65a2370526 Make d3.layout.bundle layout-independent.
I've included an example of using it with treemaps.
2011-06-22 09:11:23 +01:00
Jason Davies 209a020114 Add ticks tests for pow scale. 2011-06-18 11:19:06 +01:00
Jason Davies c159980f7d Linear and log ticks: support descending domains.
See #185.
2011-06-17 21:18:40 +01:00
Jason Davies b17d4e1133 Minor clean ups. 2011-06-17 18:39:56 +01:00
Jason Davies a386da4e6c Add hierarchical edge bundling layout!
Based on <http://cs.stanford.edu/people/mbostock/iv/dependency-tree.html>.

See #194.
2011-06-17 18:34:49 +01:00
Jason Davies 0752a014af d3.svg.area: evaluate x-accessor once per element.
I played with extracting d3_svg_linePoints but this seems simpler.

Fixes #187.
2011-06-17 14:42:23 +01:00
Mike Bostock 68424aeff4 Merge branch 'release' 2011-06-16 21:12:37 -07:00
Mike Bostock 27158fdeb4 Merge branch 'voroboid' into release 2011-06-16 21:11:31 -07:00
Mike Bostock de92ecd6f3 Merge branch 'sum' into release 2011-06-16 21:09:41 -07:00
Jason Davies b7e20a4310 Couple of tweaks to reset gravity.
Firstly, when the mouse exits the area the gravity coordinates are nullified.
Secondly, if the user switches to another window, the gravity coordinates are
nullified (otherwise the appropriate "mouseout" event may be missed).
2011-06-15 23:20:14 +01:00
Mike Bostock ba6fc56997 Add tests for d3.time.format.iso. 2011-06-15 10:59:15 -07:00
Mike Bostock bbbf287daa Extract tests for d3.time.format.utc. 2011-06-15 10:50:46 -07:00
Mike Bostock 54805a6bc0 Add tests for d3.time.format.utc.parse. 2011-06-15 10:48:20 -07:00
Jason Davies 8e2d4ba599 Minor fixes to min/max test cases. 2011-06-15 17:47:54 +01:00
Jason Davies f90554f41e Add d3.sum.
Fixes #191.
2011-06-15 17:44:58 +01:00
Mike Bostock 068e66de31 Add UTC & ISO time formats. 2011-06-15 00:16:46 -07:00
Mike Bostock e2119b8ccf Merge branch 'release' 2011-06-13 17:37:57 -07:00
Mike Bostock 1cbda3067d Default nodes and links to empty.
Fixes #188.
2011-06-13 17:35:08 -07:00
Mike Bostock db0de49838 Expose force layout's friction parameter.
This was accidentally hidden by the drag behavior. Probably, the drag behavior
should be broken out and moved to the d3.behavior module. But this is a nice fix
for the immediate problem of name collision. Fixes #192.
2011-06-13 17:34:51 -07:00
Mike Bostock 4f16bbd9e7 Regenerate files. 2011-06-13 17:30:30 -07:00
Kevin J. Lynagh 69dc5efceb Add a semicolon at the end of modules to prevent trouble when modules are concatenated into the same file. 2011-06-13 15:54:45 -07:00
Mike Bostock 563b6d1cc3 Merge branch 'boid' 2011-06-12 14:07:08 -07:00
Jason Davies cac32ebc58 Move d3.ai.boid to voroboids example.
From Mike:

> This way, we keep the core library small, and we can make
> non-backwards compatible changes without bumping the major version
> number.
2011-06-12 21:40:58 +01:00
Jason Davies 0270071984 Merge remote branch 'mbostock/boid' into boid 2011-06-12 21:13:43 +01:00
Mike Bostock 24431337d7 Add force multi-foci example. 2011-06-12 13:11:48 -07:00