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

4122 Коммитов

Автор SHA1 Сообщение Дата
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 7048af6b02 Fix a bug in transitions (`tx` is undefined).
If the same element were selected multiple times, then the transition would be
cleared on the associated node, causing `tx` to be undefined. We now abort the
transition in this case, rather than causing a JavaScript error.
2011-01-09 17:33:35 -08:00
Michael Bostock 373ddee706 Add nest, keys, values & entries operators. 2011-01-08 15:18:38 -08:00
Michael Bostock f0bf36690c Fix for nearly whole d3.svg.arc's.
It's surprisingly difficult to render a circle in SVG.
2011-01-05 15:38:38 -08:00
Michael Bostock 888ee9dcfb Reformat us-counties.json for readability. 2011-01-05 15:38:17 -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 bfed47b9d9 Ignore NaN in d3.scale.quantile.
Also, expose a `quantiles` method for returning the array of quantile
thresholds.
2011-01-04 15:01:09 -08:00
Michael Bostock 085eb2fcd0 Add path.area().
This computes the projected area (in square pixels) of the given GeoJSON
object. This is useful for producing choropleth maps that area normalized to
the visible area.
2011-01-04 14:14:53 -08:00
Michael Bostock 19d478f3e0 Add quantile scale. 2011-01-03 10:30:36 -08:00
Michael Bostock 2cdaf6ad00 Fix a bug when rendering certain arcs.
Also, don't forget you need attr("fill-rule", "evenodd") for rings!
2010-12-17 12:50:53 -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
Michael Bostock 8f757c2ffe Update version number. 2010-12-14 14:41:41 -08:00
Michael Bostock c8a2c9d800 Placeholder ticks for d3.scale.pow.
Just reuse the linear tick algorithm for now.
2010-12-14 14:41:04 -08:00
Michael Bostock be85713584 Fix bug in `classed` operator.
Need to reset the `lastIndex` attribute of the regular expression to 0.
2010-12-10 16:14:42 -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
Mike Bostock 8a6d054e6b Clarify Tornado installation instructions. 2010-12-09 14:46:45 -08:00
Jeffrey Heer b9ad0a4af1 Minor tweaks and beautification 2010-12-06 20:48:11 -08:00
Jeffrey Heer ecf796c04a Added contour by marching squares 2010-12-06 20:27:25 -08:00
Michael Bostock 7278115d96 Update version to 0.27.1. 2010-12-06 15:36:22 -08:00
Jeffrey Heer 2f63829ad3 Simple CCW test for convex hull 2010-12-06 12:52:37 -08:00
Michael Bostock 6d97ab2218 Add `classed` operator for toggling CSS classes. 2010-11-30 13:40:05 -08:00
Michael Bostock bbcf25ef7d Fix a bug with zero-duration transitions.
Also, don't generate chords if both the source and target value are zero.
2010-11-28 16:28:48 -08:00
Mike Bostock 6307364a45 Add layout module, with layout.chord class. 2010-11-28 13:15:07 -08:00
Mike Bostock f02364dada More refactoring of svg.chord. 2010-11-28 11:39:35 -08:00
Mike Bostock e08ff41dad Add a little mouseover interaction. 2010-11-27 20:35:57 -08:00
Mike Bostock c86d8bc1be Allow chords to link back to themselves. 2010-11-27 18:19:30 -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
Mike Bostock ed9321d107 Update examples index. 2010-11-27 14:10:07 -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
Michael Bostock d16d680412 Use d3.svg.area for streamgraph example. 2010-11-26 18:01:21 -08:00
Michael Bostock b786b5c607 Add b-spline support to d3.svg.{line,area}.
I'll add support for other types of splines shortly. These classes now also
support constants for the various x and y properties. Also, the area class can
now be used with a variable baseline (y0) for creating streamgraphs. I will
update the current streamgraph demo to use d3.svg.area in a future commit.
2010-11-26 17:55:45 -08:00
Michael Bostock 1855ca2df6 Add moire pattern example. 2010-11-26 15:12:36 -08:00
Michael Bostock 46b5d541bd Minor beautification. 2010-11-22 23:58:27 -08:00
Jeffrey Heer bbe029fa7f Added convex hull at d3.geom.hull 2010-11-22 16:21:46 -08:00
Michael Bostock 9761e25a4a Fix externs. Fix reentrant events. 2010-11-18 17:33:56 -08:00
Michael Bostock 35ec68a74e RGB-HSL and HSL-RGB conversion. New categorical colors. 2010-11-16 00:05:22 -08:00
Michael Bostock 7cb9d581b2 Add selection.node(). 2010-11-11 18:32:13 -08:00
Michael Bostock 5b43420991 Fix delay in stack transition. 2010-11-10 22:43:02 -08:00
Michael Bostock 9f9255800a Add transition.remove. Better staged transitions.
Transitions created within the end event of an earlier transition now reuse
the same transition ID, which allows staged transitions to continue in
parallel even if the a later transition has been scheduled. Now that
transitions support remove, we can dispatch transition end events even if the
active transition does not own the element.
2010-11-10 15:46:58 -08:00
Michael Bostock 7f7ce5cc09 Another fix for concurrent transitions.
Don't run older transitions after newer transitions complete.
2010-11-09 17:54:52 -08:00
Michael Bostock cf6db8aed2 Fix overlapping exit & update transitions. 2010-11-09 16:14:49 -08:00
Michael Bostock 138fd92978 Add Mercator projection. 2010-11-09 14:45:31 -08:00
Michael Bostock d21a500ea8 Fix bug in style tween. 2010-11-09 14:42:31 -08:00
Michael Bostock fbdad9ca73 Add world administrative boundaries GeoJSON file. 2010-11-09 14:41:14 -08:00
Michael Bostock caab7aabd7 Cancel concurrent transitions. 2010-11-08 22:49:31 -08:00
Michael Bostock ef4088ebbe Defer interpolator initialization.
We don't want to compute the start value of the interpolator until the
instance starts transitioning.
2010-11-08 21:55:31 -08:00
Michael Bostock f8557b993f Tweak README. 2010-11-08 14:51:07 -08:00