# Modifications to D3 Sankey diagram

**URL:** https://talk.observablehq.com/t/modifications-to-d3-sankey-diagram/7937
**Category:** Help
**Created:** [May 15, 2023, 4:54pm UTC](https://talk.observablehq.com/t/modifications-to-d3-sankey-diagram/7937 "2023-05-15T16:54:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![juliaparis](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@juliaparis](https://talk.observablehq.com/u/juliaparis)
#### Post date: [May 15, 2023, 4:54pm UTC](https://talk.observablehq.com/t/modifications-to-d3-sankey-diagram/7937/1 "2023-05-15T16:54:02Z")

</div>

I am hoping to make a plot in a similar style to the [D3 Sankey diagram](https://observablehq.com/@d3/sankey). However, instead of using the ‘value’ variable to set the the height of links between nodes, I would instead like to directly set the height of nodes and then have the links adopt the correct height to smoothly connect the relevant nodes. Implicit in this approach is that the heights of the links may have to change between nodes.

Can this chart be created using the D3 Sankey Diagram as a starting point? What features of the SankeyChart function would need to be modified in order to implement this approach?

---

<div class="post-metadata">

### Author: ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)
#### Post date: [May 18, 2023, 12:26pm UTC](https://talk.observablehq.com/t/modifications-to-d3-sankey-diagram/7937/2 "2023-05-18T12:26:58Z")

</div>

As far as I can tell that is neither supported by the Sankey diagram component nor by d3-sankey. Since (to my knowledge) node height affects the positioning and routing, you might have to implement this from scratch, although you could perhaps try to pad your values in order to make up for the different heights.

Can you share more details about your use case?
