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

100% Width/Height of parent element #63

Closed
jnsgruk opened this issue Apr 5, 2018 · 3 comments
Closed

100% Width/Height of parent element #63

jnsgruk opened this issue Apr 5, 2018 · 3 comments

Comments

@jnsgruk
Copy link

jnsgruk commented Apr 5, 2018

Hi,

How do I best make the graph occupy 100% width/height of its parent element?

Thanks

@danielcaldas
Copy link
Owner

Hello @jonseager, this was already discussed here #23

@t94j0
Copy link

t94j0 commented May 27, 2020

That's talking about the width of the whole screen while he's talking about the parent element. I'm having trouble with this as well. It looks like you need to use a callback and set the bounding box to the width and height. The problem is that the width and height in the config don't seem to update after the first render.

@danielcaldas
Copy link
Owner

That's talking about the width of the whole screen while he's talking about the parent element.

You can still apply the same principle getting the width/height from the parent element and pass it down as props.

The problem is that the width and height in the config don't seem to update after the first render.

You need to properly trigger a re-render of the whole graph. See the live example when we click on the fullscreen button.

Jun-04-2020 18-15-29

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

3 participants