Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

[network] nodes clustering does not "aggregate" edge's label #3495

Open
lesion opened this issue Sep 28, 2017 · 4 comments
Open

[network] nodes clustering does not "aggregate" edge's label #3495

lesion opened this issue Sep 28, 2017 · 4 comments

Comments

@lesion
Copy link

lesion commented Sep 28, 2017

Hi there!
I'm using last visjs version (4.20.1), network component and trying to use cluster feature.
When using label on edges I see them overlapping once clustered:
screenshot from 2017-09-28 16-37-55

I would also expect a method like processProperties to modify clustered edges style (as with nodes), for example to calculate the label written on edge once aggregated.

thanks
ps. very nice lib

@wimrijnders
Copy link
Contributor

Hi there! You've got a problem and a feature request rolled into one issue. Would you mind mentioning the processProperties thing in a different issue, at least if you're serious about it?

As for overlapping labels, yes that's an interesting one. Clustering has been extensively adjusted with many bugs fixed (most recent being #3399), so chances are this is fixed too. However, I can't be sure, because labels of clustered nodes have not really been taken into account.

So my question is: Would you mind making an example that I can use as a test case? The network in the image would do quite nicely, if possible.

@lesion
Copy link
Author

lesion commented Sep 28, 2017

wow this is a fast response

Hi there! You've got a problem and a feature request rolled into one issue. Would you mind mentioning the processProperties thing in a different issue, at least if you're serious about it?

sorry about that, I've done this because I think the two are related: processProperties return properties of clustered node only (cluster nodes are the same kind of object of nodes behind the scene, correct?) so the point is, what kind of label should be shown in clustered edges if there's no way to explicit it? What label should appear when edges are aggregated? That's why I thought it is related to the overlapping labels issue.

I'll check the #3399 issue and make an example asap.
thanks

@wimrijnders
Copy link
Contributor

wow this is a fast response

Yeah, happens when I'm accidentally in front of the computer when an issue rolls in.

OK, what is happening now in the latest develop branch: all the normal edges are hidden under a new cluster edge, so all those labels should just disappear. That leaves you with one replacing cluster edge for which you might set the label.

If you want to set a cluster edge label only, you should be able to use Network#getClusteredEdges() to get the cluster edges and change the labels directly. If you need to set more option, well then an adjusted processProperties might be in order.

FWIW, I have the belief that the problem and feature request are separate things; this should be verified by empirical means, of course.

I didn't mean for you to examine #3399 in-depth, although if you want to, feel free. I just wanted to point out that a lot of work has been done with clusters.

Actually, #3245 seems to be much more relevant to this issue, I suggest checking that one instead. Does it describe something similar to what you are experiencing?

@wimrijnders
Copy link
Contributor

@lesion vis.js v4.21.0 has just been released. Could you check if you still have this problem?

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

No branches or pull requests

2 participants