Skip to content

When I use viewGenerator for customizing my node, neither the strokeColor nor borderColor work. #453

@yuan00611

Description

@yuan00611

Hi, everyone here. This is my first time using the Github issue. I really like the freedom and easy-to-use feature of the react-d3-graph! Thank you for the development community. Hope I can help in the future. :)

Describe the bug
My encounter problem is that after I use viewGenerator to customize my nodes, I can't add any border for the node.

To Reproduce
First, I tried to add node config. This can work before I use viewGenerator.
node: {
strokeColor: "#2f76c8",
strokeWidth: 3,
}
Screen Shot 2021-04-11 at 5 49 07 PM

Second, I tried to use CSS to modify the borderColor, but it didn't work either.
node: {
backgroundColor: "#eee",
width: "100%",
height: "100%",
borderRadius: "80%",
borderColor: "#2f76c8"
}
Screen Shot 2021-04-11 at 5 46 25 PM

Expected behavior
This might be the expected effect.
Screen Shot 2021-04-11 at 5 50 56 PM

Am I missing something? Or is there any overwrite I need to do?

Environment:

  • OS: Windows
  • Browser: Chorme
  • Node version 14.16.0
  • react-d3-graph version 2.6.0
  • d3 version 6.6.0
  • react version 17.0.1

Thanks! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions