Apexcharts.js: Resizing Troubles

Created on 15 Feb 2019  路  6Comments  路  Source: apexcharts/apexcharts.js

Codepen

Codepen here: https://codepen.io/anon/pen/jdeQzp

Explanation

Expected Behavior
This may be a silly expection, but;

  1. Load the CodePen
  2. Click The "test" Button
  3. Observe that the chart overflows its container. (Here, I expected it to resize to fit)
  4. Resize the window just a bit.
  5. Observe that the chart fills the container as expected.
  6. Click the "test" button again.
  7. Observe that the chart is now too small. It does not fill the container. (Here I expected it to resize to fill)
  8. Resize the window just a bit
  9. Observe that the chart fills its container as expected.

I tried to also capture it in this Gif;
https://i.imgur.com/eZqR6lH.gif

  • What error message are you getting?
    No Error Messages.

  • Additional
    I was wondering, is there any way to force a re-check of the container size by calling some function?

Most helpful comment

Still having this problem

All 6 comments

Thanks for reporting the issue. The resize listener for the parent element was not firing for certain conditions. Just fixed it.

That's awesome.
Thanks for the quick reply and fix.
Do you have an ETA. for when this fix will be included in the latest package on npm? :)

Tomorrow :)

Still having this problem

haha i just solved this from a very hillarious way, in my case, when i open the drawer the first chart doesnt resizes correctly but the other do it, so in order to have a first 'phantom' chart, i just put it inside my flexbox and css it with display:'none', now everthing is working correctly, I know is not the best soluction but since there is not a solution i just well, figured it out from that way.

I'm also having this issue, what's the best way to reslove

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maasha picture maasha  路  3Comments

EroTiXx picture EroTiXx  路  3Comments

tcarlsen picture tcarlsen  路  3Comments

ordago picture ordago  路  3Comments

Sumon-miazi picture Sumon-miazi  路  3Comments