Questions tagged [sankey-diagram]

Sankey diagrams are a kind of flow diagram, in which the width of the arrows is shown proportionally to the flow quantity. They are typically used to visualize energy or material or cost transfers between processes.

752 questions
1
vote
0 answers

Can we fix the position of nodes in Sankey chart

I was trying to create a new Sankey chart, and I found that the position of the nodes are not fixed once I drag drop them. If I again run the code, the nodes go back to their respective places. Can we fix the node position so that We donot need to…
Supriti
  • 11
  • 2
1
vote
0 answers

R River-Plot (Sankey Diagram) Not Displaying Correctly

I am investigating Sankey Diagrams via R's Riverplot package. However my output is not legible at all, and am sure am doing something wrong but am still quite new to R. Essentially, the data…
Tumaini Kilimba
  • 195
  • 2
  • 15
1
vote
1 answer

Changing the colour of the node in Sankey Diagram using D3.js library.

Here's the part of code written in Javascript that creates the rectangle node in the sankey diagram. Code : node.append("rect") .attr("height", function(d) { return d.dy; }) .attr("width", sankey.nodeWidth()) .style("fill",…
1
vote
1 answer

Circular Arrow Flow Chart in Python

How can one make an circular arrow flow chart with three chevrons (or arrows) in python similar to the figure shown below?
C R
  • 2,182
  • 5
  • 32
  • 41
1
vote
2 answers

Colors randomly assigned in R riverplot Sankey graph

I found the R riverplot package very handy to make Sankey/Minard charts. The output chart is great, including the position of the nodes and the width of the edges. But, I have a problem with the colors. I assigned colors through a "col" column in…
Patrick Meyfroidt
1
vote
1 answer

d3 sankey diagram - how to set the y position

I am trying to set the position of nodes (by name) either on the top or the bottom of the Sankey Diagram. For example, if I had a node named "New" and another node named "Dropped", and I wanted to keep the New node at the top of the diagram always,…
jayc8
  • 11
  • 2
1
vote
1 answer

embedding json in sankey d3 javascript file

I am having CORS issues using a csv file to populate a sankey diagram, so I would like to replace it with embedded json for testing purposes. I have reformatted the csv data to get it into the format needed by the d3 sankey plugin, but I can't…
wlf211
  • 23
  • 4
1
vote
0 answers

Get node position in D3 sankey diagram

I'm using the D3 plug-in to make a Sankey diagram, and would like to add labels above each column of nodes. Something like this: Is there a function in the sankey object that can return the location of the nodes? var sankey = d3.sankey() …
mike
  • 22,931
  • 31
  • 77
  • 100
1
vote
2 answers

Converting only certain nodes in D3 Sankey chart from rectangle to circle

I would like to reproduce the process from D3 Sankey chart using circle node instead of rectangle node, however, I would like to select only certain nodes to change from rectangles to circles. For example, in this jsfiddle used in the example, how…
Clayton
  • 1,525
  • 5
  • 19
  • 35
1
vote
2 answers

Google Sankey Color Hover

Using this API: https://developers.google.com/chart/interactive/docs/gallery/sankey I am wanting to make a Sankey diagram. Is there any way to change the color of the links when the mouse is hovering over them without affecting the other links? So,…
Bloo
  • 147
  • 1
  • 8
1
vote
1 answer

D3 Sankey Chord Colors

So I'm developing a Sankey diagram, using D3's Sankey API, and I'm trying to figure out how to change the color of the bands, or cords, going to and from the nodes. An example of what I'm trying to do can be found…
Bloo
  • 147
  • 1
  • 8
1
vote
1 answer

Combining Bubble and Sankey Diagram Google Charts

I'm trying to combine Bubble Chart and Sankey Diagram elements from Google Charts, but am having a hard time getting them to display on a page. (This is sample code from Google). When I isolate the code for just the Bubble Chart or just the Sankey…
1
vote
1 answer

Defining source between D3 plugin sankey.js and html code

I'm attempting to create a Sankey diagram, and while I am now able to load my source codes, I am running into a slight issue between the sankey.js, and my html code. When I run the HTML code, I get an error message like this: Uncaught TypeError:…
jducz
  • 23
  • 1
  • 5
1
vote
2 answers

Getting Sankey diagram in D3 from csv file

I am attempting to create a Sankey diagram from a csv file. I am utilizing code provided by timelyportfolio, and also the code from the d3 site (and even the sample csv files). However, when I try to run the code in Chrome, I am getting a blank…
jducz
  • 23
  • 1
  • 5
1
vote
1 answer

Connecting two Sankey diagrams in matplotlib

I'm trying to represent a country's gas balance using matplotlib. The idea is that there are three sources of imported gas which I want to plot using one Sankey and connect it to another Sankey which has other sources of gas (production, gas…
Dennis Sakva
  • 1,447
  • 2
  • 13
  • 26