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

381 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 254a8e3e78 Better world-countries.json.
This was generated using the Natural Earth data set, which has nicer
simplification than my previous approach using MapShaper. Also, this includes
some updated boundaries, such as the split between Sudan and South Sudan. And,
counties now have ISO 3166-1 alpha-3 codes.
2011-09-27 11:59:42 -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 46b358b8a8 Fix a bug in Antarctica.
It's a MultiPolygon, not a Polygon. Those are islands, not holes!
2011-09-27 00:31: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
Mike Bostock fdcf307954 Fix a bug in collapsible force layout example.
We were registering multiple tick listeners, rather than replacing it. Oops!
In the future, we'll probably change the behavior of force.on to match
selection.on, and require a namespace for registering multiple listeners.
2011-09-21 10:08:39 -07:00
Jason Davies 15dda93e3b Reinstate d3.geo.greatCircle.polyline.
For backwards compatibility.
2011-09-12 17:23:32 +01:00
Jason Davies b5b187c7e9 Turn clipping back on for azimuthal example. 2011-09-12 13:47:23 +01:00
Jason Davies cb8afe72b9 Fix azimuthal projections of origin point. 2011-09-12 13:45:04 +01:00
Jason Davies 90cd1bcffa Remove source/target for great circles.
These are redundant now that we can process an array of coordinates.
2011-09-12 13:14:37 +01:00
Jason Davies e284f87b0d Add d3.geo.greatCircle.polyline and precision.
This can be used to process output from d3.geo.clip to ensure clipped
polygons are correctly curved.

The "n" option has been replaced with precision, which denotes the
approximate angular length of great-circle segments.  This is much
faster than using a fixed number of segments, particularly when
processing a large number of polygons, only a few of which may have
edges long enough to warrant being converted into a geodesic.
2011-09-12 12:46:19 +01: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
Jason Davies afe60a14e6 Add azimuthal "equalarea" projection mode. 2011-09-10 13:42:45 +01:00
Jason Davies 71542f6bb1 Add "gnomonic" mode to azimuthal projection.
Also, moved d3_radians to src/geo/geo.js.
2011-09-10 12:51:19 +01:00
Mike Bostock 69bf26e6db Add crimea-stacked-area example. 2011-08-29 16:38:12 -07:00
Mike Bostock a9160b539d Merge branch 'master' of github.com:mbostock/d3 2011-08-29 11:58:09 -07:00
Jason Davies d1d1fc7f1b Fix width/height of treemap-svg example.
In IE9, using style("width", 960) fails with "SCRIPT87: invalid
argument" because strictly speaking, non-zero CSS widths need a unit
e.g. "960px".  In SVG, we normally use width/height attributes via
attr() instead of the CSS equivalents.
2011-08-29 11:40:56 +01:00
Mike Bostock 864c3e9114 Fix a bug in link strength scaling.
There was a bug in the previous fix to increase the stability of link
relaxation; the strength of a link would decrease relative to the link degree of
the connected nodes. Instead of decreasing link strength, we should instead bias
the relaxation so that the lighter node moves more than the heavier node, while
preserving the strength of the link.
2011-08-27 11:49:32 -07:00
Mike Bostock 522c66a45c Merge branch 'firefox-zoom' into release 2011-08-26 16:57:34 -07:00
Jason Davies f1bedbb0b0 Fix KDE example.
It should have been using a probability (density) histogram. I think
there used to be a bug in d3.layout.histogram, which is now fixed.
2011-08-26 21:29:21 +01:00
Mike Bostock f530251899 Fix zooming in Firefox.
We were mistakenly binding Firefox's DOMMouseScroll to dblclick rather than
mousewheel. Also, there's no acceleration on these events, so we need to make
them faster to match the typical behavior of mousewheel.
2011-08-25 09:13:45 -07:00
Mike Bostock 4d161714b3 Add a handful of axis examples. 2011-08-24 17:56:34 -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
Mike Bostock 5126024ad3 Tick subdivision. 2011-08-23 10:45:04 -07:00
Mike Bostock 5eeff4f0fd Add a clip path. 2011-08-23 08:38:18 -07:00
Mike Bostock 8df955283f Add support for axis orientations. 2011-08-22 22:53:51 -07:00
Mike Bostock 15f1bee993 Axis transitions! 2011-08-22 16:35:23 -07:00
Mike Bostock 9dc97e87fe Merge branch 'master' into axis 2011-08-22 16:20:54 -07:00
Mike Bostock c421f90dc0 Tweak example parameters. 2011-08-22 14:20:54 -07:00
Mike Bostock 66598632f9 Merge branch 'zoom-click' of https://github.com/jasondavies/d3 into release 2011-08-22 14:05:06 -07:00
Jason Davies dd2d490524 Prevent click events on drag in zoom behaviour.
You have to hold the mouse quite still though (see the zoom-pan
example).  Perhaps we should have a small allowance for jittery mice?

Fixes #243.
2011-08-22 21:48:21 +01:00
Jason Davies 07affa2265 "psuedo" -> "pseudo". 2011-08-22 21:23:26 +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 0548319663 Add support for axis updates.
But, we don't yet support transitions and proper data joins.
2011-08-19 15:22:46 -07:00
Mike Bostock 83278300fd Allow tickSize to be negative. 2011-08-19 14:45:56 -07:00
Mike Bostock 7184c57fbb Expose tickSize and tickPadding properties. 2011-08-19 14:44:23 -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 34202d4f44 Add example data. 2011-08-19 14:02:47 -07:00
Mike Bostock 377e9e6065 Add marker example. 2011-08-18 10:14:34 -07:00
Mike Bostock 746ec74663 Add tests for xhr and friends. 2011-08-16 22:28:15 -07:00
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