# Vega Sankey Diagram

**URL:** <https://discuss.elastic.co/t/vega-sankey-diagram/338149>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [July 11, 2023, 6:28pm UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149 "2023-07-11T18:28:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ranger\_Rick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ranger_rick/32/100559_2.png) [@Ranger\_Rick](https://discuss.elastic.co/u/Ranger_Rick)\
**Post date:** [July 11, 2023, 6:28pm UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/1 "2023-07-11T18:28:49Z")

</div>

Good afternoon!

I created some Sankeys to better visualize certain relationships and they mostly work well. Following the example provided here: [Sankey Creation](https://www.elastic.co/blog/sankey-visualization-with-vega-in-kibana) resulting in clean graphs but with a slight issue.

The data corresponding to left and right sides of the sankey have no matching names at all. (Think mailing type and country, ie, Left side is: express, letter, package and the right side is: Canada, UK, USA)

So while the left side looks perfect, the right side does not contain the solid block for each category name, which does not enable a reverse match mouse hover over.

Does anyone know what I need to add to ensure this visual and feature occurs bidirectionally and not just Left to Right?

Additionally, has anyone had any luck with creating a multiple part Sankey? (3 or more pieces, such as Sending Country \> Mail Type \> Destination Country)

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [July 25, 2023, 9:11am UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/2 "2023-07-25T09:11:39Z")

</div>

Hi, sorry for being late at the reply, have you solved your issue?

---

<div class="post-metadata">

**Author:** ![Ranger\_Rick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ranger_rick/32/100559_2.png) [@Ranger\_Rick](https://discuss.elastic.co/u/Ranger_Rick)\
**Post date:** [July 26, 2023, 6:30am UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/3 "2023-07-26T06:30:05Z")

</div>

Heya! Thanks for the response.

No, I have yet to find a solution for the sankey issue.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [July 26, 2023, 6:53am UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/4 "2023-07-26T06:53:42Z")

</div>

Can you provide me with an example/simplified version of your ES documents and the vega specs you are using? I can check if I can make it work for you

---

<div class="post-metadata">

**Author:** ![Ranger\_Rick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ranger_rick/32/100559_2.png) [@Ranger\_Rick](https://discuss.elastic.co/u/Ranger_Rick)\
**Post date:** [July 26, 2023, 4:09pm UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/5 "2023-07-26T16:09:34Z")

</div>

Sure can, will send via PM for now.

---

<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:** [August 23, 2023, 4:10pm UTC](https://discuss.elastic.co/t/vega-sankey-diagram/338149/6 "2023-08-23T16:10:35Z")

</div>

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