question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while updating property 'd' in shadow node

See original GitHub issue

What is the problem?

Unable to set the value of barchart to 0 which causes me to give below error.

screenshot_2018-03-07-20-12-30 1

When does it happen?

import React from 'react'
import { BarChart } from 'react-native-svg-charts'
import { Defs, LinearGradient, Stop } from "react-native-svg";

class ColorBarExample extends React.PureComponent {

    render() {

        const barDataCritical = [
      {
        value:0,
      },
      {
        value: 0, **// ERROR HAPPPENS WHEN I SET VALUE TO 0**
        svg: {
          fill: 'rgb(226, 225, 223)',
        },
      },
      {
        value: 3,
        svg: {
          fill: 'rgb(239, 203, 133)',
        },
      },
    ];

        return (
            <BarChart
                style={{ height: 200 }}
                data={barDataCritical}
                gridMin={0}
                svg={{ fill: 'rgba(134, 65, 244, 0.8)' }}
                yAccessor={({ item }) => item.value}
                contentInset={{ top: 20, bottom: 20 }}
            />
        )
    }

}

export default ColorBarExample

I’m using these Barchart

What platform?

“react”: “16.1.0”, “react-native”: “0.54.0”, “react-native-svg”: “^6.2.2”, “react-native-svg-charts”: “^4.0.0”, “react-native-vector-icons”: “^4.5.0”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JesperLeklandcommented, Jul 24, 2018

Ah you’re using date strings not date objects, in that cause you should probably do xAccessor={ ({item}) => new Date(item.date) }

0reactions
nomikeepercommented, Jul 24, 2018

When I changed:

                    `xAccessor={ ({ item }) => item.date}`

to

                    `xAccessor={({index}) => index}`

the chart started working fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: Error while updating property 'd' in shadow node ...
Hi! I updated react-native-svg from 4.0.0 to 4.6.1 and now get the following error when running on Android: Error while updating property ......
Read more >
Error while updating property 'X' in shadow node of type
The error explains that it expects a variable as integer, and not as a string value. Example. <BarItem barInterval={'5'} /> is wrong, but...
Read more >
Error while updating property 'height' in shadow node
Error while updating property 'height' in shadow node of type: RCTView when I test on real device, but nothing wrong on emulator ...
Read more >
Error while updating property 'width' in shadow node of type
Coding example for the question Error while updating property 'width' in shadow node of type: RNSVGsvgView-React Native.
Read more >
error while updating property 'justifycontent' in shadow node of ...
Error while updating property allowFontScaling in shadow node of type ... Dismiss Join GitHub today. GitHub is home to over 50 million developers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found