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
3
votes
1 answer

Color Specific Links on D3 Sankey Chart

we are needing help coloring the specific links of this sankey chart. We want the links that connect with "Raleigh" to be green, all the others staying grey. Here is a picture of what it looks like, followed by a picture of what where the green…
ccny18
  • 49
  • 7
3
votes
1 answer

R-Customized tooltip in networkD3::sankeyNetwork

We have created sankey diagram to show flow between different cities via networkD3::sankeyNetwork() in R. We have received client requirement to show "state" name corresponding to city on tooltip/hover of sankey node. In following code we want to…
3
votes
2 answers

How to change alignment of nodes in a Sankey diagram using D3?

I have generated a Sankey diagram as shown above using d3 code (.js file) mentioned below [the .html and .css files are not quoted here]. Now I want the Sankey diagram to look like below with node "Technology" and "Strategy" appearing apart as a…
3
votes
2 answers

Interactivity in Sankey chart in R using networkD3

I wish to implement onClick on this sankey diagram such that by clicking on a link, I should see the details of the link between the two nodes. It's like the plotly_click function library(networkD3) nodes = data.frame("name" = …
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
3
votes
0 answers

Strange plot sizing of interactive sankey diagram within a shiny app

I have a relatively simple sankey diagram, generated using networkD3 package inside a shiny app. The problem I'm facing is that, depending on my input data, the dimensions (height and width) of the output diagram, differ significantly. Please have a…
jmjr
  • 2,090
  • 2
  • 21
  • 31
3
votes
1 answer

Set colors & title in an alluvial plot

I have a simple data.frame, made into a simple alluvial map using the alluvial package. How can I edit the plot? My questions, in order of importance, are: Change the color scheme so that flows coming from the same "Admitted To" unit are the same…
jesstme
  • 604
  • 2
  • 10
  • 25
3
votes
2 answers

Typescript Type definition for d3 sankey

I have some javascript code which uses d3 sankey plugin for creating a chart. In my new project, I need to reuse the same code, but the new project is in typescript. I am looking for a DefinitelyTyped file for the plugin. I browsed through…
AgentHunt
  • 669
  • 3
  • 11
  • 28
3
votes
1 answer

How can I set the color of a specific note and/or link in a google chart sankey diagram?

Here is what my data may look like: var data = new google.visualization.DataTable(); data.addColumn('string', 'From'); data.addColumn('string', 'To'); data.addColumn('number', 'Customers'); data.addRows([ ['BOUGHT FIRST FROM…
Holly
  • 1,305
  • 2
  • 15
  • 30
3
votes
0 answers

Vertically sort each subset of branches in D3 Sankey diagram

JSFiddle example: http://jsfiddle.net/zpgt1aq0/3/ I'd like to order the nodes in my sankey diagram by value for each "column" of the diagram. Here is an example of the ordering I'd like to display (created manually for the time being): However,…
Al S
  • 355
  • 2
  • 17
3
votes
1 answer

Increasing d3 SVG container size

I am trying to increase the size of my SVG container dynamically so that it fits all the data. There is a fiddle which explains the dynamic increase of the SVG: http://jsfiddle.net/CKW5q/ However, the same concept doesn't work for a bi-directional…
Omkar
  • 2,274
  • 6
  • 21
  • 34
3
votes
1 answer

Show Text on Google Chart Sankey Diagram

I'm using Google Chart - Sankey Diagram. I want to make the weights show up on each flow with no need mouse over. For the official sample as following (jsfiddle): google.setOnLoadCallback(drawChart); function drawChart() { var data = new…
3
votes
3 answers

SVG thick curved paths not behaving as expected

I'm creating a Sankey diagram in D3 using paths as chunky connectors to indicate flow. However, I'm finding the paths that are thicker than they are long start behaving really oddly. You can see an example here, where I'm splitting the path into…
Joe
  • 6,773
  • 2
  • 47
  • 81
3
votes
3 answers

Donut chart in D3 JS Sankey diagram

I have a D3 Js Sankey diagram, with lots of data. At the end of the data are always companies. The company node is a simple circle. But around that circle i want a donut chart, with 2 values. The values are inside the company node as numsms and…
Marijn Kok
  • 121
  • 8
3
votes
0 answers

The details of D3 Sankey diagram nodes positioning Algorithm

I think I need more explanation about the sankey graph's node positioning algorithm. From this page http://bost.ocks.org/mike/sankey/, I know that it is iterative relaxation that is used in D3's plugin sankey.js to determine the nodes vertical…
Lei Song
  • 31
  • 3
3
votes
1 answer

How to add a list of node's name with tooltip in sankey

I have made a sankey diagram with rChars package in R. But I want to add a function, when we move to a link or a target node, it will show all the names of source node in a tooltip (or a new box at the right top of the graph). For example, it will…
Estelle Zhang
  • 33
  • 1
  • 3