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.
The brush component now hides the resizers when empty, rather than requiring you
to do this in CSS. In addition, the brush component also temporarily overrides
the body's cursor style, so that the cursor doesn't flicker when dragging.
The brush component now allows you to add decorative elements to serve as brush
resizers, while keeping the default behavior of a few invisible pixels on the
edge of the extent. Any element you add to ".resize" containers can serve as
visible handles for the brush.
This commit also fixes two small bugs with the brush component. First, we now
track the offset between the extent edge and the mouse, rather than immediately
jumping the extent edge to the mouse position; this was barely noticeable
previously due to the resizers being so thin, but it is very noticeable with
large resizers. Second, the default behavior for the SPACE key is not prevented
whilst dragging.
Since the ordinal scale's domain is not continuous, the brush extent is reported
in the range rather than in the domain for ordinal scales. We'll leave it to the
caller to interpret this as desired.
The brush component now reports brushstart and brushend events at the start and
end of a brushing gesture, which is useful for some types of interaction. You
can now set the brush extent programmatically, as well. Note, however, that
you'll probably want to redraw the brush after setting the extent.
You can now query the brush for its selection. This commit also includes a new
d3.random.normal for generating random numbers with a normal distribution. This
is useful for jittering points for display.
The d3.svg.brush component allows one- or two-dimensional rectangular brushing.
A future commit will allow the brushed region to be resized by grabbing an edge,
and also provide some way of reporting the selection (duh)!