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

305 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 7f38862f9f Use d3_identity instead of Object. 2012-03-16 17:17:32 -07:00
Mike Bostock f80b1cf244 Add selection.datum. Fixes #489. 2012-02-21 10:31:15 -08:00
Mike Bostock f1197ed8b6 Use d3.map for d3_svg_symbols.
This fixes a crash with the symbol type "hasOwnProperty", rather than defaulting
to "circle". This commit also adds new map methods to retrieve the keys, values
and entries. The map class now uses non-enumerable properties (if supported).
2012-02-20 21:30:23 -08:00
Mike Bostock 738b634789 Add d3.map.
This is, essentially, an ES6 shim for a Harmony Map. We will use it instead of
using a bare object, so that we don't need to worry about collision with built-
in properties names (such as "__proto__" and "hasOwnProperty").
2012-02-20 11:23:36 -08:00
Mike Bostock f37fd52100 Add d3.scale.identity. Fixes #483. 2012-02-19 20:52:44 -08:00
Mike Bostock 1fac89e74f Merge branch 'mouse' of https://github.com/jasondavies/d3 into jasondavies-mouse 2012-02-19 17:14:41 -08:00
Jason Davies 9c124a687e Merge branch 'master' into mouse
Conflicts:
	Makefile
	d3.min.js
	d3.v2.js
	examples/zoom/zoom.html
2012-02-19 20:18:07 +00:00
Jason Davies a59ade5f55 Rename to d3.{mouse,touches}. 2012-02-19 20:10:47 +00:00
Mike Bostock 077411a236 Add interval.range, and time.scale.nice.
This commit provides a standard interface for time intervals:

  interval.floor(date)
  interval.ceil(date)
  interval.offset(date, k)
  interval.range(start, stop, step)

All local-time intervals (such as d3.time.day) have a UTC-equivalent interval,
available as interval.utc (such as d3.time.day.utc).

Fixes #463. Note that for the time.scale, an interval function is required to
nice (such as d3.time.day). In the future, we might relax that to allow a count
of ticks, similar to the ticks method, but in that case we'd also need the
ability to floor to a given tick number (e.g., every other week) and likewise
for ceil. This seems like a reasonable first implementation.
2012-02-18 22:56:54 -08:00
Mike Bostock 0e4fc7cdc6 Unify interval definitions via d3_time_utc.
Rather than having two implementations for local time and UTC time, we now have
a single local-time implementation and use d3_time_utc to adapt for UTC.
2012-02-18 20:36:06 -08: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 c3516c06a6 Update src/package.js rather than package.json. 2012-02-18 11:51:45 -08:00
Jason Davies 2936a6b1e7 Add d3.svg.{mouse,touches} aliases.
For backwards-compatibility.
2012-02-14 18:45:13 +00:00
Mike Bostock f67e89597d Expand the default custom build. 2012-01-26 11:58:40 -08:00
Jason Davies b426e78dce Rename d3.svg.touches to d3.behavior.touches. 2012-01-09 08:35:57 +00:00
Jason Davies 30e6f51672 Add d3.behavior.mouse: supports both SVG and HTML. 2012-01-09 08:29:30 +00:00
Mike Bostock 4a35d78848 Add selection.order.
It's like selection.sort, except it assumes that the data is already sorted;
the elements are reordered to match the selection.
2011-12-08 17:14:08 -08:00
Mike Bostock 3d6b4cf2fb Add transpose. 2011-11-23 12:44:04 -08:00
Mike Bostock e3f6f33b3d Add d3.transform and d3.interpolateTransform.
This is based on @jasondavies previous work on interpolating 3D matrices,
simplified to only handle 2D transforms, and using SVG to parse transforms.
2011-11-04 16:19:58 -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 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 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 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
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 307016e843 Fix a rounding bug in SI-prefix format.
Also, expose d3.formatPrefix so that it's easier for callers to create a
formatter for a specific prefix (such as using the "G" prefix for all ticks).
2011-10-11 16:46:47 -07:00
Mike Bostock 31cb66f9f1 Add d3.median. 2011-10-10 17:49:53 -07:00
Mike Bostock 9523c4d2d1 Merge branch 'mean' of https://github.com/jasondavies/d3 into mean 2011-10-10 17:41:52 -07:00
Jason Davies da189667c1 Add d3.mean.
Uses Welford's algorithm to avoid overflow.

