vizulyNovember 2, 2016 at 9:43 am #6568
SVG (which Vizuly and D3.js are based on) does not support dynamic sizing with percentages natively.
But, you could add an event listener to the browser window that responds to a resize event and use the current DIV height/width to reset the graph size appropriately. I have done this on many projects and I may consider adding a utility for this in the Vizuly library.
One thing to be mindful of, is that each time you resize a graph and call update() that it performs a full re-render, which can slow down the screen refresh. I usually will use a 50-150ms delay when capturing screen resize events to make sure I don’t constantly try to refresh the graph as the user is using their mouse to resize the screen.
I hope that helps.
You must be logged in to reply to this topic.
© 2021 — vizuly.io