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.
Questions tagged [sankey-diagram]
752 questions
2
votes
1 answer
Python Plotly Sankey Graph not showing up
Was wondering if anyone can help figure out why this Sankey diagram is not working. I am pretty sure I followed the proper syntax and conventions to use the module. Been banging my head on the table because of this.
import plotly.offline
data_trace…

Icee
- 85
- 9
2
votes
0 answers
Highcharts Sankey colors not working for end column
I'm having trouble setting the color of the end column of my highcharts sankey diagram. For customizing the colors I used the following option:
series: [{
keys: ['from', 'to', 'weight', 'visible'],
data:…

Fadi A.
- 21
- 4
2
votes
0 answers
how to limit the size of the text to a rect svg?
i am trying to have the text not exceed the size of the rect SVG however since it can not be added as a child to rect, i dont know what else i can do, sorry am kind of a newbie.
here is the code am working with.
var node =…

Mina
- 75
- 6
2
votes
1 answer
How to set the color of nodes in the sankey plot using the networkD3 library
I used the following R code, and got the following graph. But I want to change the color of the nodes from green to black. I tried my best to find a relevant method or parameter, but did not find one.
library(networkD3)
source <-…

roadfar
- 51
- 8
2
votes
0 answers
How to add x-axis on Sankey Chart (Recharts)?
Is there any way to add x-axis in a Sankey Chart using Recharts?
Here is a sample code for Sankey,
function SankeyDemo() {
return (

Sarah Fernandez
- 21
- 2
2
votes
1 answer
How do I display a diagram created with rcharts within my R shiny app?
Situation:
I have a sankey diagram based on rcharts that I want to display in my shiny app (see code below).
Problem:
When I call my shiny app, the sankey diagram is not shown within the shiny app itself but rather in a different tab window of the…

nexonvantec
- 572
- 1
- 5
- 18
2
votes
1 answer
Adding additional label value when clicked on Sankey Chart lines in R shiny
The following R shiny script creates a sankey chart as in the snapshot below. My requirement is that when I click on any link between the nodes on left and right i.e. "a1" and "a2", I want the total sum of corresponding "a3" to be present in the…

Adam Shaw
- 519
- 9
- 24
2
votes
1 answer
Implement a D3 chart (sankey) with Angular
Trying to implement a D3 chart (sankey) to the latest version of Angular. I followed this gist, but the only thing I get is the Nodes in plain text instead of the graph.
I made a plunker with a minimum installation to reproduce the issue
Short…

Tasos
- 7,325
- 18
- 83
- 176
2
votes
0 answers
The onclick in not working with d3.behavior.drag() in Sankey diagram
This is the code for the Sankey diagram, The first time I added the this when creating node. It is not working.
.on("click", function (d) {
console.log(d);
})
Then I commented d3.behavior.drag(), Then it worked.
This will work.
var node…

Kreedz Zhen
- 380
- 2
- 12
2
votes
1 answer
Problems with "Sankey" diagram
I have been trying to make a sankey diagram for an assignment. I found an amazing code at: https://plot.ly/~alishobeiri/1591/plotly-sankey-diagrams/ which I am using and adapting to my requirements. However I am getting the error:
SyntaxError:…

Daniel
- 218
- 1
- 2
- 9
2
votes
1 answer
sankeyNetwork ordered nodes in r
I am trying to build sankey plot in R using networkD3 library.
I have following data
print(nodes1)
name
1 as
2 sdf
3 wer
4 xc
5 sd
6 er
print(links)
source target value
1 0 5 112
2 0 4 848
3 0 4…

Kush Patel
- 3,685
- 5
- 42
- 65
2
votes
1 answer
how to customize node & edge position in sankeyNetwork using R
the sankeyNetwork from networkD3 package is pretty clever most of the times at positioning the nodes, but there are occasions that I want to place the node to another location horizontally.
There are also other occasion that I want to vertically…

Chuck C
- 153
- 2
- 12
2
votes
2 answers
Sankey Diagram for transitions
I am trying to replicate the code and issue from below stack overflow question Sankey diagram in R
Adding some sample data
head(links) #Data.frame
Source Target Weight
Fb Google 20
Fb Fb 2
BBC Google 21
…

EricA
- 403
- 2
- 14
2
votes
1 answer
Transition (Sankey) plot with time on x axis
I have a transition matrix as following:
1. A A B
2. B C A
3. A C C
where each column represents periods,each row represents an agent and each letter represents a state. I would like a create a plot such as Sankey Diagram which shows…

s0-0s
- 134
- 10
2
votes
1 answer
Displaying edge information in Sankey tooltip
I've am using sankeyNetwork in the networkD3 package to create a visualisation
I would like to assign a name/ID to each edge, so that is appears in the tooltip. Can this be done with sankeyNetwork or any other function in the networkD3 package?

hjones85
- 21
- 3