# How to have relational connectivity between two graphs dynamically

**URL:** https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524
**Category:** Kibana
**Created:** [November 6, 2017, 12:57pm UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524 "2017-11-06T12:57:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![arun\_s](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@arun\_s](https://discuss.elastic.co/u/arun_s)
#### Post date: [November 6, 2017, 12:57pm UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524/1 "2017-11-06T12:57:40Z")

</div>

Hi

I want to make relational update between two graphs , say for example i have following data  
country A population for each month  
country B population for each month  
country C population for each month  
plotted in single graph - say Graph1 .

is it possible to create a Graph2 dynamically which can show only selected country (respect to cities ) population alone if a a specific country in Graph1 is pointed using pointer ,

ex graph1 ( **US** ,EUROPE,ASIA) -\> graph2(TX,CA)

is that possible with kibana

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [November 7, 2017, 12:15am UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524/2 "2017-11-07T00:15:33Z")

</div>

hi @arun_s,

Yes, that is possible I think.

You can add two charts to a dashboard. Then, you can click on a chart element of the first chart (e.g. select the US). This will send a filter to the filter-bar in the Dashboard. Then you can see your second chart update (e.g. regions in the US).

It does depend somewhat on how your data is modeled, but similar workflows are done quite frequently on the dashboard.

You can start with following videos [https://www.elastic.co/guide/en/kibana/current/getting-started.html](https://www.elastic.co/guide/en/kibana/current/getting-started.html), to see some of this in action.

---

<div class="post-metadata">

### Author: ![arun\_s](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@arun\_s](https://discuss.elastic.co/u/arun_s)
#### Post date: [November 7, 2017, 3:57am UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524/3 "2017-11-07T03:57:20Z")

</div>

Hi Thomas,

i agree its possible , currently i am plotting 2 graphs

graph1 - plot with respect to population of countries  
xaxis - count  
yaxis - months

graph2 - plot with respect to population of cities of us  
xaxis - count  
yaxis - months

i am able to zoom in graph 1 US datas so changes occurring in graph2

but my question is if i select data of europe in graph 1 how it will reflect in graph 2 as it is configured for US cities, so is there a way to dynamically update cities and region in graph2 keeping xaxis and yaxis same

Thanks

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [November 7, 2017, 10:32pm UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524/4 "2017-11-07T22:32:29Z")

</div>

hi @arun_s,

yeah, that's more difficult.

How is your data modeled? If every document has both a region and a country-field, then it will work as described.

You would have one chart that aggregates on the country-field, and another that aggregates on the region-field. Selecting a country in the first chart, will update everything in the second chart.

To avoid clashes with identically named regions across different countries, you can use a scripted-field t hat concatenates country-name and region-name so it can serve as a unique identifier for region.

---

<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: [December 5, 2017, 10:32pm UTC](https://discuss.elastic.co/t/how-to-have-relational-connectivity-between-two-graphs-dynamically/106524/5 "2017-12-05T22:32:49Z")

</div>

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