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

396 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock e2346ad471 Merge branch 'release' 2011-07-31 16:11:35 -07:00
Mike Bostock 6a9eda0b57 Merge branch 'release' 2011-07-20 16:15:57 -07:00
Mike Bostock e2187aab37 Add d3.time.scale. 2011-07-19 18:44:04 -07:00
Mike Bostock a40876cb55 Merge branch 'release' 2011-07-16 20:45:11 -07:00
Mike Bostock b691732401 Merge branch 'master' of https://github.com/tmont/d3 into release 2011-07-16 20:42:18 -07:00
Jason Davies 1a456a90c7 Minor optimisation. 2011-07-16 00:49:25 +01:00
Tommy Montgomery 5d6ec6b4a7 verify that the node to remove after a transition actually has a parent node 2011-07-14 16:39:34 -07:00
Mike Bostock 06ecb617a2 Allow multiple zoom behaviors to coexist.
Any event handlers on the window need to manage global state, as they will be
replaced when another zoom behavior is created.
2011-07-10 10:31:52 -07:00
Mike Bostock 1885dd55c8 Merge branch 'release' 2011-07-09 21:00:51 -07:00
Mike Bostock 075a8789a4 Add d3.quantile. 2011-07-09 15:15:14 -07:00
Mike Bostock 3c8fabbd65 Merge branch 'release' 2011-07-08 22:44:41 -07:00
Mike Bostock 94e20f74f8 Merge branch 'hierarchy' 2011-07-02 17:16:57 -07:00
Mike Bostock a42e4e14ad Merge branch 'vtstarin-master' 2011-07-02 08:49:05 -07:00
Mike Bostock 8dcbe9e2dc Merge branch 'master' of https://github.com/vtstarin/d3 into vtstarin-master 2011-07-02 08:48:16 -07:00
Mike Bostock 96710b4aa8 Add d3.first and d3.last.
These are like d3.min and d3.max, but a bit more flexible for determing the
lowest or highest element in a given array.
2011-06-29 18:50:42 -07:00
Mike Bostock 35fb91d16f Allow quadtree to be built dynamically.
You can now specify the domain of the quadtree upon construction, such that you
can add points to the quadtree dynamically later. The quadtree example now also
shows how to do a quick rectangular search using the quadtree.
2011-06-28 13:27:03 -07:00
vtstarin 6b9d0337a5 removing trailing commas inside object 2011-06-28 08:36:59 +09:30
Mike Bostock a0fd9853f5 Always use the larger value for chord sources. 2011-06-25 10:48:31 -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 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
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 c159980f7d Linear and log ticks: support descending domains.
See #185.
2011-06-17 21:18:40 +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
Jason Davies f90554f41e Add d3.sum.
Fixes #191.
2011-06-15 17:44:58 +01:00
Mike Bostock e2119b8ccf Merge branch 'release' 2011-06-13 17:37:57 -07:00
Mike Bostock 4f16bbd9e7 Regenerate files. 2011-06-13 17:30:30 -07:00
Mike Bostock 1dfcda4888 Better nicing for pow scales. 2011-06-11 18:11:15 -07:00
Mike Bostock f5c1d54b57 Instantiating enter affects update.
Previously, if you instantiated the enter selection via append or insert, you'd
have to re-select to unify the enter and update selection (the post-transform
nodes). Now, simply by appending or inserting the entering nodes, the update
selection automatically refreshes, obviating the need for a reselect. If you
still want to perform actions only on the updating nodes, you can do so by
performing these actions before instantiating the enter selection.
2011-06-11 15:56:18 -07:00
Mike Bostock 4964bb6362 Merge branch 'superformula' 2011-06-11 12:57:35 -07:00
Mike Bostock 920d980b3b Move d3.svg.superformula into an example.
This way, people can play with superformulas if they want them, but we keep the
core library small. If we want to replace the default symbol implementation with
superformulas in the future, we can do that too. For now, be conservative.
2011-06-11 12:54:44 -07:00
Mike Bostock 852ac949d2 Merge branch 'master' into superformula 2011-06-11 12:49:22 -07:00
Mike Bostock 7dc7fe4f53 Merge branch 'release' 2011-06-11 12:40:43 -07:00
Mike Bostock afbeb4cec1 Merge branch 'interpolators' into release 2011-06-11 12:37:23 -07:00
Mike Bostock 40ba7913e0 Add d3.interpolators registry.
This is useful when other modules want to register interpolators for
d3.interpolate without adding an explicit dependency to d3.core.  The
interpolators are applied in reverse order, and the first one that returns
a function is used.