See #245.
2011-10-07 22:00:44 +01:00
Mike Bostock 05e9a39837 Fix spaces. 2011-10-07 12:22:56 -07:00
Lars Kotthoff f3b8c0ef04 remove duplicate rule and tweak "all" target (mbostock) 2011-10-04 19:34:16 +01:00
Lars Kotthoff 1bd3a255d5 make Makefile GNU make v3.82 compatible
Quote from NEWS file:

In previous versions of make it was acceptable to list one or more explicit
targets followed by one or more pattern targets in the same rule and it
worked "as expected". However, this was not documented as acceptable and if
you listed any explicit targets AFTER the pattern targets, the entire rule
would be mis-parsed. This release removes this ability completely: make
will generate an error message if you mix explicit and pattern targets in
the same rule.
2011-10-03 21:07:38 +01:00
Mike Bostock 6a65451b90 Merge branch 'bonne' of https://github.com/jasondavies/d3 into release 2011-09-27 13:57:56 -07:00
Mike Bostock a70975b248 Merge branch 'gnomonic' into release 2011-09-27 13:56:18 -07:00
Mike Bostock 7d93964615 Add install rule to Makefile. 2011-09-27 13:53:46 -07:00
Mike Bostock bd585e265e Add d3.geo.circle.
There is also a greatCircle as an alias, whose angle defaults to 90 degrees. (Or
should, but some projections cannot handle 90 degrees so we use 89 instead.)
2011-09-27 09:00:23 -07:00
Mike Bostock 14dcdea8f6 Add d3.geo.greatArc.
The greatArc class is the new name for greatCircle, which actually represents
great arcs. Meanwhile, a new greatCircle class is for great circles. The new
greatCircle class replaces the old clip class, providing clipping and resampling
functionality (using greatArc internally). This isn't backwards-compatible, but
I may forgo the major version number bump in light of the fact that greatCircle
was just added, and not used in any (official) examples or documented.
2011-09-27 00:34:22 -07:00
Mike Bostock b678e0876d Merge branch 'gnomonic' of https://github.com/jasondavies/d3 into gnomonic 2011-09-26 16:36:46 -07:00
Jason Davies a6eb928490 Add Bonne geographic projection.
Note that the Werner projection is a special case with standard parallel
at 90°N, and the Sinusoidal projection is also a special case with
standard parallel at 0°N.
2011-09-26 00:58:59 +01:00
Johan Sundström 46891e93eb Make "make test" work even if npm installs pkgs elsewhere. 2011-09-24 15:47:06 -07:00
Mike Bostock f8ce5235e1 Merge branch 'package' of https://github.com/jasondavies/d3 into release 2011-09-17 20:07:56 -07:00
Mike Bostock 8f78039773 Rename equirect to equirectangular; add test. 2011-09-17 19:02:34 -07:00
Jason Davies abc6541cd5 Add d3.geo.clip for radial clipping.
This can be used with d3.geo.path.clip to clip the input coordinates of
geographical shapes using a given origin and angular radius, e.g. for
hemispherical or near-hemispherical views.  Geodesics are inserted as
necessary.

This also includes a minor bugfix and test for d3.geo.path: the last
coordinate of Polygon features was being included unnecessarily
(MultiPolygon already handled this correctly).
2011-09-12 09:27:57 +01:00
Mike Bostock 1e60010370 Merge branch 'greatcircle' of https://github.com/jasondavies/d3 into release 2011-08-29 11:53:22 -07:00
Jason Davies c06043919f Rename d3.geo.greatcircle to d3.geo.greatCircle. 2011-08-29 18:05:09 +01:00
Mike Bostock c2e37352ac Fix for IE9's style.setProperty.
IE9 does not string-coerce values, instead throwing an error. We now wrap IE9's
implementation to force string coercion. While it would be simpler to turn on
string-coercion for all browsers inside D3's style operator, this approach
avoids penalizing standards-compliant browsers.

This commit also moves language-compatibility code to a separate directory, and
deletes the obsolete Object.create polyfill, which is no longer needed by D3.
2011-08-28 19:35:53 -07:00
Jason Davies 399b145a20 Add d3.geo.greatcircle.
Can be used to generate great circle paths.  Similar to R's
geosphere.gcIntermediate (in which I discovered a bug, while writing the
test case for this!)

Includes d3.geo.greatcircle().distance for computing the shortest geo
path distance using the Haversine formula.

