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

266 Коммитов

Автор SHA1 Сообщение Дата
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
Michael Bostock 77a061f26d Add d3.svg.symbol.
The `symbol` class can be used to generate dot symbols for scatterplots. This
commit also fixes a couple bugs with negative-domain log and pow scales, as well
as tick generation.
2011-02-13 23:20:10 -08:00
Mike Bostock 0e1c1fad17 Add d3.geo.bounds.
This method can be used for computing the bounding box of arbitrary GeoJSON
objects. This commit also fixes a bug in d3.geo.path, such that it will accept
any GeoJSON object, rather than requiring GeoJSON feature objects.
2011-02-11 19:42:52 -08:00
Michael Bostock d215acef78 Add d3.behavior module.
Includes, as the first behavior, a pan & zoom behavior. The canvas can be panned
by dragging the mouse, and zoomed using the mousewheel (or by double-click). By
listening to redraw events, users can decide whether to implement geometric
zooming (such as by setting the "transform" attribute on an `svg:g` element) or
semantic zooming (by changing the domain of a scale object and repositioning
elements).

This commit also includes two bug fixes. The `d3.format` class now properly
groups thousands of negative numbers, and supports the sign specifier. The
unicode minus symbol \u2212 is used for negative values. The `d3.scale.pow`
class now properly handles negative numbers, as well.
2011-02-11 13:00:41 -08:00
Michael Bostock b4231227e1 Fix two bugs in transitions.
First, always coerce the tween target value (the value of the style or attribute
at the end of the transition) to a string. This guarantees that the correct
interpolator is chosen, and avoids a null dereference.

Second, default color channels to zero rather than undefined, so as to avoid NaN
channel values if there is an error parsing the color. This can occur, say, if
the background color of a div is unset and defaults to "rgba(0, 0, 0, 0)".
2011-02-08 15:59:03 -08:00
Michael Bostock 811aa10f03 Scale interpolators & range rounding.
You can now override the scale interpolator by calling the `interpolate` method.
One particularly useful interpolator is the new `d3.interpolateRound`, which is
like `interpolateNumber`, except that it returns integers. This makes it easier
to produce a scale that outputs exact pixel values, and avoid antialiasing
artifacts.

For convenience, the quantitative scales have a `rangeRound` method which sets
the range and the interpolator at the same time. Similarly, a `rangeRoundBands`
has been added to the ordinal scale.
2011-01-28 13:14:43 -08:00
Michael Bostock 5748994854 Add d3.scale.quantize.
A quantize scale is much like a linear scale, but it returns a discrete value
from a set range (similar to quantile and ordinal scales).
2011-01-25 11:31:54 -08:00
Michael Bostock 1a6163cb1a Add d3.geom.quadtree. 2011-01-21 11:59:05 -08:00
Michael Bostock 65307730a3 Add d3.layout.stack, d3.min, d3.max. 2011-01-17 12:27:29 -08:00
Michael Bostock 487037e1af Merge branch 'jheer-master'
Adds support for contours (d3.geom.contour) and cardinal spline interpolation.
I've extended cardinal spline interpolation to d3.svg.area, and added closed
basis spline interpolation. The spline tension is now set using a named
method, and closed splines can be generated using basis-closed and
cardinal-closed, respectively.

This commit also includes Jeff's nifty clustered force-directed graph example!
2011-01-10 16:05:58 -08:00
Michael Bostock 373ddee706 Add nest, keys, values & entries operators. 2011-01-08 15:18:38 -08:00
Michael Bostock bdcb648849 Turn off the compiler's "advanced" optimizations.
The renaming of attributes is totally not worth the hassle of maintaining an
externs file (or using the awkward `foo["bar"]` syntax). The file size
reduction from the advanced optimizations was negligible, besides!
2011-01-05 11:35:39 -08:00
Michael Bostock 19d478f3e0 Add quantile scale. 2011-01-03 10:30:36 -08:00
Jeffrey Heer 5067f0a35d Move cardinal splines to svg/line.js 2010-12-15 22:06:24 -08:00
Jeffrey Heer 633a931f5b Add cardinal splines and clustered graph example 2010-12-15 09:32:29 -08:00
Jeffrey Heer 70cb5359c9 Merge branch 'master' of git://github.com/mbostock/d3 2010-12-15 08:46:23 -08:00
Mike Bostock 2bdf55ce9c Better XHR utilities.
Two new XHR utilities are included in this commit for fetching XML and HTML
data. The latter can be used to scrape data from websites that don't support a
more suitable API (such as JSON or XML), conveniently using the W3C DOM API
including selectors.

