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

340 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock + Erica Kwan ed71513b99 Fix #239: Add missing width & height attrs. 2011-08-09 18:52:52 -07:00
Mike Bostock ce75813d15 Simplify padding. 2011-08-09 12:29:17 -07:00
Mike Bostock 3158645458 Add bounded force layout example. 2011-08-09 12:28:59 -07:00
Mike Bostock d7ae2b8527 Add Crimean War stacked bar example. 2011-08-09 11:24:48 -07:00
Mike Bostock 3be57161b1 Add population example. 2011-08-01 14:58:30 -07:00
Mike Bostock 62c7399e06 Remove padding. 2011-07-31 16:14:21 -07:00
Mike Bostock 6ff9103ef1 Handle padding overflow in treemap layout. 2011-07-20 15:11:07 -07:00
Jason Davies d4459481b2 Add SVG-based treemap example. 2011-07-20 09:07:14 +01:00
Jason Davies 62bcec0998 Add support for padding to treemap layout.
The new "padding" property is an array of [top, right, bottom, left], or a
function that returns such an array for a given node.
2011-07-19 21:35:19 +01:00
Mike Bostock c1d7fbc172 Merge branch 'touch' into release
This includes nearly a complete rewrite of d3.behavior.zoom, more closely
modeled after the Polymaps po.drag, po.touch and po.wheel classes. This makes
the code simpler and also fixes a bug when releasing one of two fingers.
2011-07-09 20:30:14 -07:00
Mike Bostock aa928b6c3e Merge branch 'jasondavies/force-touch' into release
I simplified the implementation to only support single-touch. I also opted not
to include touch support in the force-dynamic example (and other examples), just
because it complicates the examples too much. Touch is nice but I don't want it
to interfere with people learning the basics.

This merge also has an extra bonus fix: you can now have multiple force layouts
with dragging on the same page, and the drag behavior will do the direct the
event to the appropriate force layout.
2011-07-09 15:55:44 -07:00
Mike Bostock 0bedbd739f Merge branch 'kde' into release 2011-07-09 14:45:19 -07:00
Mike Bostock 4cb00f4e92 Add force-directed map example. 2011-07-08 22:39:34 -07:00
Jason Davies 7f8db7fd14 Remove force.gravityCenter.
Simpler to perform gravity calculations in a custom tick handler.
2011-07-09 00:24:17 +01:00
Jason Davies ca8870778a Add per-node gravity: force.gravityCenter.
This allows the Dorling/Demers cartograms to be slightly closer to the real
geography.

Also, fix the Dorling collision detection as self-collisions were previously
being detected.  Thanks, Mike!

Lastly, I've removed the variable per-link distance as this is no longer needed.
2011-07-08 23:23:50 +01:00
Jason Davies 287b2ea59e Add strokes to Dorling and Demers cartograms. 2011-07-08 22:55:23 +01:00
Jason Davies 9f0e6271f9 Add Demers cartogram example.
Like a Dorling cartogram, but with squares instead of circles.
2011-07-08 22:41:01 +01:00
Jason Davies 564418ff62 Nicer colors for Dorling cartogram. 2011-07-08 22:19:28 +01:00
Jason Davies bb5d7873a7 Use collision detection for Dorling cartogram. 2011-07-08 22:11:49 +01:00
Jason Davies 679d816dfd Initial version of Dorling cartogram example.
This version uses variable-length links, but I think collision detection
performed after initial positioning at state centroids would look better.
2011-07-08 21:55:31 +01:00
Jason Davies 71490ced64 Add missing force.linkStrength property.
Also update examples to use force.linkDistance instead of force.distance.
2011-07-08 21:23:41 +01:00
Jason Davies fe11bc6493 Remove dangling d3.stats.js reference. 2011-07-06 23:19:45 +01:00
Jason Davies 2e765ae60e Move data files and delete symlinks. 2011-07-06 20:29:48 +01:00
Jason Davies 7c461b2205 Merge branch 'master' into kde
Conflicts:
	Makefile
	d3.js
	d3.min.js
	src/core/sum.js
2011-07-06 19:54:58 +01:00
Jason Davies e0a0455f7b Move d3.stats to external lib, science.stats.js! 2011-07-06 18:57:14 +01:00
Mike Bostock 489eb0cde7 Delete symlinks. 2011-07-04 09:43:37 -07:00
Mike Bostock 1104e6fd83 Move flare-imports.json to the data folder. 2011-07-04 09:41:32 -07:00
Mike Bostock b6983951e1 Merge branch 'master' of https://github.com/jmalonzo/d3 into jmalonzo-master 2011-07-04 09:38:25 -07:00
Jan Alonzo 598cd6a08c Update cartogram/choropleth symlink to point to examples/data.
Related: 6bdbe4b863
2011-07-04 17:05:56 +10:00
Mike Bostock 1e64727eca Prettier colors. 2011-07-03 07:59:09 -07:00
Mike Bostock 6e972732d8 Add force toggle example. 2011-07-03 07:46:07 -07:00
Mike Bostock 0696bf089f Backwards-compatibility for inlining.
There's now a new API for invoking the hierarchy layout (hierarchy.nodes) rather
than calling the layout function directly. Calling the new API enables inlining,
which is disabled by default for backwards-compatibility.
2011-07-02 17:14:34 -07:00
Mike Bostock 4bf829f46f Add expandable tree. 2011-07-02 16:38:00 -07:00
Mike Bostock 70b9f51ba4 Fix interrupted transitions. 2011-07-02 16:36:59 -07:00
Mike Bostock 6bdbe4b863 Move data files into examples directory.
This way, we don't need symlinks (which don't work on Windows). This commit also
simplifies the structure of the flare.json file, so that we don't need to tricky
conversion of the JSON map—it can be read directly by the hierarchy layout.
2011-07-02 16:31:12 -07:00
Mike Bostock bd505a22a9 Remove `inline` property, making it the default. 2011-07-02 15:59:19 -07:00
Mike Bostock 2773cd9f27 Adopt inline(true) for all hierarchy examples.
The ones with transitions were a bit trickier, because they depended on the
layout creating new copy of the nodes when the layout runs.
2011-07-02 15:49:50 -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
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 eac8831208 Add d3.svg.area.radial. 2011-06-23 20:49:33 -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 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