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
Closed

Allow nodes to override strokeColor #122

danielcaldas opened this issue Oct 3, 2018 · 3 comments
Labels
enhancement improving existent functionality or performance related good first issue Hacktoberfest Hacktoberfest label

Comments

@danielcaldas
Copy link
Owner

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!

@danielcaldas danielcaldas added enhancement improving existent functionality or performance related good first issue Hacktoberfest Hacktoberfest label labels Oct 3, 2018
@Andras-Simon
Copy link
Contributor

@danielcaldas Can I take this?

@danielcaldas
Copy link
Owner Author

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 pushed 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
Copy link
Owner Author

Closing with #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improving existent functionality or performance related good first issue Hacktoberfest Hacktoberfest label
Projects
None yet
Development

No branches or pull requests

2 participants