(This commit was authored by @jasondavies and cherry picked.)
2011-06-11 12:32:41 -07:00
Mike Bostock 54ac5e6749 Merge branch 'nice' into release 2011-06-11 12:20:57 -07:00
Mike Bostock 0607c580be Reduce code duplication.
I'm not totally sure about the nicing behavior for pow scales; we might want it
to behave more like nicing for log scales. But this works for now!
2011-06-11 12:17:47 -07:00
Mike Bostock de35e0d094 Tweens are now optional.
If the tween function returns null, then no tween will be applied for the
specified element. The default tween function now returns null if the start and
end value are the same, thus avoiding redundant interpolation.
2011-06-11 11:12:51 -07:00
Jason Davies aeb1212f25 Add semicolons. 2011-06-07 17:32:55 +01:00
Jason Davies dc792de2ef Support for nice polylinear log scales. 2011-06-07 09:45:56 +01:00
Jason Davies 943e2d5a88 Fix nice pow scale.
We can't just rebind the internal linear scale's nice function because the
linear scale's domain is the exponentiated pow domain, so the actual pow domain
would most likely be fractional as the linear scale will round to the nearest
integer exponentiation.
2011-06-07 09:31:23 +01:00
Jason Davies ea8e8785a7 Support for "nice" polylinear scales. 2011-06-07 08:44:02 +01:00
Mike Bostock 8be719280a Merge remote-tracking branch 'biovisualize/master' into superformula 2011-06-06 22:51:16 -07:00
Mike Bostock bfa1a6e48f Add d3.svg.superformula. 2011-06-06 22:38:08 -07:00
chris viau b0d8d439a9 added more shapes 2011-06-07 00:59:18 -04:00
chris viau 06b0b25de0 Added shape tween 2011-06-06 22:55:18 -04:00
Jason Davies 8421fca43d Fix "nice" log scales.
Turns out we just needed to test for reversed domains.

Fixes #176.
2011-06-07 00:38:41 +01:00
Jason Davies e1daa4764c Add d3.scale.log().nice().
Based on the Protovis implementation.  Includes tests.  I'm not sure [10.9, 1.1]
should be "niced" to [10, 10] but this is also the behaviour in Protovis at the
moment.
2011-06-07 00:29:45 +01:00
Jason Davies cdf5f2fa90 Add d3.scale.linear().nice().
Based on the Protovis implementation.  "Nices" the scale, extending the bounds
of the input domain to evenly-rounded values.
2011-06-06 23:34:16 +01:00
Mike Bostock 2e560f6d6e Fix d3.min and d3.max, again.
Unlike Math.min and Math.max, it doesn't make sense to return negative or
positive infinity for d3.min and d3.max; the D3 functions return the minimum
value according to an arbitrary ordering, not by numeric value. Instead, the
minimum or maximum of an empty array, or an array that contains only degenerate
values, should always be undefined.
2011-05-30 13:43:18 -07:00
Mike Bostock 204e00efde Merge branch 'azimuthal' 2011-05-30 09:31:19 -07:00
Mike Bostock 15d7569216 Merge branch 'release' 2011-05-30 09:26:23 -07:00
Mike Bostock c7c2af625f Merge branch 'minmax' into release 2011-05-30 09:23:39 -07:00
Mike Bostock d8c8b5ddd6 Ignore null and undefined in d3.{min,max}.
Fixes #161.
2011-05-30 09:10:13 -07:00
Jason Davies 25e77c4f67 d3.min & d3.max: ignore NaN at [0].
Note: this now returns Infinity and -Infinity for zero-element arrays, whereas
previously an error would have occurred.