For a tutorial on using great circles, see:
http://flowingdata.com/2011/05/11/how-to-map-connections-with-great-circles/
2011-08-28 17:06:48 +01:00
Mike Bostock 5aeb312196 Create the root selection after the prototype.
This fixes a breakage on IE9, which doesn't support array subclassing through
prototype injection. On IE9, we then use direct extension of the prototype, but
this can only be done after the prototype is fully-defined.
2011-08-26 13:17:27 -07:00
Jason Davies a97464fa78 Use pure node.js to generate package.json. 2011-08-26 00:36:40 +01: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 2db0875d75 Merge branch 'd3-all-target' of https://github.com/xaviershay/d3 into custom 2011-08-23 13:09:39 -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
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
Jason Davies 45098edc7a Auto-update version number in package.json. 2011-08-23 14:03:24 +01: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 18b9e11414 Prototype injection!
This changes the core implementation of selections and transitions to use
prototype injection rather than direct extension. This offers better performance
by eliminating per-instance overhead from closures and assignment. On browsers
that don't support prototype injection, we fall back to direct extension.

This commit isn't just about performance, though; the code ends up being a lot
cleaner and more separable if we force methods to rely solely on `this`, rather
than capturing surrounding variables with closures.

Most importantly, transitions are now "transparent", like selections. Rather
than opaque objects, transitions are now arrays of nodes, similar to selections.
The nodes are wrapped in an object that stores the delay and duration, which
means you can now inspect the computed delay and duration. (This was the
original motivation for this commit, and will allow chart components to be
call'd on transitions as well as selections.)

Transitions now support the `each` operator with one argument, which has the
same behavior as on selections. The `each` operator now passes a third argument
containing the group index (`j`). Transitions now also support a `tween`
operator, which is a generic mechanism for doing things during a transition; use
this in place of a "tick" event.

This commit also fixes a few bugs. The enter selection now supports the empty
operator; we can add other operators in the future more easily, if we so choose.
Transition's attr operator now supports namespaced attributes. Selection's
property operator no longer parses property namespaces.
2011-08-20 16:27:25 -07:00
Mike Bostock 4eedce984c Checkpoint axis component.
This is the simplest possible implementation. It does not yet support updating
an existing display, specifying different scales for different instances,
overriding ticks, overriding tick format, transitions, etc. etc.
2011-08-19 14:26:39 -07:00
Mike Bostock 82385841fc Replace submodule with package.json.
This is better, because now we can enumerate all of our dependencies without
embedding them as submodules. After pulling, run `npm install`.
2011-08-18 10:10:16 -07:00
Mike Bostock 00d8bf71a3 Rename lib/uglifyjs to lib/uglify-js. 2011-08-17 16:23:11 -07:00
Mike Bostock 59707f967e Update Makefile test rule and delete lib/env-js. 2011-08-15 16:28:48 -07:00
Mike Bostock 7590713270 Fix #66 - setting domain recomputes range. 2011-08-01 11:16:38 -07:00
Mike Bostock 65d6d9005a Separate targets for testing. 2011-07-31 17:11:34 -07:00
Mike Bostock a8558d9d40 Merge branch 'time' into release 2011-07-20 15:24:27 -07:00
Mike Bostock 9af66f9acd Fix a bug in histogram.frequency.
The logic was inverted. Oops! But now there are tests. Yay!
2011-07-20 15:21:09 -07:00
Mike Bostock 4aae4f7560 Add d3.time.scale.utc.
Also fix a bug in d3.time.hour in regards to daylight savings.
Also fix a number of tests that weren't testing the desired functionality.
2011-07-20 13:56:44 -07:00
Mike Bostock e2187aab37 Add d3.time.scale. 2011-07-19 18:44:04 -07:00
Jason Davies de9d623169 Add some tests for 0, negative or NaN values. 2011-07-19 23:07:05 +01:00
Mike Bostock e37031a38c Organize tests into modules. 2011-07-18 18:08:06 -07:00
Mike Bostock ee74c4608a Add various time iteration utilities. 2011-07-18 17:56:30 -07:00
Mike Bostock 075a8789a4 Add d3.quantile. 2011-07-09 15:15:14 -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 eac8831208 Add d3.svg.area.radial. 2011-06-23 20:49:33 -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 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
Mike Bostock de92ecd6f3 Merge branch 'sum' into release 2011-06-16 21:09:41 -07: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 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 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 a1cc8cbef2 Merge branch 'master' into azimuthal 2011-05-30 09:29:34 -07:00
Mike Bostock c7c2af625f Merge branch 'minmax' into release 2011-05-30 09:23:39 -07: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 e2fc8bfe52 Merge branch 'master' into azimuthal 2011-05-28 22:57:18 -07:00
Mike Bostock 0eb59e7c98 Merge branch 'horizon' into release 2011-05-27 14:58:06 -07: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 5bf17dad6d Merge branch 'format' into release 2011-05-21 17:26:29 -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
Jason Davies 5e606729a4 Add reusable horizon chart.
Still to do: support negative values (offset or mirror modes).

Fixes #152.
2011-05-21 10:24:23 +01:00
Mike Bostock a5d46990c6 Merge branch 'master' into histogram 2011-05-20 16:31:51 -07:00
Mike Bostock 01fdc1d93d Add d3.round. 2011-05-20 14:20:17 -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 a5f140709c Add d3.svg.touches for multitouch support. 2011-05-11 17:26:48 +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 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 8aa986dff1 Merge branch 'issue-78' into release 2011-05-07 11:28:48 -07:00
Mike Bostock 1c413cda33 Add tests for classed. 2011-05-07 11:27:48 -07:00
Mike Bostock bf5374423f Merge branch 'color' into release 2011-05-07 11:09:44 -07:00
Mike Bostock 6a2c0ef053 Add tests for hsl. 2011-05-07 11:08:48 -07: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 668cdaa767 Add `brighter` and `darker` to d3.rgb().
Fixes #138.
2011-05-05 12:38:55 +01:00
Jason Davies 05442751f9 Use "Object.keys" if available.
Also added "hasOwnProperty" check in the fallback to avoid enumerating
properties from the prototype chain.  This is the approach recommended in
<https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys>
and elsewhere.

See also: #96.
2011-05-03 13:40:27 +01:00
Mike Bostock 86a4f6fa3d Merge remote-tracking branch 'jasondavies/histogram' into histogram 2011-05-02 18:51:36 -07:00
Jason Davies 48a40eccea Add histogram layout. 2011-05-02 00:04:06 +01:00
Jason Davies f216c18db8 Rename "stereographic" -> "azimuthal".
The aim is to support azimuthal stereographic as one possible azimuthal
projection.  Others are listed here:
http://www.progonos.com/furuti/MapProj/Dither/ProjAz/projAz.html
2011-04-25 12:14:47 +01:00
Jason Davies 82153e60b5 Add Q-Q plot. 2011-04-25 11:44:34 +01:00
Jason Davies 8e3f8104ad Merge branch 'mbostock-master'
Conflicts:
	d3.geo.min.js
2011-04-22 22:28:03 +01: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 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 55ee1b8f87 Add test for interpolate. 2011-04-13 18:19:31 -07:00
Jason Davies 0b8aa07ed2 Rename "boxplot" to "box". 2011-04-13 22:31:53 +01:00
Jason Davies 2e8cd200df Add boxplot chart. 2011-04-13 19:57:57 +01:00
Jason Davies 6ebe9e5779 Add cluster (dendogram) layout.
Based on the Protovis version.  The only difference is that I've dropped
the `orient`, `innerRadius` and `outerRadius` properties so that the D3
version is more flexible.
2011-04-11 11:19:59 +01:00
Jason Davies ccfbb06729 Add circle-packing layout.
Based on the Protovis layout.  I've kept the convention of using `size`
for the width/height and `separation` for the spacing.  The Protovis
layout had a `size` property but this was used to compute the radius.
I've left this out as I've assumed it's straightforward enough to pass
in the appropriate `radius` function instead.  Likewise, I think the
existing hierarchy `sort` property can handle situations that `order`
was intended for in the Protovis version.
2011-04-11 10:01:11 +01:00
Jason Davies f208a5be09 Add Reingold-Tilford tree layout.
This is based on the Protovis layout; virtually no changes were needed
to the code aside from handling of previous and next siblings.
2011-04-10 16:20:51 +01:00
Mike Bostock 3e1e4f1e7c Add remove test. 2011-04-09 12:08:22 -07:00
Mike Bostock 0f8c8007a6 Add insert test. 2011-04-09 12:05:55 -07:00
Jason Davies edf75a3c36 Move bullet to new `chart` module. 2011-04-07 17:54:03 +01:00
Jason Davies 28fbabf768 First stab at bullet layout. 2011-04-06 19:47:55 +01:00
Mike Bostock 96f6374f72 Merge branch 'uglifyjs' of https://github.com/jasondavies/d3 into jasondavies-uglifyjs 2011-04-05 10:22:51 -07:00
Michael Bostock c572c7071f Add basic tests for d3.nest. 2011-03-26 18:50:32 +01:00
Jason Davies 1dfd3350dc Replace Google's closure compiler with UglifyJS.
UglifyJS requires Node.js to run, but it's a lot faster than Google's
compiler and produces smaller gzipped sizes.  Some of the non-gzipped
sizes are a bit larger than Google's but I think the gzipped size is
more important.  Faster runtime is also good when we start testing the
minified versions too.
2011-03-25 10:28:41 +00:00
Michael Bostock 87a9b002e5 Merge branch 'csv_newlines' of https://github.com/jasondavies/d3 into jasondavies-csv_newlines 2011-03-17 17:35:04 -07:00
Michael Bostock 723a531874 Fix a type-coercion bug with scale domains. 2011-03-13 11:38:10 -07:00
Mike Bostock 244338925f Add tests for d3.svg.arc. 2011-03-12 20:24:17 -08:00
Mike Bostock 3fff37a56d Add tests for d3.svg.symbol. 2011-03-12 20:17:31 -08:00
Mike Bostock ff9da42269 Fix a couple bugs in d3.time.format.
First, we were using the wrong space-filling format for %d and equivalent.
Second, we weren't parsing numbers with optional leading spaces correctly.
Yay tests!
2011-03-12 17:00:55 -08:00
Mike Bostock aad495add3 Add step-{before,after} interpolation.
Also add tests for d3.svg.area and d3.svg.line.
2011-03-12 12:43:51 -08:00
Jason Davies 2248e04ae4 Fix CSV parsing of \r\n and \r 2011-03-12 20:43:15 +00:00
Michael Bostock abae3f9263 Add hierarchy & partition layouts.
Also, expose d3.rebind to make it a bit easier to compose classes.
2011-03-12 10:27:05 -08:00
Mike Bostock a6d5b6f4de Merge branch 'jasondavies-new_closure_compiler' into mbostock-master 2011-03-12 08:27:58 -08:00
Jason Davies d2ede7ce69 Add unit test for minified d3.call(). 2011-03-12 12:09:30 +00:00
Jason Davies d26d03439c Merge branch 'master' of http://github.com/mbostock/d3 2011-03-12 00:32:37 +00:00
Mike Bostock 996e21eb1b Fix typo in d3.scale.pow. Add tests. 2011-03-10 17:33:53 -08:00
Michael Bostock 871cefc0a4 Add a few tests for d3.scale.linear. 2011-03-08 14:24:23 -08:00
Michael Bostock 1be121ae20 Unplug env-js' timer module.
This was breaking setTimeout and setInterval in Node, since I've already
unplugged env-js' event loop. With that out of the way, we can write tests for
transitions!
2011-03-04 16:35:16 -08:00
Michael Bostock eaed6b880b Ack, Sizzle doesn't sort by default.
The Selectors API guarantees that results are returned in document order, but
Sizzle does not, by default. So now we sort the results when using Sizzle. Yay
tests!
2011-03-04 16:05:53 -08:00
Jason Davies 87adc077b9 Merge branch 'master' of http://github.com/mbostock/d3 2011-03-04 23:55:42 +00:00
Michael Bostock 50ebc155cb Test (and fixes) for d3.format. 2011-03-04 15:25:09 -08:00
Michael Bostock 36e935a8c8 Add force & treemap to d3.layout. 2011-03-03 15:43:57 -08:00
Jason Davies 92ad7c065c Add polar stereographic projection 2011-03-02 21:10:32 +00:00
Michael Bostock ade083dd56 More convenient pies.
This adds d3.layout.pie, which can be used to compute the start and end angles
for arcs given an arbitrary array of data. In addition, d3.svg.arc now has a
`centroid` method that computes the center of the arc, useful for labeling.
Together these changes greatly simplify the donut & pie examples.

This commit also includes a `map` method for selections, which is similar to the
`filter` method. This allows you to map the data bound to the current selection.
I'm not currently using it, but it seems like a useful feature for those cases
where you want to rebind the current selection to different (but related) data.
2011-02-24 14:13:05 -08:00