简体   繁体   中英

Auto or Random Scatterplot Matrix Selections d3.js

I would like to know if there is a way to have some sort of random selection, or any selection happening when this loads and to stop when a user interacts with it. AS it stands now, people do not realize that they can interact with the chart.

Maybe the top left box could have a selection being drawn and receding?

http://mbostock.github.io/d3/talk/20111116/iris-splom.html

Thanks for any help or suggestions!

You could draw the brush programatically using the extent() method.

also, look at some of the examples in this discussion .

Using the same example you posted, add this to the end of the csv callback:

var e = [[0.4,1.4],[1.4,2.4]]; //set brush range
brush.extent(e);    
cell.call(brush);              //draw brush

and if you want the brush to simulate user interaction:

cell.select(".extent")
.transition()
.attr('width',20).attr('height',20)
.attr('x',10).attr('y',10)
.transition()
.attr('width',80).attr('height',80);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM