# Captain Matthew Henry Energy Flow Sankey diagram

**URL:** <https://talk.observablehq.com/t/captain-matthew-henry-energy-flow-sankey-diagram/9313>\
**Category:** Help\
**Created:** [May 23, 2024, 2:53pm UTC](https://talk.observablehq.com/t/captain-matthew-henry-energy-flow-sankey-diagram/9313 "2024-05-23T14:53:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harisonic](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/harisonic/32/8915_2.png) [@Harisonic](https://talk.observablehq.com/u/Harisonic)\
**Post date:** [May 23, 2024, 2:53pm UTC](https://talk.observablehq.com/t/captain-matthew-henry-energy-flow-sankey-diagram/9313/1 "2024-05-23T14:53:21Z")

</div>

Is it possible to draw sankey diagram with both vertical nodes and horizontal nodes in the same diagram using d3?

 ![captain-sankey-diagram](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/2/2c31e4017f3472fba415ca3baf6ac8a569395dde.png)

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [May 23, 2024, 7:22pm UTC](https://talk.observablehq.com/t/captain-matthew-henry-energy-flow-sankey-diagram/9313/2 "2024-05-23T19:22:39Z")

</div>

You can use D3 to create anything in SVG, Canvas, etc., so yes this is _possible_ (in the technical sense).

But D3 won’t produce this type of diagram for you automatically, and the d3-sankey module doesn’t understand this type of diagram. So I expect it would either involve a lot of manual layout, or inventing some new layout algorithm if you want it automated.