Parsing HTML is surprisingly tricky, as browser support for it is poorly
standardized. It's possible to embed the HTML in the current document or an
iframe, but that runs embedded scripts and loads external resources (images,
stylesheets), which is a security hazard!

Our approach uses the DOM Level 2 Range API, and the nonstandard
createContextualFragment method, which is supported by major browsers.
Strangely, WebKit (Chrome & Safari) can only access the body of the loaded
HTML document, whereas Firefox parses the whole document.
2010-12-09 15:04:24 -08:00
Jeffrey Heer ecf796c04a Added contour by marching squares 2010-12-06 20:27:25 -08:00
Michael Bostock 6d97ab2218 Add `classed` operator for toggling CSS classes. 2010-11-30 13:40:05 -08:00
Mike Bostock 6307364a45 Add layout module, with layout.chord class. 2010-11-28 13:15:07 -08:00
Mike Bostock 5ae51b2538 Simplify svg.chord API.
We now use the same property accessors (startAngle, endAngle and radius) for
two source and target objects. Note that you don't have to structure your data
hierarchically; you can define a source and target accessor that restructures
the data on the fly.
2010-11-27 14:13:02 -08:00
Michael Bostock c021172fe8 Add d3.{split,merge}.
These are symmetric operators for splitting and merging (blending) arrays. The
split operator is useful for line and area charts where some of the data
points may be undefined; split the data into subarrays and render each as its
own line or area. This commit also fixes a bug in d3.svg.line when the data
array is empty.
2010-11-27 10:35:11 -08:00
Mike Bostock 163a37e7cd Add svg.chord class. 2010-11-27 01:07:00 -08:00
Jeffrey Heer bbe029fa7f Added convex hull at d3.geom.hull 2010-11-22 16:21:46 -08:00
Michael Bostock 138fd92978 Add Mercator projection. 2010-11-09 14:45:31 -08:00
Michael Bostock 156ff68f16 Move Voronoi & Delaunay code into geom module. 2010-11-07 21:09:59 -08:00
Michael Bostock a502859902 Add d3.geom module.
For now, just Sutherland-Hodgman clipping and area of a convex polygon.
2010-11-07 13:49:59 -08:00
Michael Bostock 46b80565c9 Almost complete strptime & strftime. 2010-11-05 16:23:53 -07:00
Michael Bostock 6494412aee Don't include geo in the default build. 2010-11-05 00:25:24 -07:00
Michael Bostock cd645ec925 Fix a bug in scale.invert. Add svg.mouse. 2010-11-05 00:11:34 -07:00
Michael Bostock 4b0c68f8fc Add CSV module.
It's not part of the standard build, but it's easy to pull in if you want to
use it.
2010-11-04 22:27:21 -07:00
Mike Bostock 4c1fd11e74 Delete d3.geo.circle.
We can use the transform attribute, and it's more obvious.
2010-11-02 23:25:09 -07:00
Mike Bostock 2eda4baf36 Add symbol map, composite Albers projection. 2010-11-02 23:06:32 -07:00
Michael Bostock a95efee580 Add rudimentary GeoJSON support (with Albers). 2010-11-02 15:27:45 -07:00
Michael Bostock 05a255ca9a Break d3 into {core,scale,svg} modules.
Also enable ADVANCED_OPTIMIZATIONS for the Google compiler.
2010-10-30 15:42:11 -07:00
Michael Bostock b772929db9 Add property, call.
The `property` action allows the setting of arbitrary properties on selected
element, such as the "value" of a form input. The `call` action invokes the
specified function, being passed the current selection (`this`) and optional
additional arguments. This makes it easier to have functions which define sets
of actions, and then apply those actions to any number of selections, similar
to mixin inheritance.
2010-10-26 15:32:41 -07:00
Michael Bostock 84e97371ba Add basic Python-inspired number format. 2010-10-25 00:12:44 -07:00
Michael Bostock 6739d05a05 Fold src/join into src/selection. 2010-10-24 17:09:32 -07:00
Michael Bostock d16d06ef36 First pass at some shape utilities. 2010-10-24 17:05:59 -07:00
Michael Bostock a0f2a670b2 Add categorial color palettes. 2010-10-24 16:15:43 -07:00