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

.to_html inconsitencies and question on adding custom coloring #232

Open
ishana23g opened this issue May 14, 2024 · 1 comment
Open

.to_html inconsitencies and question on adding custom coloring #232

ishana23g opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@ishana23g
Copy link

For one when using SigmaGrid there is no to_html. Is this something in the works for a future release? Or is there a technical limitation for this to being done.
However, when going to using a simple Sigma object and if we want to convert it to_html and if height is not specified then the resulting html document when opening will not show anything. I am assuming that the height is implicitly set as 0. To work around this I am currently just hard coding a height, but instead is there a way to just specify fullscreen=True instead like how for the write_html function has?

The second part I have a question on how might one go about trying to have these two sections of node_colors kind of be together if possible.
image
image
Basically I have two set of nodes (events and people) and I want to try and have them uniquely colored (if no duplicate colors can be used great if not that is fine) but on the legend part if I can have two different sections that would be nice.

@Yomguithereal Yomguithereal added bug Something isn't working question Further information is requested labels May 16, 2024
@Yomguithereal
Copy link
Member

For one when using SigmaGrid there is no to_html. Is this something in the works for a future release?

It is just not implemented yet, but it could very well be implemented in a future release. As a workaround you can probably do it on your own from the outside of ipysigma by taking inspiration on this code here: https://github.com/medialab/ipysigma/blob/master/ipysigma/sigma.py#L1127 which is just a convenience wrapper over ipywidgets.embed.embed_minimal_html

However, when going to using a simple Sigma object and if we want to convert it to_html and if height is not specified then the resulting html document when opening will not show anything.

Yes this is a known issue and will be addressed. You should probably rely on the static Sigma.to_html function with fullscreen to True indeed instead for now.

The colouring part of your question might be complicated to address because tied to a very specific use-case. One kinda ugly workaround would be to create an attribute with the same name in both parts, and prefix their values with the name of the part within parentheses for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants