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

Expose label background color and hover color in settings #1357

Open
Bytenex opened this issue May 6, 2023 · 1 comment
Open

Expose label background color and hover color in settings #1357

Bytenex opened this issue May 6, 2023 · 1 comment

Comments

@Bytenex
Copy link

Bytenex commented May 6, 2023

Hey,

currently it's not possible to color the label color when hovered or the background which makes it very hard to use on dark background. Currently I have set the font color to grey so it's visible on the dark background and the white hover background. As labelColor is already an object it would be suitable to add these settings to.

labelColor: { color: '#fff', hover: '#000', background: '#fff' }

@Yomguithereal
Copy link
Collaborator

@Bytenex this can be dealt with using a custom label renderer such as this one here: https://github.com/medialab/ipysigma/blob/master/src/custom-label.ts (or if you want to customize the hover part: https://github.com/medialab/ipysigma/blob/master/src/custom-hover.ts)You can easily make your own to add support for a background color. Then you can pass those functions to your sigma instances in the settings as labelRenderer & hoverRenderer.

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

No branches or pull requests

2 participants