Environment and Dependencies:
• Mac
• “expo”: “51.0.12”
• “react”: “18.2.0”
• “react-native-reanimated”: “~3.10.1”
• “react-native-svg”: “^15.3.0”
• “victory-native”: “^41.0.0”
After updating my environment, my charts suddenly stopped working. The error I get is:
ERROR TypeError: Cannot read property ‘material’ of undefined
In fact, I found that none of the victory-native components are loading anymore. I tried logging VictoryTheme, but it also seems to be undefined.
Here are my import statements and the relevant code:
import { VictoryTheme } from 'victory-native';import { VictoryChart, VictoryLine, VictoryZoomContainer, VictoryLabel, VictoryAxis, VictoryArea } from 'victory-native';
<VictoryCharttheme={VictoryTheme.material}width={screenWidth}height={220}scale={{ x: "time" }}padding={{ left: 20, top: 20, right: 80, bottom: 40 }}containerComponent={ <VictoryZoomContainer responsive={false} />}
Can anyone help me resolve this issue?
New contributor
Qinglin Xu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.