Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predicate function CHILDCOUNT() always returns 0 #34

Open
markhm opened this issue Jun 30, 2018 · 2 comments
Open

Predicate function CHILDCOUNT() always returns 0 #34

markhm opened this issue Jun 30, 2018 · 2 comments

Comments

@markhm
Copy link

markhm commented Jun 30, 2018

As described here:
https://sourceforge.net/p/prefuse/discussion/343012/thread/11121b8a/

Problem still exists, confirmed today.

@markhm
Copy link
Author

markhm commented Jul 1, 2018

It seems there is a bit more nuance to this.

The CHILDCOUNT() and TREEDEPTH() functions work when used a in regular Predicate (e.g. to color nodes, see below), but nót to add an extra data column, e.g. like this:

tree.addColumn("label_child_count", "CONCAT(name,' (',CHILDCOUNT(),')')");.

Working example: https://i.imgur.com/8savFgU.png

alex-rind added a commit that referenced this issue Jul 2, 2019
If a graph's or tree's tuples are accessed they are returned as
TableTuple but should be TablesNodes, so that expressions like
TREEDEPTH() work (cp. #34).
@alex-rind
Copy link
Contributor

That's indeed quite nuanced.

The tree functions work with addColumn on a VisualTree:

VisualTupleSet vt = m_vis.add(tree, t);
vt.addColumn("label_child_count", "CONCAT([name],' (',TREEDEPTH(),')')");

Alternatively, it would be necessary to change some code in prefuse's Graph class (cp. commit 889ad9e).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants