Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
UsmanTechJive opened this issue May 20, 2020 · 14 comments
Open

Comments

@UsmanTechJive
Copy link

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

@UsmanTechJive UsmanTechJive changed the title Undefined is not an object Issue TypeError: undefined is not an object (evaluating 'start[0].x') May 20, 2020
@codesinghanoop
Copy link
Owner

@itsusmanmirza are you running example in this repo ?

@UsmanTechJive
Copy link
Author

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.

@codesinghanoop
Copy link
Owner

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

@UsmanTechJive
Copy link
Author

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

@codesinghanoop
Copy link
Owner

@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

@UsmanTechJive
Copy link
Author

Alright I'll update you soon.

@UsmanTechJive
Copy link
Author

have tried, no luck, not working.

@codesinghanoop
Copy link
Owner

@itsusmanmirza can you please share the steps you followed .

@codesinghanoop
Copy link
Owner

@itsusmanmirza please share your package.json

@codesinghanoop
Copy link
Owner

Due to inactivity closing this for now.

@kr396
Copy link

kr396 commented Sep 12, 2020

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 (



);
}

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,
},
});

@michaeljamieson10
Copy link

I have the same issue

@bishalvaii
Copy link

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

@codesinghanoop
Copy link
Owner

codesinghanoop commented Feb 10, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants