Link to home
Start Free TrialLog in
Avatar of usilunet
usilunetFlag for Switzerland

asked on

Filter graph data in prefuse

I'm trying to filter some data using the prefuse visualization toolkit.
I can create a Graph and show all my data. I need to filter some data.
If I use a ListQueryBinding and add the query to a AndPredicate, thisone to a VisibilityFilter and the filter to an ActionList, nothing happens.
The ComboBox I created using ListQueryBinding.createComboBox(), works fine (it shows all possibility I want to have to filter my data).

I load my data from a GraphML file and my data stucture is a Graph.
Can you help me?

I attach the code that may be useful.
"anno" is a field in my XML source file.

Graph g = new GraphMLReader().readGraph("data/outGraph.xml");
final Visualization vis = new Visualization();
vis.add(graph,g);
 
ListQueryBinding annoQ = new ListQueryBinding(vis.getGroup(edges), "anno");
AndPredicate filter = new AndPredicate(annoQ.getPredicate());
ActionList update = new ActionList(Activity.INFINITY);
update.add(new VisibilityFilter("anno", filter));
update.add(new RepaintAction());
vis.putAction("update", update);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of usilunet
usilunet
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial