[英]how to set d3.brush extent right?
I am writing a d3 widget based on Mike Bostocks example http://bl.ocks.org/mbostock/1667367 So I am trying to set brush extent with predefined dates, but the extent rectangle is not applied to those dates. 我正在编写一个基于Mike Bostocks示例的d3小部件http://bl.ocks.org/mbostock/1667367所以我试图用预定义的日期设置画笔范围,但是范围矩形不适用于那些日期。
var brush = d3.svg.brush()
.x(x2)
.extent([new Date("May 2001"), new Date("May 2002")])
.on('brush', brushed);
... ...
the entire code here http://plnkr.co/edit/H3nt9t8pw0nXM4yHp25P?p=preview 这里的整个代码http://plnkr.co/edit/H3nt9t8pw0nXM4yHp25P?p=preview
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.