Skip to content

[sankey] color links with gradients #3261 from plotly.js #11

@gregorywaynepower

Description

@gregorywaynepower

Hey Y'all,

We have unsolved issue #3261 in the plotly.js repo that needs some fixing. Current advice for implementation is:

From @alexcjohnson :

@migupry note that plotly.js uses a fork of d3-sankey: https://github.com/plotly/d3-sankey - mainly this was done to switch how we draw links: d3-sankey draws a path from source to target, using stroke-width and stroke-color to set its size and color. Our fork draws the full link outline and uses fill-color. This allows us to avoid overlaps when several links travel in parallel, and lets us outline the links. But as a result we would need to re-implement gradient link colors. There would be two steps to getting this into plotly.js: (1) add the capability to https://github.com/plotly/d3-sankey - probably following the general pattern of how this was done in the original, but applying it to fill instead of stroke; if the only gradient allowed by the original is 'source-target', that seems like the main thing people are interested in but if we can do something more general and allow each link to specify its own gradient that would be even better. (2) expose this capability inside plotly.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions