question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Marker color isn't set for individually colored links

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
halworsencommented, Aug 30, 2020

I’ve recently revisited my project to make a few improvements, so this is great timing. My current thoughts are that it might be easier to render and cache markers when individual links are rendered, then build a defs containing the cached markers that are needed in the graph. That way, each individual link can ensure the specific marker they need is rendered, and only markers which are actually being used in the graph would be rendered.

I’m still a little unsure about how to pull off the defs building part, but I’ll put up a pull request if I have an a-ha moment. I’m very much a web development novice, and while I’m starting to appreciate the elegance of the renderer code, I’d be lying if I said it didn’t leave me a little confused. 😄

0reactions
danielcaldascommented, Sep 28, 2020

Hey @zofbanach, I don’t have the time to look into this one at the moment. PRs are always welcome 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel 2013: Unable to work with the graph markers
Is there some way to change the markers independently? Obviously I want to customize the colors of each data set independent of the...
Read more >
How to Change Marker Colors in Google Maps
To edit the marker color, click or tap on the marker icon. When you do that, you can change both the color of...
Read more >
How to set individual color for marker in Jqplot - Stack Overflow
I'm not sure you can specify multiple colors for a single serie. Either you can divide your serie into several series (ex. 4...
Read more >
How can I change the color of multiple markers on the map at ...
I'm afraid it isn't possible to change the colour of multiple markers at the same time if you are using individual styles.
Read more >
Help! Individual marker colors will not change in scatter chart
Visualizations>Format Visual>Markers>Colors>Show All and then change the color for the individual value/marker. I do that now and absolutely nothing happens ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found