trungleduc / ipecharts

Echarts Jupyter Widget
https://trungleduc.github.io/ipecharts/
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

charts get squished when scrolling #17

Closed dfguerrerom closed 1 month ago

dfguerrerom commented 1 month ago

Charts get squished after you leave them out your view (by scrolling) and then you create a new widget, which I think that triggers the resize event?

Screencast from 01-10-2024 11:14:29.webm

trungleduc commented 1 month ago

Hmm, are you using the Windowing mode of JupyterLab https://jupyterlab.readthedocs.io/en/latest/getting_started/changelog.html#full-notebook-windowing-mode-improvements ?

dfguerrerom commented 1 month ago

I'm not using windowing mode, the problem also happens in voila...

might it be related to this alert?

image

trungleduc commented 1 month ago

yeah, it looks related. I will check it tonight

trungleduc commented 1 month ago

what is the version of JupyterLab you are using?

dfguerrerom commented 1 month ago

I'm using jupyterlab == 4.2.5 couldn't you reproduce this issue?

trungleduc commented 1 month ago

yes I can, and i think it's because of the windowing mode. We need to improve the resize mechanism

https://github.com/user-attachments/assets/35ef47dd-4621-4a8c-bf7b-a66bacbe2148

dfguerrerom commented 1 month ago

but does that also explain why the same happen in Voila?

Screencast from 01-10-2024 12:10:57.webm

trungleduc commented 1 month ago

the issue in voila is when you close the accordion ? I might be the same problem of having 0-dimension parent. Fixing this issue will apply to both voila and jupyterlab

dfguerrerom commented 1 month ago

the accordion triggers a window resize event, but as the charts are inside an expansion panel, by that moment, they get squished... think that specific one I can fix by triggering a resize window after expanding the panels.

trungleduc commented 1 month ago

Fixed by #18