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

Allow nodes to override strokeColor #122

Closed
danielcaldas opened this issue Oct 3, 2018 · 3 comments

Comments

@danielcaldas
Copy link
Owner

@danielcaldas danielcaldas commented Oct 3, 2018

Right now some of the config properties have node granularity which means that each node can within
itself override the global config.

Clients should be able to override config.node.strokeColor at node level.

For that, we should allow the node builder to get these properties from the node first instead of fetching them
directly from the global config. So basically as we do in config.node.color:

let fill = node.color || config.node.color;

We should have the same for config.node.strokeColor.

Please remember that:

  • configs are documented on top of the graph.config.js file
  • Updating the config to be node granular means that we need to add the symbol 🔍🔍🔍 to that property in the
    config documentation

A good place to start with this issue would be graph.helper.js since is there that node and link properties
are calculated!

Happy Hacktoberfest!

@Andras-Simon

This comment has been minimized.

Copy link
Contributor

@Andras-Simon Andras-Simon commented Oct 3, 2018

@danielcaldas Can I take this?

@danielcaldas

This comment has been minimized.

Copy link
Owner Author

@danielcaldas danielcaldas commented Oct 3, 2018

Godspeed you @Andras-Simon! Go ahead!

Andras-Simon added a commit to Andras-Simon/react-d3-graph that referenced this issue Oct 3, 2018
danielcaldas added a commit that referenced this issue Oct 3, 2018
* feat: Allow nodes to override strokeColor #122

* docs: Update jsdoc for strokeColor

* test: Add test case for strokeColor node granularity
@danielcaldas

This comment has been minimized.

Copy link
Owner Author

@danielcaldas danielcaldas commented Oct 3, 2018

Closing with #123

zvolchak added a commit to zvolchak/react-d3-graph that referenced this issue Oct 29, 2018
* feat: Allow nodes to override strokeColor danielcaldas#122

* docs: Update jsdoc for strokeColor

* test: Add test case for strokeColor node granularity
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.