Fixes #161.
2011-05-30 09:45:27 +01:00
Jason Davies 7e08dc10ef d3.min & d3.max: pass index and array to accessor.
Fixes #162.
2011-05-30 09:38:17 +01:00
Mike Bostock 8f54652b4f Merge branch 'zip' into release 2011-05-27 14:54:56 -07:00
Mike Bostock 16c40a1b3e Merge remote-tracking branch 'jasondavies/new-parens' into release 2011-05-27 14:54:15 -07:00
Mike Bostock 909b1650b6 Gratuitious micro-optimizations. 2011-05-27 14:46:59 -07:00
Jason Davies 1baf57be30 Fix bugs in d3.zip.
* The returned array should be truncated to the length of the shortest argument.
 * With no arguments it should return an empty array.

I've updated the unit tests to be more verbose to detect the array of
single-element arrays returned for a single argument.
2011-05-27 20:50:27 +01:00
Jason Davies 2403293455 Add d3.zip.
Analagous to Python's built-in zip():
<http://docs.python.org/library/functions.html#zip>

Fixes #145.
2011-05-27 09:36:36 +01:00
Mike Bostock 98ef2d185f Prefer style over attr. 2011-05-26 21:15:28 -07:00
Jason Davies 3941be193a Remove extraneous parentheses from `new` operator.
Parentheses are optional if there are no arguments.
2011-05-22 10:22:28 +01:00
Mike Bostock 71264282b4 Merge branch 'release' 2011-05-21 17:29:05 -07:00
Mike Bostock 5bf17dad6d Merge branch 'format' into release 2011-05-21 17:26:29 -07:00
Mike Bostock 392aa11e9b Simplify new format types.
I removed the `F`, `G` and `E` types, since these are redundant and we don't
have to be slavishly-compatible with Python. Also, I simplified the
implementation of `g`, `e` and `f` so that they use JavaScript's built-in
`toPrecision`, `toExponential` and `toFixed`, respectively. The existing
implementations weren't exactly compatible with Python, anyway, so we might as
well default to using JavaScript's built-ins.
2011-05-21 17:19:31 -07:00
Mike Bostock 0e75d27707 Slightly shorter. 2011-05-21 13:08:52 -07:00
Mike Bostock 6ba3097766 Add d3.bisect.
This is similar to pv.search, but more closely modeled after Python's bisect
methods to provide the desired flexibility in searching slices of arrays. This
includes good tests for bisect, and better tests for polylinear and quantile
scales (both of which now use bisect).
2011-05-21 12:56:06 -07:00
Mike Bostock 85a6feec66 Add support for F, r and p format types.
`F` is an alias for `f`. `r` is a new format type that rounds the input number,
treating the precision field as the desired number of significant digits. This
is similar to `g`, except it never uses exponent notation. `p` is equivalent to
`r`, except it outputs a percentage, as with `%`.
2011-05-20 15:38:09 -07:00
Mike Bostock 01fdc1d93d Add d3.round. 2011-05-20 14:20:17 -07:00
Jason Davies e89b53cc9e Add unit test for exponential notation.
Also fix a bug in precision interpretation.
2011-05-19 21:04:51 +01:00
Jason Davies 643efb9869 Additional types for d3.format.
* "e": exponent notation.
 * "E": same as "e", except uses "E" as a separator.
 * "g": precision is interpreted as signficant digits.
 * "G": same as "g" but uses "E" instead of "e".
 * "n": equivalent to ",g".
 * "%": percentages.

Fixes #149.
2011-05-19 20:57:42 +01:00
Mike Bostock 173a936d68 Merge branch 'release' 2011-05-12 11:56:15 -07:00
Mike Bostock 4c998ba2cc Propagate touch identifier in d3.svg.touches.
Also, add a fun little example demonstrating multi-touch.
2011-05-12 11:54:38 -07:00
Mike Bostock f1a2f62dcb Simplify touches code slightly. 2011-05-12 11:28:31 -07:00
Mike Bostock bdc7023776 Merge branch 'touch' into release 2011-05-12 11:26:09 -07:00
Mike Bostock 25a3a503b5 Add d3.permute. 2011-05-12 10:25:05 -07:00
Jason Davies ab28a0c833 Revert "Remove usage of d3_array for efficiency."
This reverts commit 1bb3e9b025.

