在此示例http://bl.ocks.org/mbostock/1667367中,您如何根据日期为画笔设置初始缩放?
我希望在过去的12个月里专注于加载。
答案 0 :(得分:2)
您可以在绘制图表之前设置extent
of the brush自己brush.extent([minVisibleDate, maxVisibleDate])
,然后调用brushed()
和brush.event(context.select('g.x.brush'))
at the end来设置缩放级别并绘制{{1}分别。