Giter Site home page Giter Site logo

Multi-part sankey? about d3-sankey HOT 3 CLOSED

d3 avatar d3 commented on July 19, 2024
Multi-part sankey?

from d3-sankey.

Comments (3)

mbostock avatar mbostock commented on July 19, 2024

Is this different than giving as input a graph where there are multiple links between the same pair of nodes? For example:

sankey({
  nodes:[
    {name:"A"},
    {name:"B"},
    {name:"C"}
  ],
  links:[
    {source:0, target:1, value:100, color: "red"},
    {source:0, target:1, value:80, color: "green"},
    {source:0, target:1, value:50, color: "blue"},
    {source:0, target:2, value:50, color: "red"},
    {source:0, target:2, value:40, color: "green"},
    {source:0, target:2, value:20, color: "blue"}
  ]
})

Which might look like:

screen shot 2017-06-12 at 11 30 01 am

The thing I could imagine that’s missing is a constraint that the links are drawn in a certain order.

from d3-sankey.

emeeks avatar emeeks commented on July 19, 2024

Pretty sure I made it because I thought the sankey layout didn't support parallel edges. It's been a while, if there was another reason and I remember, I'll post it, otherwise yeah, just the ability to determine draw order would be useful.

from d3-sankey.

mbostock avatar mbostock commented on July 19, 2024

It occurs to me that the requested feature, then—control over the order of links—was already implemented in #19. Hooray.

from d3-sankey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.