mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.16k stars 1.3k forks source link

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

Open karolis-666 opened 5 days ago

karolis-666 commented 5 days ago

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:

alexfauquette commented 4 days ago

@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

karolis-666 commented 4 days ago

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

k-rajat19 commented 4 days ago

@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 ?

alexfauquette commented 4 days ago

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

karolis-666 commented 4 days ago

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
alexfauquette commented 3 days ago

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