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

[Feature Request] Display label/title instead of id on nodes #63

Open
Famondir opened this issue Nov 7, 2023 · 2 comments
Open

[Feature Request] Display label/title instead of id on nodes #63

Famondir opened this issue Nov 7, 2023 · 2 comments

Comments

@Famondir
Copy link

Famondir commented Nov 7, 2023

Hi there,
I wondered if it is possible to display the title or a label under the nodes instead of the id. In my case the ids are urls wich are quite long. So it would be great to show the (shortened) website title instead wich right now is passed in the node_df and thus shown as tooltip. I tried something like this:

Jaal(edge_df, node_df).plot(directed=True, vis_opts={'nodes': {'label': 'node_df[title]'}}) # not working
Jaal(edge_df, node_df).plot(directed=True, vis_opts={'nodes': {'label': 'title'}}) # not working either

I also tried to pass the labels in a label column in the node_df (like in the example with edge labels).

Here you can see how crowded it becomes even with 4 nodes.

image

As a workaround I could create new ids (with numbers eventually combined with the website title) and show the url in the tooltip. But I think it might be handy to just specify the node labels as well.

@Famondir Famondir changed the title Display label/title instead of id on nodes [Feature Request] Display label/title instead of id on nodes Nov 7, 2023
@imohitmayank
Copy link
Owner

Hey @Famondir, it seems some data massaging can solve this. For example, you can put the real identifiers (which could be long) under _id and put the display value under id.
Let me know if this is not helpful.

@imohitmayank
Copy link
Owner

Hey @Famondir , there is a new release which should fix this issue, Please check out v0.1.7
Let me know in case of any issue.

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