mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[docs] Chart example with responsive container and tooltip demo is broken

Open karolis-666 opened this issue 1 year ago • 8 comments

Related page

https://mui.com/x/react-charts/tooltip/#tooltip-position

Kind of issue

Broken demo

Issue description

Opening example in code editor displays missing files

image

Context

No response

Search keywords: chart, charts, responsive, tooltip

Search keywords:

karolis-666 avatar Oct 22 '24 11:10 karolis-666

@karolis-666 I assume it's only broken in codesandbox because it's working when I load the page

The cause is the nested import. The files imported from the demo should not have import themself

alexfauquette avatar Oct 23 '24 10:10 alexfauquette

It's the only example I found that has responsive container and shows tooltip implementation for them.

Exploring source code I can't find those files which are required, so I can't simply understand logic how to implement given example in my code

karolis-666 avatar Oct 23 '24 13:10 karolis-666

@karolis-666 you can see them here https://github.com/mui/mui-x/tree/master/docs/data/charts/tooltip for now @alexfauquette can we pass those as a prop in CustomTooltipPosition or is there any more appropriate fix for that ?

k-rajat19 avatar Oct 23 '24 14:10 k-rajat19

It's the only example I found that has a responsive container and shows tooltip implementation for them.

On my computer, I can see them in the docs. Is there something specific to your browser? Could you try in private navigation without extensions?

https://github.com/user-attachments/assets/c07c974a-de5d-4dc1-a6c3-2ee755919b7c

@k-rajat19 Yes that would be an option. Another one would be to to copy-past then them in each file. Or restart the effort on https://github.com/mui/material-ui/pull/44150

alexfauquette avatar Oct 23 '24 15:10 alexfauquette

These two files imported in code example are not present image

Open this code in codesandbox or stackblitz and you'll see they are missing - app crashing image

karolis-666 avatar Oct 23 '24 20:10 karolis-666

Thanks for clarification. Then we will restart the effort on https://github.com/mui/material-ui/pull/44150 and if supporting nested imports is too much of a problem, we could fallback on the copy-paste solution

alexfauquette avatar Oct 24 '24 08:10 alexfauquette

should we add the mentioned PR as a fix for this @alexfauquette ?

michelengelen avatar Oct 28 '24 10:10 michelengelen

I will close the issue after checking the PR and the monorepo update correctly fixed it

alexfauquette avatar Oct 28 '24 10:10 alexfauquette

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

[!NOTE] @karolis-666 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

github-actions[bot] avatar Nov 14 '24 16:11 github-actions[bot]