react-native-d3-tree-graph icon indicating copy to clipboard operation
react-native-d3-tree-graph copied to clipboard

TypeError: undefined is not an object (evaluating 'start[0].x')

Open TheNomadInOrbit opened this issue 5 years ago • 14 comments

Hi! I'm working on this example and getting this error below which is coming from siblingUtil.js TypeError: undefined is not an object (evaluating 'start[0].x') Please help me out.

Screenshot_20200520-082013_Expo

TheNomadInOrbit avatar May 20 '20 03:05 TheNomadInOrbit

@itsusmanmirza are you running example in this repo ?

codesinghanoop avatar May 26 '20 20:05 codesinghanoop

No not in this repo I'm importing this in my own project, in Home Screen.tsx, and yes I'm using TypeScript as well.

TheNomadInOrbit avatar May 27 '20 07:05 TheNomadInOrbit

are you already having react-native-svg version in your project before integrating this library ? @itsusmanmirza

codesinghanoop avatar May 27 '20 09:05 codesinghanoop

Yes react-native-svg was already installed and I'm using this version. Code_8fM7XZ5we1

TheNomadInOrbit avatar May 27 '20 09:05 TheNomadInOrbit

@itsusmanmirza got it.. In you project you have to use the same version as this library is using..Please try and let me know if you face any issue

codesinghanoop avatar May 27 '20 10:05 codesinghanoop

Alright I'll update you soon.

TheNomadInOrbit avatar May 27 '20 10:05 TheNomadInOrbit

have tried, no luck, not working.

TheNomadInOrbit avatar May 27 '20 11:05 TheNomadInOrbit

@itsusmanmirza can you please share the steps you followed .

codesinghanoop avatar May 27 '20 14:05 codesinghanoop

@itsusmanmirza please share your package.json

codesinghanoop avatar May 27 '20 14:05 codesinghanoop

Due to inactivity closing this for now.

codesinghanoop avatar Jun 01 '20 10:06 codesinghanoop

There is problem in below code (which is given in readme). If we run below code it is shoving TypeError: undefined is not an object (evaluating 'start[0].x'). kindly run example it is working fine,

@codesinghanoop , kindly remove or update below code in readme file. Thank You @codesinghanoop nice work.

import AwesomeHierarchyGraph from 'react-native-d3-tree-graph'

var root = { name: "", id: 1, hidden: true, children: [ { name: "Q", id: 16, no_parent: true }] }

var siblings = [{ source: { id: 3, name: "C" }, target: { id: 11, name: "K" } }]

export default class example extends Component { render() { return ( <View style={styles.container}> <AwesomeHierarchyGraph root = {root} siblings = {siblings} /> </View> ); }

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, });

kr396 avatar Sep 12 '20 17:09 kr396

I have the same issue

michaeljamieson10 avatar Aug 08 '22 15:08 michaeljamieson10

@codesinghanoop facing this issue . Do you have any idea how to solve this?

bishalvaii avatar Feb 09 '24 09:02 bishalvaii

@michaeljamieson10 & @bishalvaii , Run example , Please pick code from readme.md, i will update it later. Let me know if it doesn't works for you

codesinghanoop avatar Feb 10 '24 14:02 codesinghanoop