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].
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).
`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 `%`.
Also fix a bug in precision interpretation.
* "e": exponent notation. * "E": same as "e", except uses "E" as a separator. * "g": precision is interpreted as signficant digits. * "G": same as "g" but uses "E" instead of "e". * "n": equivalent to ",g". * "%": percentages. Fixes #149.
Also, add a fun little example demonstrating multi-touch.
The stack layout can now operate on arbitrary data structures, rather than requiring a specific input format. To do this, you can now specify functions to access values per series, along with x- and y-coordinates. One tricky thing is that the stack layout needs to be able to write the stacked values back into the data; this is accomplished using the customizable `out` function. This function takes three arguments: the current datum (d), the offset value (y0), and the y value. The y value is unchanged unless the "expand" offset is used. This commit also allows you to specify arbitrary functions for order and offset computation, in addition to the built-in methods supported previously.
This reverts commit 1bb3e9b. The performance difference is negligible, and using d3_array results in smaller code.
This avoids unnecessarily creating a new array for every touch event.
This doesn't quite seem like the right place for it, but it seems to work when using "touchstart", "touchmove" and "touchend" handlers without any adverse effects on "true" mouse event handlers. See <http://www.jasondavies.com/apollonian-gasket/> to see an example of combined touch/mouse handlers working with this change.
Not needed for now, since I opted to create customized versions internally.
This commit adds a d3_uninterpolate method (private, for now), which is essentially the inverse of d3.interpolate. It's used to map a value in the domain to the unit range [0,1], which can then be passed to an interpolator.