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

29 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 39a74f49ae More efficient degenerate bin check. 2012-03-29 22:07:11 -07:00
Jon Seymour f16141517a Add a test that a degenerate domain does not cause histogram to barf.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
2012-03-24 00:22:07 +11:00
Mike Bostock 3081dd45ef Consolidate everything into d3.v2.js.
Rather than producing separate files for each module, the default build now
produces a single file. This should encourage better page-load performance as
the files were relatively small. Also, it's easier to deal with only one file
rather than many, especially if you're not quite sure what the dependencies are.
You may still create minimized builds, if you don't want every feature.

This commit also demotes the chart components to the examples directory, rather
than keeping them as part of the core library. As always, D3 is not a charting
library, and these were ever only intended to serve as examples.
2012-02-18 14:04:01 -08:00
Jason Davies 1708e5e7a5 Fix treemap overlap problem.
See #136.
2012-01-25 17:36:45 +00:00
Mike Bostock f21d6b826b Fix a bug in circle-packing layout.
There's an edge condition which is not discussed in the original algorithm
("Visualization of Large Hierarchical Data by Circle Packing", Wang et. al):
what happens if the first intersecting circle C_j is equidistant from C_m and
C_n? In other words, it is both after C_n on the front-chain, and before C_m.
The correct answer is that you should splice the smaller of the two circles. If
C_m is smaller than C_n, then splice from C_j to C_n and set C_m to C_j;
otherwise, splice from C_m to C_j, and set C_n to C_j.
2012-01-17 13:02:19 -08:00
Mike Bostock f7c98d10e9 Merge branch 'cluster' of https://github.com/jasondavies/d3 into 2.7.1 2011-12-30 11:58:36 -08:00
Jason Davies c603af8e5e d3.layout.pie: return arcs in original data order.
Fixes #406.
2011-12-13 13:32:51 +00:00
Jason Davies d49c499c68 Handle single node in d3.layout.cluster.
If there is only one node, it will be positioned at y = 0, which is
consistent with d3.layout.tree.

Fixes #396.
2011-12-13 12:49:09 +00:00
Jason Davies c7f58466ad Simplify. 2011-09-30 08:48:28 +01:00
Jason Davies 886b6599bb Another test for empty children arrays.
This tests for the issue fixed in
6804a60fe4.
2011-09-30 08:43:22 +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 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
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
Jason Davies 833bc5dddf Fix previous optimisation and add test. 2011-09-03 22:24:10 +01:00
Jason Davies d237320c39 Handle zero-valued nodes in d3.layout.pack.
Also fixed handling of empty children array.

Fixes #281.
2011-09-02 11:52:24 +01:00
Jason Davies 04d2d546cf Fix negatively-sized rectangles in treemap.
Includes unit test!

Fixes #136.
2011-08-26 18:46:01 +01:00
Mike Bostock 3c0f29943c Add test for tree layout.
For now, test the bug we just fixed.
2011-08-19 11:01:12 -07:00
Mike Bostock 80a4078e8d Add test for layout.partition. 2011-08-15 16:43:59 -07:00
Mike Bostock 67ab76bcc1 Add test for layout.treemap.
Woot! Caught another bug in propagation of NaN node values.
2011-08-15 14:12:17 -07:00
Mike Bostock f25c469d3d Add test for layout.histogram. 2011-08-15 13:32:34 -07:00
Mike Bostock 94f4ed23be Simplify check for zero-area treemap cells. 2011-07-31 16:09:13 -07:00
Mike Bostock a8558d9d40 Merge branch 'time' into release 2011-07-20 15:24:27 -07:00