The performance difference is negligible, and using d3_array results in smaller
code.
2011-05-12 17:20:07 +01:00
Jason Davies 1bb3e9b025 Remove usage of d3_array for efficiency.
This avoids unnecessarily creating a new array for every touch event.
2011-05-12 10:10:04 +01:00
Jason Davies a5f140709c Add d3.svg.touches for multitouch support. 2011-05-11 17:26:48 +01:00
Jason Davies 5f2e430f25 Add touch support to `d3.svg.mouse`.
This doesn't quite seem like the right place for it, but it seems to work when
using "touchstart", "touchmove" and "touchend" handlers without any adverse
effects on "true" mouse event handlers.

See <http://www.jasondavies.com/apollonian-gasket/> to see an example of
combined touch/mouse handlers working with this change.
2011-05-10 22:42:16 +01:00
Mike Bostock 7c518c547c Merge branch 'polylinear' 2011-05-08 19:54:40 -07:00
Mike Bostock 7ead68822b Delete d3.search.
Not needed for now, since I opted to create customized versions internally.
2011-05-08 19:52:12 -07:00
Mike Bostock c99678e6cf Rename a variable. 2011-05-07 23:24:42 -07:00
Mike Bostock e67e7d7d8b Refactor polylinear scales.
This commit adds a d3_uninterpolate method (private, for now), which is
essentially the inverse of d3.interpolate. It's used to map a value in the
domain to the unit range [0,1], which can then be passed to an interpolator.
2011-05-07 23:20:02 -07:00
Mike Bostock 5d05154ae6 Merge branch 'release' 2011-05-07 16:51:30 -07:00
Mike Bostock e1c6c74f70 Merge branch '===' into release 2011-05-07 16:42:59 -07:00
Mike Bostock ce808da5b3 Merge branch 'immediate-transitions' into release 2011-05-07 16:39:46 -07:00
Mike Bostock ef905bcf1b Merge branch 'data-listeners' into release 2011-05-07 16:35:30 -07:00
Mike Bostock b1b6b14143 Merge branch 'monotone' into release 2011-05-07 16:34:01 -07:00
Mike Bostock 7367df8050 Improved monotone interpolation.
Mainly, I fixed a bug where the coordinates could get set to NaN if two
successive points have the same x-coordinate. But I also cleaned up the
implementation slightly, and compute the initial tangents using finite
differences.
2011-05-07 16:32:48 -07:00
Mike Bostock 8aa986dff1 Merge branch 'issue-78' into release 2011-05-07 11:28:48 -07:00
Mike Bostock 99e2a55614 Cleverly compacted `classed` code.
We can take advantage of JavaScript's invisible hoisting of variables to set
them before they are defined. This simplifies the code for the various special
cases in the `classed` operator, such as for SVG elements and browsers that
support the tokenized class list.
2011-05-07 11:21:59 -07:00
Mike Bostock 59b5ba99be Reorganize some color functions. More tests. 2011-05-07 10:59:49 -07:00
Jason Davies 4024cb6681 Add .hsl().brighter() and .hsl().darker().
Also fix .rgb() and .hsl().
2011-05-05 21:44:40 +01:00
Jason Davies 9e51c6efa3 Propagate data changes to event listeners.
Event listeners are still bound to the index at the time of binding, but data
changes are now visible from the event listener.

Fixes #88.
2011-05-05 18:53:52 +01:00
Jason Davies a591160109 Use prototypes for `d3.rgb()` and `d3.hsl()`.
This turns out to be slightly faster than using structs (`{}`) and is bit
cleaner.  You can now also do:

    d3.rgb(r, g, b).hsl()

and:

    d3.hsl(h, s, l).rgb()

