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

Chart is too big on initial load #926

Closed
munroe7 opened this issue Sep 19, 2019 · 2 comments
Closed

Chart is too big on initial load #926

munroe7 opened this issue Sep 19, 2019 · 2 comments

Comments

@munroe7
Copy link

munroe7 commented Sep 19, 2019

I'm having a similar problem to what is described here: #454

When my page first loads, the chart does not fit in it's container. If I resize the windows then the chart snaps to the correct size. I've tried changing height and width to '100% and setting parentHeightOffset to 0. None of this seems to make a difference.

image

When the chart is too big, it has a width of 607px. If I shrink the window and make it full screen again, the chart changes to 540px and fits perfectly

image

@munroe7
Copy link
Author

munroe7 commented Sep 19, 2019

I'm using react-apexcharts with antd component library

@munroe7
Copy link
Author

munroe7 commented Sep 19, 2019

I was able to fix this issue by delaying the rendering of my chart. I render my columns first and then have a 500 millisecond delay so that the chart renders within the box properly

@munroe7 munroe7 closed this as completed Sep 19, 2019
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

1 participant