"victory-native": "version": "0.17.1"
It is normal to use the bar chart for the first time and fill in the data, but when changing the data to update the bar chart, it is always wrong to update the bar chart. Please give us some solutions.
PS: try using the following method to solve: 1. Check whether the victory-native Path code is up to date. Check the Internet, it's up to date; 2. Determine whether the filled data is empty. It has been verified that the data is not empty and the data is updated, but the bar chart is not redrawn.
render() {
return (
{
this.props.ishow?
parent: {
justifyContent:'center',
alignItems:'center',
marginTop:20,
},
borderColor:'red',
borderWidth:1,
}}
height={240} width={SCREEN_WIDTH-10} padding={{ top: 40, bottom: 40, right: 5, left: 26 }}
containerComponent={
voronoiDimension="x"
labels={(d) => {
return ${d.chartXValue}\n 值:${d.chartYValue};}}
labelComponent={
cornerRadius={0}
flyoutStyle={{ fill: "white"}}/>}
/>}
domainPadding={{ x: 15,y: 15 }}>{
style={{
data: {
fill: (d) => d.chartColor?d.chartColor:'#489ae3',
width: 7,
fillOpacity: 0.9,
strokeWidth: 1
}
}}
data={this.props.chartData}
x={(d) => d.zz}
y={(d) => {
if(d.chartYValue=='---'){
return 0;
}
return d.chartYValue;}}/>
}
tickFormat={this.props.radom5}
style={{ axis: { stroke: '#A4A4A4' },
axisLabel: { fontSize: 12, fill: '#000' },
ticks: { stroke: '#A4A4A4',size:5 },
tickLabels: { fontSize: 12, fill: '#999', padding: 5, fontFamily: 'NunitoSans-Regular'},
}} />
domain={this.props.YZhou}
tickFormat={(x)=> x }
style={{ axis: { stroke: '#A4A4A4' },
axisLabel: { fontSize: 12, fill: '#000' },
ticks: { stroke: '#A4A4A4' },
tickLabels: { fontSize: 12, fill: '#999', padding: 5, fontFamily: 'NunitoSans-Regular'},
}}
/>
}
renderItem={this._renderItemList}
keyExtractor={this._extraUniqueKey}/>
);
}
}
Got this error with only
<VictoryChart width={300}>
<VictoryLine data={data} x="x" y="y" />
</VictoryChart>
Stack:

I'm getting the same error with static data, when trying to compute the y property:
I'm getting the same error only when there's one data point in the array otherwise its working fine.
Is there any progress on this or related ones? I'm getting this error as well.
@JackHowa and others
Are folks seeing this on victory-native@^30.0.0?
@JackHowa are you able to try with victory-native@^30.0.0. It looks like a huge version bump, but it's really just an artifact of a change in versioning scheme. The actual breaking changes are actually rather small and uncommon for most users.
hahah yep just upgraded, and will try. thought 0.18.0 -> 30.0.0 was way more drastic. then looked at the changelog :)
I'm getting the RNSVGPath error now that I've seen elsewhere #195 . Since I'm on CRNA, manual linking with react native isn't an option. I tried removing react-native-svg since expo has it already per #173. Any ideas?
dependencies:
"@expo/vector-icons": "^6.3.1",
"axios": "^0.18.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react-native": "^4.0.0",
"currency-formatter": "^1.4.3",
"exp": "^55.0.2",
"expo": "^30.0.0",
"exponent": "^14.0.0",
"isomorphic-fetch": "^2.2.1",
"moment": "^2.22.2",
"prop-types": "^15.6.1",
"react": "16.3.1",
"react-devtools": "^3.2.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-circular-progress": "^1.0.0",
"react-native-cli": "^2.0.1",
"react-native-dotenv": "^0.2.0",
"react-native-elements": "^0.19.1",
"react-native-modal-dropdown": "^0.6.2",
"react-native-phone-call": "^1.0.9",
"react-native-swipe-gestures": "^1.0.2",
"react-native-table-component": "^1.1.8",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^2.13.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-logger": "^3.0.6",
"striptags": "^3.1.1",
"unescape": "^1.0.1",
"victory-native": "^30.0.0",
"react-id-generator": "^0.1.6",
"rn-pdf-reader-js": "^0.1.7"
I'm sorry, I've never been able to reproduce that one. My first try is always nuking node_modules and installing fresh. Sorry I can't be of more help
Appreciate it @boygirl! Think it might be related to an onPress bug #96 . I'm using a VoronoiContainer so fingers-crossed
Most helpful comment
Got this error with only

<VictoryChart width={300}> <VictoryLine data={data} x="x" y="y" /> </VictoryChart>Stack: