.x(x)
.on("brush", brush);
.call(brush)
.selectAll('rect')
.attr('y', 0)
.attr('height', height);
brush.extent([0.2, 0.8]);
svg.select(".brush").call(brush);
If the extent is in Dates, then you'd need to pass in Date objects
instead of 0.2 and 0.8. The API changes slightly if you are doing
two-dimensional brushing; see the API reference for details.
You can combine those into a single operation like so:
svg.select(".brush").call(brush.extent([0.2, 0.8]));
For more details on this pattern, see my recent post on chart components:
http://bost.ocks.org/mike/chart/
Mike
You can set pointer-events: none on the brush.
Mike
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
JD
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.