Skip to content

Marker color isn't set for individually colored links #255

@halworsen

Description

@halworsen

Describe the bug
When setting link colors in the graph data for directed graphs, the marker/arrowhead's color stays the color that was defined in the global graph config. This also happens when link colors aren't explicitly set in the graph config.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the sandbox
  2. Tick the directed box
  3. In the link.color box, set the color to anything that isn't the default #d3d3d3
  4. The links themselves should now be colored, but the markers/arrowheads stay gray

Expected behavior
Markers should update to use the color of the link they're attached to.

Screenshots
With no link color set in the graph config:
image
With link color set to #0000ff in the graph config:
image

Environment:

  • OS: Windows 10
  • Browser: firefox
  • Version: 70.0
  • Node version: 12.13.0
  • react-d3-graph version: 2.3.0
  • d3 version: 5.12.0
  • react version: 16.11.0

Additional context
The code used to create the graph in the above screenshots is available here

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions