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

labelProperty not implemented? #54

Closed
StevenLangbroek opened this issue Mar 8, 2018 · 2 comments
Closed

labelProperty not implemented? #54

StevenLangbroek opened this issue Mar 8, 2018 · 2 comments
Assignees

Comments

@StevenLangbroek
Copy link

As far as I can tell labelProperty getter hasn't been implemented. Am I missing something? If not, would you like a PR to implement it?

@danielcaldas
Copy link
Owner

Hello there @StevenLangbroek!

Yes, it is implemented indeed. But please note that node.labelProperty is a config value that you must provide within some config object passed into Graph component. In the below examples name should be the label rendered alongside with the node.

const myConfig = {
  height: 400,
  width: 800,
  //...
  node: {
      labelProperty: 'name'
  },
  link: {
      // ...
  }
};

const data = {
    nodes: [
      {id: '1', name: 'John'},
      {id: '2', name: 'Hanna'}
    ],
    links: [
        //...
    ]
};

// render...
<Graph data={data} config={myConfig} />

@danielcaldas danielcaldas self-assigned this Mar 18, 2018
@stale
Copy link

stale bot commented Apr 17, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 17, 2018
@stale stale bot closed this as completed Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants