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

How to style the svg component? #428

Open
henri-edinb opened this issue Jan 15, 2021 · 2 comments
Open

How to style the svg component? #428

henri-edinb opened this issue Jan 15, 2021 · 2 comments
Labels

Comments

@henri-edinb
Copy link

Describe the solution you'd like
Arbitrary CSS style of the SVG component. For instance, setting the background-color or border. Currently, only width and height are possible, maybe we could set the full SVG style in the config?

Describe your use case
Want to set a background-color and border for the canvas and I'm able to do it in the browser by changing the style directly in the source code.

Describe alternatives you've considered
I might try and add this feature myself if you point me in the right direction.

@antoninklopp
Copy link
Collaborator

Hi @henri-edinb ,

You could style a container div without having to style the graph for most props, example here : codesandbox.

Is this a good enough solution or do you need more customization?

@henri-edinb
Copy link
Author

yeah i tried that, but sometimes it doesn't work very well because the svg component is smaller than the container.. i proposed a simple solution in issue #429 but I'm not sure that the solution is that simple, if it's more complex I guess its not really worth it to spend much time on it cause this div solution seems to work for most cases. thanks!

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

No branches or pull requests

2 participants