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
Assignees
Labels

Comments

@StevenLangbroek
Copy link

@StevenLangbroek StevenLangbroek commented Mar 8, 2018

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

This comment has been minimized.

Copy link
Owner

@danielcaldas danielcaldas commented Mar 18, 2018

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

This comment has been minimized.

Copy link

@stale 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 Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.