to convert between RGB and HSL.
2011-05-05 17:27:43 +01:00
Jason Davies 8d2bc4b1b3 Simplify `classList` & `className.baseVal` logic. 2011-05-05 16:25:49 +01:00
Jason Davies 2280d51c9d Revert "Use a more precise check for "baseVal" property."
This reverts commit 94d0e1aa18.
2011-05-05 16:20:54 +01:00
Jason Davies 1a83029485 Polylinear scales. Fixes #61.
For example:

    d3.scale.linear()
        .domain([-100, 0, 100])
        .range(["red", "white", "green"]);
2011-05-05 15:29:17 +01:00
Jason Davies 94d0e1aa18 Use a more precise check for "baseVal" property. 2011-05-05 13:31:24 +01:00
Jason Davies 333ddeb07c Use `element.classList` for classed operator.
This is only used if available, and falls back to the regex-based implementation
e.g. for SVG nodes.  See #96.
2011-05-05 13:30:06 +01:00
Jason Davies 668cdaa767 Add `brighter` and `darker` to d3.rgb().
Fixes #138.
2011-05-05 12:38:55 +01:00
Jason Davies bf1be6f5cc Set className to `""` instead of `null`.
Retrieving it in Chrome returns `""` after setting it to `null` anyway.
2011-05-03 17:27:02 +01:00
Jason Davies 7ab5e3567f Better fix for classed operator. Fixes #78. 2011-05-03 17:17:03 +01:00
Jason Davies 1578595a18 Fix classed operator for SVG elements. Fixes #78.
Specifically, removal of a class wasn't working because the `className` property
for SVG elements is an SVGAnimatedString, which has no `replace` method.

It would be nice to have a unit test for this, but env-js doesn't use
SVGAnimatedString for this property.
2011-05-03 12:24:51 +01:00
Jason Davies 33486bb8f9 Minor code simplification. 2011-05-03 11:26:43 +01:00
Mike Bostock a3aebbad56 Merge remote-tracking branch 'jasondavies/monotone' into basis 2011-05-02 18:46:08 -07:00
Mike Bostock a0d4d0bd8e Add cardinal-open interpolation. 2011-05-02 18:42:39 -07:00
Mike Bostock d1c406f43c Add basis-open interpolation. 2011-05-02 17:11:44 -07:00
Jason Davies ae5123f84b Add monotone interpolation for lines and areas.
Based on the Protovis implementation.
2011-05-02 09:13:52 +01:00
Jason Davies 6827da7ec9 Regenerate files. 2011-05-01 23:31:25 +01:00
Mike Bostock df2e3c2a81 Avoid RegExp bug in FF 3.6. 2011-05-01 12:31:34 -07:00
Mike Bostock 995ab7e64b Oops, add generated files. 2011-05-01 10:24:38 -07:00
Mike Bostock 603d86ac1a Compute node position relative to parent.
Previously, we were computing the node position relative to the node, which is
dangerous is the node is transformed. Computing it relative to the parent allows
nodes to be positioned using the "transform" attribute.
2011-05-01 09:58:46 -07:00
Mike Bostock a5586726f0 Merge branch 'master' into jasondavies-immediate-transitions 2011-04-30 21:53:01 -07:00
Mike Bostock 1893d286e7 Rename `immediate` to `flush`. 2011-04-30 21:52:14 -07:00
Mike Bostock f76e5159b5 Merge branch 'jasondavies-qq'
* jasondavies-qq:
  Improvements to qq chart.
  Add x- and y-scales to Q-Q plot.
  Add Q-Q plot.
2011-04-30 21:18:52 -07:00
Mike Bostock 0679598328 Better jittering for coincident nodes. 2011-04-28 11:43:26 -07:00
Mike Bostock 51b8e023c1 Simplify force calculations.
We don't actually need the separate `fx` and `fy` attributes on each node;
instead we can modify the `x` and `y` attributes directly, since we're using
position Verlet! This commit also adds the layout's `alpha` parameter to the
tick event, such that normalized external forces can be applied.
2011-04-28 10:25:23 -07:00
Jason Davies 8e0bc6342f Add d3.timer.immediate() for immediate transitions.
This applies any queued zero-delay d3.timer callbacks immediately.  This is
useful in situations where zero-duration transitions are used e.g. in generic
visualisations that have a configurable transition duration.

It's often desirable to have zero-duration transitions for the initial setup
phase (so that the visualisation displays immediately).  Immediate application
(rather than waiting for the setTimeout callback to fire) avoids a delay of some
milliseconds as well as an extra redraw.

See issue #48.
2011-04-28 00:33:09 +01:00
Mike Bostock ee30e29332 Simplify force layout's gravity computation. 2011-04-27 15:46:49 -07:00
Mike Bostock 229a59cb3f Also prevent clicks from propagating on drag. 2011-04-27 10:23:54 -07:00
Square 9d80ac2d46 Merge branch 'force' 2011-04-26 17:26:21 -07:00
Square 7e5fc72202 Allow `on` to be used with event capturing. 2011-04-26 15:03:10 -07:00
Mike Bostock 020aaa53e1 Update version to 1.12.0. 2011-04-24 22:35:59 -07:00
Mike Bostock 13aafededd Merge branch 'force' 2011-04-24 22:33:56 -07:00
Mike Bostock 420fed15d3 Use default priority of "" rather than null.
Maybe this'll make IE9 happy?
2011-04-24 22:29:36 -07:00
Mike Bostock b15a273327 Merge remote branch 'Caged/master' 2011-04-24 22:09:48 -07:00
Caged 62f0364470 update diagonals, use d3.functor instead of the removed d3_functor function 2011-04-24 12:13:40 -07:00
Mike Bostock 48537d9d42 Don't postpone immediate timers.
Previously, rescheduling an immediate timer would cause it to be postponed again
by a minimum of 24ms. This is undesirable if the timer is being scheduled in
response to user events, such as mousemoves, that can occur very frequently. Now
we schedule an early callback once, and don't touch it if it's rescheduled. In
addition, the timer loop is now smarter about switching between short and long
callbacks. If there's a short delay (< 24ms) until the next timer fires, the
timer will use requestAnimationFrame. For longer delays, setTimeout is used.
2011-04-19 17:50:09 -07:00
Mike Bostock 47f9ced9aa Merge branch 'release' 2011-04-13 23:54:47 -07:00
Mike Bostock 2eb4573f42 Merge branch 'box' into release 2011-04-13 23:53:59 -07:00
Mike Bostock 39dea0102f Merge branch 'cluster' into release 2011-04-13 23:51:29 -07:00
Mike Bostock 7f31d333ad Rename private variable `clamp`. 2011-04-13 23:44:25 -07:00
Mike Bostock 126e625d21 Add d3.svg.diagonal.
This is a utility for creating a Bézier curve between opposite corners of a
rectangle. This is commonly used to draw smooth curves connecting parent and
child nodes in a hierarchical node-link diagram. A projection may be specified
which allows the curve to be transformed from polar coordinates.

This commit also changes the semantics of the recently-added `links` method,
such that the objects have `source` and `target` properties that match the
default diagonal format.
2011-04-13 23:13:06 -07:00
Mike Bostock 222629a7a7 Text transitions.
You can now use the `text` operator on transitions, which has the same effect as
setting the text value at the start of the transition. This is nice if you have
a delayed transition, and avoids a common gotcha.

This commit also simplifies the implementation of the `text` operator using the
standard `textContent` property. This isn't supported on IE8-, but we could
potentially add support in the future using `innerText`.
2011-04-13 18:50:26 -07:00
Mike Bostock dd5b21a363 Fix a bug in d3.interpolateString.
The regular expression wasn't being reset, so we weren't always finding numbers!
2011-04-13 17:16:51 -07:00
Jason Davies b6b39af267 Expose `d3_functor` as `d3.functor`.
This is so it can be used in other modules such as the charts module.
2011-04-13 20:34:13 +01:00
Nelson Minar c7c9e7fad4 rename clamped() method to clamp() 2011-04-12 02:09:19 +00:00
Nelson Minar 2548d4fa32 Merge branch 'master' of https://github.com/mbostock/d3
Conflicts:
	d3.min.js
2011-04-12 02:02:48 +00:00