How to filter nodes AND links dynamically in a node-link network in protovis?

Skip to first unread message

Baptiste Gaultier

Oct 27, 2011, 4:52:50 AM10/27/11
to protovis
Hi there,

First, I would like to thank the guys behind protovis for the work
they have done !
Following the old thread I found here :
I wanted to filter dynamically not only the links but also the nodes.

I tried something like :

function update(newfiltervalue) {
filtervalue = newfiltervalue;

var w = 710,
h = 524
filtervalue = 1;

var vis = new pv.Panel()

var layout = vis.add(pv.Layout.Network);

layout.nodes(sensors.nodes.filter(function(d) { return <=

/* ...some code... */

I tried also to filter nodes with the .visible attribute like
so : .visible(function(d) <= filtervalue)
which works but I don't think it's the best way to filter nodes since
links are still visible.

Any help here ?

Baptiste Gaultier

Reply all
Reply to author
0 new messages