Permalink
Commits on May 30, 2011
  1. Merge branch 'release'

    mbostock committed May 30, 2011
  2. Rewrite mousewheel hack using D3.

    Also, make sure that the div is positioned absolutely off-screen.
    mbostock committed May 30, 2011
  3. Ignore null and undefined in d3.{min,max}.

    Fixes #161.
    mbostock committed May 30, 2011
  4. Better mousewheel precision.

    Copy Mike's new mousewheel hack from Polymaps.
    
    Fixes #156.
    jasondavies committed May 30, 2011
  5. d3.min & d3.max: ignore NaN at [0].

    Note: this now returns Infinity and -Infinity for zero-element arrays, whereas
    previously an error would have occurred.
    
    Fixes #161.
    jasondavies committed May 30, 2011
Commits on May 28, 2011
Commits on May 27, 2011
  1. Merge branch 'zip' into release

    mbostock committed May 27, 2011
  2. Fix bugs in d3.zip.

     * The returned array should be truncated to the length of the shortest argument.
     * With no arguments it should return an empty array.
    
    I've updated the unit tests to be more verbose to detect the array of
    single-element arrays returned for a single argument.
    jasondavies committed May 27, 2011
  3. Add d3.zip.

    Analagous to Python's built-in zip():
    <http://docs.python.org/library/functions.html#zip>
    
    Fixes #145.
    jasondavies committed May 27, 2011
  4. Prefer style over attr.

    mbostock committed May 27, 2011
Commits on May 26, 2011
  1. Transitions for horizon bands!

    mbostock committed May 26, 2011
Commits on May 22, 2011
  1. Horizon chart improvements.

    Use width and height attributes instead of size, for consistency with other
    chart templates. (Though, note that chart templates are inconsistent with
    layouts in this regard, which use a size property. But let's remain locally
    consistent for now.) Default x and y properties to [0] and [1] to match the
    defaults of d3.svg.area.
    
    Add support for mode and interpolate properties. The mode can be either "offset"
    or "mirror", with the default being "offset". The interpolate property is the
    same as that used by d3.svg.area, and defaults to "linear".
    
    The horizon chart now properly clips the horizon layers, such that if a horizon
    chart is use within a larger SVG element, it will not extend the chart bounds.
    In addition, this commit fixes a bug in how unique IDs are assigned to the clip
    and area paths; it's a shame that SVG does not support a way to refer to paths
    locally.
    
    Note that because negative values are offset or mirrored, the horizon chart will
    render twice as many paths (use elements) as the requested number of bands. For
    example, if the default bands of 1 is used, there will be one negative band and
    one positive band. In the data has no negative values, then the negative band
    will be empty. Keep this in mind as it affects the layer's class attribute
    (such as "q0-3" and "q2-3" for the default single-band horizon).
    mbostock committed May 22, 2011
  2. Remove extraneous parentheses from `new` operator.

    Parentheses are optional if there are no arguments.
    jasondavies committed May 21, 2011
  3. Merge branch 'release'

    mbostock committed May 22, 2011
  4. Simplify new format types.

    I removed the `F`, `G` and `E` types, since these are redundant and we don't
    have to be slavishly-compatible with Python. Also, I simplified the
    implementation of `g`, `e` and `f` so that they use JavaScript's built-in
    `toPrecision`, `toExponential` and `toFixed`, respectively. The existing
    implementations weren't exactly compatible with Python, anyway, so we might as
    well default to using JavaScript's built-ins.
    mbostock committed May 22, 2011
Commits on May 21, 2011
  1. Histogram improvements.

    Rename `ticks` to `bins` to match numpy, matplotlib, and Protovis. Also allow
    the bins to be specified simply as a count, in which case the range is divided
    uniformly into the specified number of bins.
    
    The histogram layout now also takes a `range` property, which specifies the
    minimum and maximum value of the histogram rather than implicitly computing it
    from the values, which is nice if you expect values to fall in a specific range,
    such as [0,1].
    mbostock committed May 21, 2011
  2. Slightly shorter.

    mbostock committed May 21, 2011
  3. Add d3.bisect.

    This is similar to pv.search, but more closely modeled after Python's bisect
    methods to provide the desired flexibility in searching slices of arrays. This
    includes good tests for bisect, and better tests for polylinear and quantile
    scales (both of which now use bisect).
    mbostock committed May 21, 2011
  4. Add reusable horizon chart.

    Still to do: support negative values (offset or mirror modes).
    
    Fixes #152.
    jasondavies committed May 21, 2011
Commits on May 20, 2011
  1. Add support for F, r and p format types.

    `F` is an alias for `f`. `r` is a new format type that rounds the input number,
    treating the precision field as the desired number of significant digits. This
    is similar to `g`, except it never uses exponent notation. `p` is equivalent to
    `r`, except it outputs a percentage, as with `%`.
    mbostock committed May 20, 2011
  2. Add d3.round.

    mbostock committed May 20, 2011
  3. Update unit tests.

    jasondavies committed May 20, 2011
Commits on May 19, 2011
  1. Add unit test for exponential notation.

    Also fix a bug in precision interpretation.
    jasondavies committed May 19, 2011