[Charts] Cannot import BarElementPath from @mui/x-charts/BarChart/BarElement in a Vite project #11234
Labels
component: charts
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
Steps to reproduce
Link to live example: CodeSandbox
Steps:
BarElementPath
from@mui/x-charts/BarChart/BarElement
Current behavior
Vite fails to import the component.
Expected behavior
Vite should import the component, and it should be renderer correctly.
Context
I was trying to use a slot on my BarChart, in order to try to handle clicks on bars. I could use slotProps to add an onClick props, but I cannot seem to access the data (I need the series and the value clicked).
Your environment
npx @mui/envinfo
System:
OS: macOS 14.0
Binaries:
Node: 20.3.1 - ~/.nvm/versions/node/v20.3.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v20.3.1/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v20.3.1/bin/npm
Browsers:
Chrome: 119.0.6045.159
Edge: Not Found
Safari: 17.0
npmPackages:
@emotion/react: ^11.11.1 => 11.11.1
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.24
@mui/core-downloads-tracker: 5.14.18
@mui/icons-material: ^5.14.12 => 5.14.12
@mui/lab: ^5.0.0-alpha.152 => 5.0.0-alpha.152
@mui/material: ^5.14.18 => 5.14.18
@mui/private-theming: 5.14.18
@mui/styled-engine: 5.14.18
@mui/system: ^5.14.12 => 5.14.18
@mui/types: 7.2.9
@mui/utils: 5.14.18
@mui/x-charts: ^6.18.2 => 6.18.2
@mui/x-data-grid: 6.18.2
@mui/x-data-grid-pro: ^6.18.2 => 6.18.2
@mui/x-date-pickers: 6.16.2
@mui/x-date-pickers-pro: ^6.16.2 => 6.16.2
@mui/x-license-pro: 6.10.2
@types/react: ^18.2.37 => 18.2.37
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
styled-components: ^5.3.11 => 5.3.11
typescript: ^5.2.2 => 5.2.2
Search keywords: charts barelementpath import
Order ID: 58926
The text was updated successfully, but these errors were encountered: