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 getting hidden if resized too small #1747

Open
vishnuc opened this issue Dec 1, 2024 · 6 comments
Open

Chart is getting hidden if resized too small #1747

vishnuc opened this issue Dec 1, 2024 · 6 comments

Comments

@vishnuc
Copy link

vishnuc commented Dec 1, 2024

Hi I was forking from v5-candidate today , previously used before forking 2 weeks before .. this bug was not there before.. suddenly today it happened.. check video ..

https://www.youtube.com/watch?v=TMhoAb1dCMQ

@illetid
Copy link
Contributor

illetid commented Dec 10, 2024

Hi @vishnuc, could you please provide a codesandbox with a reproduction of the issue? I tried to replicate the issue but couldn't reproduce it on v5-candidate.

@vishnuc
Copy link
Author

vishnuc commented Dec 10, 2024

Hi , I am travelling , will send you once I am back, just try to create a responsive div and reduce the height of chart very small <=0.. make sure there is pane added to the chart.. should be pane1 and pane2

@illetid
Copy link
Contributor

illetid commented Dec 10, 2024

if you are talking about resizing panes, we have a minimum height of 30 pixels for that. If you are resizing the full chart element into 1px, you need to call chart.timeScale().fitContent(); after that to restore the view. But the best way would be to maintain some minimum height of the chart and prevent resizing after some minimum amount of pixels

@vishnuc
Copy link
Author

vishnuc commented Dec 10, 2024

Hi , can u remove that restriction , because If i have 5 panes (5 indicators) and 5 charts per page.... sometimes its bettter to resize more... Right now I forked the v5 candidate and changed the min pane height const , but it would be great if its removed officially... I see no use for keeping min 30 pixels.

@illetid
Copy link
Contributor

illetid commented Dec 11, 2024

we need to set some minimum height for the pane on resize, but we can think of introducing some API to collapse/restore the pane

@vishnuc
Copy link
Author

vishnuc commented Dec 11, 2024

For pane reszing thats fine , u can stop at 30px .. if you see tradingview original if there are like two panes

1.When pane is resized it stops at 30px
2.But when whole chart div is resized first the timescale is hidden , then panes are resized way less than 30px .. so its better to allow setheight below 30px or on resize observers reduce height accordingly .. as we can handle programatically.. but when resized via pane you can cap at 30px

Also please include api like , hidePane , ShowPane , maximize pane ..

for moving pane we have option I guess (moveTo) and removePane

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

2 participants