# 3 Node Sankey Diagram

**URL:** <https://discuss.elastic.co/t/3-node-sankey-diagram/202896>\
**Category:** Kibana\
**Created:** [October 9, 2019, 6:28pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896 "2019-10-09T18:28:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [October 9, 2019, 6:28pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/1 "2019-10-09T18:28:08Z")

</div>

Anybody have a Vega framework or example that would create a 3 (or more) node Sankey diagram? I have the example code from the blog for two nodes but I can't figure out how to fully adapt it to 3 nodes. I've managed to create 3 column labels and data labels but no connecting lines...see below for example of where I am.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cf4c71855c990f17fa2325e229e2d437ac635705.png)

code on Pastebin: [https://pastebin.com/gWtFP0xJ](https://pastebin.com/gWtFP0xJ)

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [October 9, 2019, 9:24pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/2 "2019-10-09T21:24:04Z")

</div>

Hello,

Yes, here's a blog article written by an Elastic Team Member with accompanying code: [https://nyurik.github.io/Vega-Sankey-Graph-for-Kibana/](https://nyurik.github.io/Vega-Sankey-Graph-for-Kibana/)

Hope that helps!

Regards,  
Aaron

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [October 9, 2019, 9:39pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/3 "2019-10-09T21:39:44Z")

</div>

> [@Aaron\_Caldwell](#):
>
> Hello,
> 
> Yes, here's a blog article written by an Elastic Team Member with accompanying code: [Kibana Vega Visualizations: Sankey | Yuri Astrakhan](https://nyurik.github.io/Vega-Sankey-Graph-for-Kibana/)
> 
> Hope that helps!
> 
> Regards,  
> Aaron

That's only two nodes and what I was referencing for the starting code.

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [October 9, 2019, 10:17pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/4 "2019-10-09T22:17:51Z")

</div>

I got something that works...though I don't know if I have extraneous stuff in there. I would like the lines going from the middle column to the right column to not be straight and look more like the left to middle column lines, if anybody knows how to do that.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b6fd3557294c6a1578bf993db0a5ffefd54b59c.png)  
Pastebin: [https://pastebin.com/uYfan4WU](https://pastebin.com/uYfan4WU)

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [October 9, 2019, 10:34pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/5 "2019-10-09T22:34:38Z")

</div>

I actually chatted with the blog author about this. He's our authority on Vega-related issues. He actually hasn't been able to successfully achieve what you're attempting using Vega. Not that it's necessarily impossible though! If you have some success, it would be a great benefit to the community if you'd be willing to share!

Regards,  
Aaron

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 6, 2019, 10:34pm UTC](https://discuss.elastic.co/t/3-node-sankey-diagram/202896/6 "2019-11-06T22:34:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
