我有两个问题需要解决,它们都与我的d3应用程序有关,该应用程序基于这个。
以下是代码:http://jsfiddle.net/zoa5m20z/
I want to initialize my brush so that only a small specific portion is brushed by default when the app starts up. I tried the following with
.extent
but with no luck.//date parsing function var parseDate = d3.time.format("%Y-%m-%d %H:%M:%S").parse; //setting up brush and defaultExtent var brush = d3.svg.brush() .x(x2) .extent([parseDate("2014-08-11 10:20:00"), parseDate("2014-08-11 18:20:00")]) //trying to intialize brush .on("brush", brushed);
I want to stop my plotted circles from overlapping with the yaxis. I'd like to only plot/show circles to the right of the y-axis when the brush is moved. Just like the canonical Bostock Focus+Context via Brushing Block. I tried playing with the margins and the scales, domains, ranges but to no avail yet.
我想要避免的问题:
我对 d3.js
新手,欢迎并感激所有提示和建议!