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

19 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 84a6255236 Checkpoint example cleanup. 2012-10-11 16:34:17 -07:00
Mike Bostock d3f855ae01 Rename d3.v3.js to d3.js.
We'll still use the major-versioned name file for d3js.org, but this is simpler.
2012-10-05 18:46:05 -07:00
Mike Bostock cdffe18d38 Fix two errors in examples. 2012-04-15 14:30:52 -07:00
Kristofer Monisit c8c6292b26 Bring box example up-to-date 2012-04-06 10:14:06 +08:00
Mike Bostock f80b1cf244 Add selection.datum. Fixes #489. 2012-02-21 10:31:15 -08: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 5a87998694 Examples: namespaces are optional as of v2.6.0. 2011-11-23 22:48:13 +00:00
Jason Davies 2e765ae60e Move data files and delete symlinks. 2011-07-06 20:29:48 +01:00
Jason Davies e0a0455f7b Move d3.stats to external lib, science.stats.js! 2011-07-06 18:57:14 +01:00
Jason Davies 4898052101 Add bandwidth selectors for Gaussian kernels.
Thanks @jfirebaugh for the suggestion!  Implementation is based on that of R's
stats module:
<http://stat.ethz.ch/R-manual/R-patched/library/stats/html/bandwidth.html>

This brings a few additional operators to `d3.stats`, including a fairly
rudimentary implementation of variance, discussed at
<http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Two-pass_algorithm>.
2011-05-10 19:06:24 +01:00
Jason Davies 7c533d26cc Add kernel density estimation.
Kernel density estimation is provided via `d3.stats.kde` and the kernel is
configurable; several common kernels are provided in `d3.stats.kernel`.
2011-05-10 00:11:31 +01:00
Mike Bostock c29d4dc1a7 Better box chart transitions.
Preserving object constancy across transitions is tricky! For example, what
happens if we remove the whiskers in a transition? How do we join outliers? This
commit makes a few assumptions explicit:

1. The `quartiles` function must return exactly three elements. This property
must be specified as a function.

2. The `whiskers` function must return exactly 2 elements, or null if no
whiskers are to be displayed. This property must be specified as a function.

3. The `domain` function must return exactly 2 elements, or null if the default
domain should be used. This property can be specified either as a constant or as
a function.

We could generalize this chart to support more than two whiskers, but it doesn't
seem urgent, and it would complicate the transition if the number of whiskers
changes. In a related change, the `whiskers` function does not receive a third
argument containing the quartiles; instead, this is made available by the
`quartiles` property on the values array (the first argument).

The outliers are joined using the `Number` key function. The outlier data is now
stored as indices; this allows reasonable object constancy across transitions
with outliers. Similarly, the tick labels for the quartiles are whiskers are now
separated, such that the whisker labels can be added or removed without spurious
transition.
2011-04-13 17:44:20 -07:00
Jason Davies 12663738d9 Fix quartile calculation.
The outliers were being incorrectly excluded when computing the quartiles.  I've
also added a +/-1.5 IQR whiskers computation for the Morley-Michelson example,
so it replicates the R plot exactly.
2011-04-13 23:40:00 +01:00
Jason Davies f9569c5aac Minor optimisations. 2011-04-13 23:27:52 +01:00
Jason Davies a7b3c3265c Remove unused title svg:g. 2011-04-13 23:20:16 +01:00
Jason Davies 3477764db0 Fix randomize button. 2011-04-13 23:16:10 +01:00
Jason Davies 6c8cef1eef Add Michelson-Morley data for box plot example.
Source: R statistical project
Original source: A. J. Weekes (1986) A Genstat Primer. London: Edward Arnold.
2011-04-13 23:12:18 +01:00
Jason Davies 88eabf1969 Continue renaming "boxplot" to "box". 2011-04-13 22:33:15 +01:00
Jason Davies 0b8aa07ed2 Rename "boxplot" to "box". 2011-04-13 22:31:53 +01:00