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

Charts resize infinitely when placed under a flexbox with flex-direction: column #483

Closed
wctiger opened this issue Jul 9, 2024 · 2 comments
Assignees
Labels
core bug Bug not directly related to the React integration

Comments

@wctiger
Copy link

wctiger commented Jul 9, 2024

Reproduce link

https://stackblitz.com/edit/highcharts-react-template-9oig96?file=src%2FApp.js

Steps to reproduce

  1. Set a chart to fill its container height using the containerProps suggested in How can I make a chart fill its parent div #72
  2. Set the container style as a vertical flexbox: <div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
  3. Insert a div without explicit height props between the container and the chart
  4. Add an arbitrary element above the chart
  5. Resize the width of the container, and the chart will start to self-resize its height infinitely

Expected behavior

I understand this set up is problematic as the container with explicit height is supposed to be direct parent of the chart. However highcharts should not resize infinitely but either do nothing or fail with an explicit error

@KamilKubik KamilKubik self-assigned this Jul 10, 2024
@KamilKubik
Copy link
Contributor

Hello wctiger!

Thanks for bringing up this issue, I agree it shouldn't resize the chart infinitely no matter the outer elements.

I did some more debugging, and it seems there's a problem with the reflow method in the Highcharts Core code. Since it's not directly related to the React integration, I highly encourage you to follow this thread for any further information.

My apologies for the inconvenience,
Kind Regards!

@KamilKubik KamilKubik added the core bug Bug not directly related to the React integration label Jul 10, 2024
@wctiger
Copy link
Author

wctiger commented Jul 10, 2024

Hello wctiger!

Thanks for bringing up this issue, I agree it shouldn't resize the chart infinitely no matter the outer elements.

I did some more debugging, and it seems there's a problem with the reflow method in the Highcharts Core code. Since it's not directly related to the React integration, I highly encourage you to follow this thread for any further information.

My apologies for the inconvenience, Kind Regards!

Thanks a lot for the timely reply, followed the thread and closing this.

@wctiger wctiger closed this as completed Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core bug Bug not directly related to the React integration
Projects
None yet
Development

No branches or pull requests

2 participants