-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bar chart is not updating bar widths #795
Comments
Responsive layout is not yet supported - I'm calling on folks to contribute fixes for 2.1. I'm not sure that it can be completely automatic, as there is apparently no standard event for resizing elements. See e.g. #544 As a workaround, call |
Works perfect! Concerning the standard event for resizing: |
It's worth considering, but I think it may be overkill - at least, I presume there were performance reasons why the bar width was not calculated on every |
I definitely think that the events should be handled by the developer. In some casese debouncing may or may not be desirable, and in some cases with many charts sharing the same resize handler will likely be more efficient and provide greater control. There is nothing stopping a developer from having each chart do its own resize as well. I think making it easy to implement and after that documenting a variety of ways is the best approach. Currently I throttle the browser resize callback from the window and call .render() in it. This recalculates everything but makes it all fit. This has been a really simple and effective approach and I haven't found too many real issues with it. From this conversation I am wondering if I should be calling |
Can anyone who is using |
If I resize the browser window, the widths of the bars don't update. No matter if you resize bigger or smaller. It appears in 2.0.0-alpha.2.
Update code:
Before window resize:
After window resize:
The text was updated successfully, but these errors were encountered: