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

Passing an empty data.links array throws a warning #323

Closed
veredwpsemantix opened this issue May 7, 2020 · 1 comment · Fixed by #327
Closed

Passing an empty data.links array throws a warning #323

veredwpsemantix opened this issue May 7, 2020 · 1 comment · Fixed by #327

Comments

@veredwpsemantix
Copy link

veredwpsemantix commented May 7, 2020

I set data to:

const data = {
  nodes: [{
    id: "id",
    color: "red",
    size: 300,
    symbolType: "diamond"
  }]
  links: []
};

When I am Passing the data to the graph, I have got a warning:
react-d3-graph :: Graph :: you are passing invalid data to react-d3-graph. You must include a links array in the data object you're passing down to the component.

@danielcaldas
Copy link
Owner

Hi @veredwpsemantix, you are right. We should not through this warning if you provide an empty array of links. You should be able to draw a graph without links. The warning will be removed.

danielcaldas added a commit that referenced this issue Jul 3, 2020
danielcaldas added a commit that referenced this issue Jul 3, 2020
* Misc improvements cleanup from previous PRs

-  Revert DOCUMENTATION.md to previous version
- Adjustments in documentation
- Add copy to clipboard button to sandbox for graph configuration field
- Remove eslint rule new-line-after-var
- Small refactor around graph.builder and graph.helper
- Small refactor marker.helper

* Small improvements in sandbox improve copy to clipboard

* Fix unit test

* Add sample for new size API @terahn #342

* Allow users to select the node.labelPosition in the form

* Fix #322

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

Successfully merging a pull request may close this issue.

2 participants