# How to display a grpah based on commpm value order by timespamp

**URL:** <https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [July 26, 2023, 7:15am UTC](https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264 "2023-07-26T07:15:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Munsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_munsa/32/123438_2.png) [@David\_Munsa](https://discuss.elastic.co/u/David_Munsa)\
**Post date:** [July 26, 2023, 7:15am UTC](https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264/1 "2023-07-26T07:15:18Z")

</div>

it goes like this : so all my documents have a property called **sessionId**  
and has a parent-child connection

the purpose:

user is searching by sessionId

- show a graph of all document that shares this Id
- connect the nodes by parent-child connection
- show some data from the document content

can I do this?

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [August 1, 2023, 9:15am UTC](https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264/2 "2023-08-01T09:15:23Z")

</div>

Hi @David_Munsa

welcome to the Kibana community.  
About your question, I have to ask few questions: how is the parent-child relation described in the document? Is it something like `parentId: keyword` property in each document that can be filled or null?

In general the Kibana Graph API is more a node-based use case, where the connection between two nodes describes the co-occurrence of some field values within the same document.

---

<div class="post-metadata">

**Author:** ![David\_Munsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_munsa/32/123438_2.png) [@David\_Munsa](https://discuss.elastic.co/u/David_Munsa)\
**Post date:** [August 6, 2023, 8:02am UTC](https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264/5 "2023-08-06T08:02:11Z")

</div>

an example of the docs

```auto
{
   logId:"askdkajsh"
   sessionId:"sdfg67t342rsd"
   context:"update_user"
}

{
   logId:"dhfuw4y97ysf"
   sessionId:"sdfg67t342rsd"
   parentLogId:"askdkajsh"
   context:"update_user"
}
{
   logId:"xcbnvdsdf"
   sessionId:"sdfg67t342rsd"
   parentLogId:"dhfuw4y97ysf"
   context:"update_user"
}

```

the idea is to search all docs by common sessionId, then display graph as parent-child relation (set on parentLogId prop)

---

<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:** [September 3, 2023, 8:03am UTC](https://discuss.elastic.co/t/how-to-display-a-grpah-based-on-commpm-value-order-by-timespamp/339264/6 "2023-09-03T08:03:00Z")

</div>

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