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

1159 Коммитов

Автор SHA1 Сообщение Дата
Peter Woodman 6ca72c41e7 fix significant figures formatting ('r') when specifying a precision for input 0. 2011-09-20 15:08:51 -07:00
Mike Bostock 612d23780c Fix a bug when charge forces are zero.
This was causing a divide by zero in the center-of-charge calculation.
2011-09-20 12:19:04 -07:00
Jason Davies b4c086061e Fix sort due to lack of NodeList.prototype.sort.
NodeList doesn't support .sort() directly, so we need to convert to a
real Array first.  I've done this in selectAll for efficiency i.e. this
avoids a new Array being created every time the same selection is
sorted.  However, it may be slightly more efficient to create the Array
only when sorting, to avoid unnecessary Array creation when sorting
isn't used, which is probably the common case.

Unfortunately it's difficult to test this because JSDOM uses a real
Array instead of a NodeList!
2011-09-19 09:26:25 +01:00
Jason Davies 9a8b38370b Add test for coincident circles. 2011-09-18 13:43:24 +01:00
Jason Davies 016ed70559 Make residual floating point test clearer.
This test makes sure NaN doesn't creep in due to Math.acos being called
on numbers like +/- 1.000000000004, so it's more descriptive to check
isNaN rather than the exact numerical results.
2011-09-18 10:47:03 +01:00
Mike Bostock fb38f19b2e Merge branch 'release' 2011-09-17 20:35:40 -07:00
Mike Bostock 0a7af55aa9 Fix variable charges for force layout. 2011-09-17 20:32:04 -07:00
Mike Bostock 8a58b52c33 Merge branch 'patch-1' of https://github.com/yasirs/d3 into release 2011-09-17 20:09:00 -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 ee10316d97 Merge branch 'pack' of https://github.com/jasondavies/d3 into release 2011-09-17 20:05:09 -07:00
Mike Bostock 76b718092a Remove unused code.
The hierarchy layout is abstract; the nodes method is defined on subclasses.
2011-09-17 19:19:23 -07:00
Mike Bostock 41329688c2 Merge branch 'hierarchy-children' of https://github.com/jasondavies/d3 into release 2011-09-17 19:04:02 -07:00
Mike Bostock be57c31753 Merge branch 'line-minimize' into release 2011-09-17 19:03:16 -07:00
Mike Bostock 8f78039773 Rename equirect to equirectangular; add test. 2011-09-17 19:02:34 -07:00
Lars Kotthoff 93a0a0c370 add equirectangular projection 2011-09-15 19:03:28 +01:00
yasirs 93863f8607 back to calling it quad.count 2011-09-14 21:15:38 -03:00
yasirs 286b0000de check for charge or alpha to be zero before calculating 2011-09-14 21:13:31 -03:00
yasirs 8be42d5682 We don't need d3_layout_forceCharge anymore. 2011-09-14 18:08:25 -03:00
yasirs f66ea6e38e number recursion for charge 2011-09-14 18:04:48 -03:00
yasirs d2113c4795 not using functor for charge 2011-09-14 18:01:08 -03:00
yasirs 94af2035f8 passed charges to forceAccumulate 2011-09-14 17:54:40 -03:00
yasirs 2ad361722d using correct index in forceAccumulate 2011-09-14 17:47:07 -03:00
yasirs 2c93581da7 deleted old charge method; quad.count replaced by quad.totalCharge to reflect what we are calculating; charge no longer appears in `k` calculation in repulsive force calculations. 2011-09-14 17:38:46 -03:00
yasirs b9da841fd8 node level charge 2011-09-14 17:23:53 -03:00
yasirs 9ea694e991 node dependent charges array 2011-09-14 17:17:30 -03:00
yasirs 467b89ac96 Adding chargeMultiplier to individual points in d3.layout.force 2011-09-14 15:58:18 -03:00
Mike Bostock 8436904cb3 Tiny optimization. 2011-09-14 11:15:50 -07:00
Jason Davies d832335c6d Reinstate d3.geo.greatCircle.n.
For backwards compatibility.  Setting precision turns off n, and vice
versa.
2011-09-12 17:32:36 +01:00
Jason Davies 15dda93e3b Reinstate d3.geo.greatCircle.polyline.
For backwards compatibility.
2011-09-12 17:23:32 +01:00
Jason Davies 2a6c2dbfa5 Optimise d3.geo.clip.
We can interpolate the exact distance to the clipping edge, and use this
to interpolate the point exactly instead of computing a full path and
picking the closest point.
2011-09-12 15:23:30 +01:00
Jason Davies 8ad87e48e7 Fix clipping bug.
A point wasn't being inserted after the interpolated point when entering
the clip region.
2011-09-12 14:10:45 +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 0a1af36dcc Move earth radius constant to d3_geo_earthRadius. 2011-09-12 10:56:24 +01:00
Jason Davies aa2ee0197b Remove unintentional change to greatCircle. 2011-09-12 10:24:43 +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
Mike Bostock 02da7024d3 Update package.json's version number. 2011-09-11 17:36:16 -07:00
Jason Davies afe60a14e6 Add azimuthal "equalarea" projection mode. 2011-09-10 13:42:45 +01:00
Jason Davies 1e017e60b6 Add azimuthal equidistant projection mode. 2011-09-10 13:34:19 +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 e09f19c91a Merge pull request #288 from jasondavies/science
Update science.js to 1.7.0: fix science.stats.kde.
2011-09-09 15:41:35 -07:00
Jason Davies 3c0cdb2285 Update science.js to 1.7.0: fix science.stats.kde. 2011-09-09 23:37:59 +01:00
Jason Davies 8d6511a2d0 Use partition.nodes in tests for consistency. 2011-09-09 08:20:55 +01:00
Jason Davies 3b629b4493 Add empty children test for partition layout. 2011-09-08 09:12:38 +01:00
Jason Davies 1873142295 Add empty children test for treemap layout. 2011-09-08 09:04:13 +01:00
Jason Davies feef31a492 Add empty children/zero tests for cluster layout. 2011-09-08 09:00:24 +01:00
Jason Davies ab525c4784 Fix empty children handling for revalue.
Also, fix empty children handling for cluster layout.

Tests included.
2011-09-08 08:58:29 +01:00
Jason Davies d024c3f82c Treat nodes with empty children arrays as leaves.
Fixes #286.
2011-09-08 00:26:44 +01:00