Victory-native: Android Error while updating property ‘d’ in shadow node of type:RNSVGPath

Created on 2 Mar 2018  Â·  10Comments  Â·  Source: FormidableLabs/victory-native

"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?{'正在加载中'}: style={{
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={
width={SCREEN_WIDTH-10}
voronoiDimension="x"
labels={(d) => {
return ${d.chartXValue}\n 值:${d.chartYValue};}}
labelComponent={
width={SCREEN_WIDTH/2-50}
cornerRadius={0}
flyoutStyle={{ fill: "white"}}/>}
/>}
domainPadding={{ x: 15,y: 15 }}>{
alignment="start"
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;}}/>
}
theme={VictoryTheme.material}
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'},
}} />
dependentAxis
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'},
}}
/>

}
data={this.props.listRankData}
renderItem={this._renderItemList}
keyExtractor={this._extraUniqueKey}/>

    ); 
}

}

Most helpful comment

Got this error with only
<VictoryChart width={300}> <VictoryLine data={data} x="x" y="y" /> </VictoryChart>
Stack:
screen shot 2018-07-23 at 1 27 07 pm

All 10 comments

Got this error with only
<VictoryChart width={300}> <VictoryLine data={data} x="x" y="y" /> </VictoryChart>
Stack:
screen shot 2018-07-23 at 1 27 07 pm

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChrisGatzo picture ChrisGatzo  Â·  3Comments

JeremyBradshaw7 picture JeremyBradshaw7  Â·  4Comments

hwaterke picture hwaterke  Â·  6Comments

udfalkso picture udfalkso  Â·  4Comments

kkemple picture kkemple  Â·  6Comments