# How to Plot key value pairs with scatter plot in kibana

**URL:** https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431
**Category:** Kibana
**Created:** [September 20, 2019, 1:34pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431 "2019-09-20T13:34:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nirajan](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@Nirajan](https://discuss.elastic.co/u/Nirajan)
#### Post date: [September 20, 2019, 1:34pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431/1 "2019-09-20T13:34:45Z")

</div>

Hi Everyone,

I am looking for a solution to plot the key value pairs with scatter plot in kibana.  
It seems there is no any solution to this issue.

I have following data:

```auto
 "field_name" : [
            {
              "50" : [
                {
                  "Level" : 1.0,
                  "TimeStamp" : 271.18,
                  "Value" : 49.6674
                },
                {
                  "EventLevel" : 1.0,
                  "EventTimeStamp" : 272.28,
                  "SensorValue" : 49.4329
                },
                {
                  "Level" : 1.0,
                  "TimeStamp" : 274.61,
                  "Value" : 49.72
                },
]
]

```

and i have some hundreds of such key value paris value in the field name say it "field\_name".  
When i indicate the x-axis for scatter plot like:

encoding: {

```
x: {
  field: _source.field_name.50.Value
  type: nominal
}
y: {
  field: _source.Speed
  type: quantitative
}, 

```

}  
i get error saying: Cannot read property 'Value' of undefined.

Can anybody provide some informations or suggestions regarding this issue?

Thanks in advance..

Best Regards,  
Nirajan

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [September 20, 2019, 6:53pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431/2 "2019-09-20T18:53:55Z")

</div>

Your `field_name` is an array and you are trying to reference it as an object. So `field_name.50` will not find anything because there is no `50` property of the array.

If possible, I would suggest flattening the innermost array into separate documents as Kibana does not support nested arrays.

---

<div class="post-metadata">

### Author: ![Nirajan](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@Nirajan](https://discuss.elastic.co/u/Nirajan)
#### Post date: [September 24, 2019, 1:56pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431/3 "2019-09-24T13:56:35Z")

</div>

Hi,  
Thank you very much for your reply.  
I am able to search with the reference "field\_name.50.Value" in search option in Discover section.  
I can filter all the values with the such reference path.

I am only facing problem with the scatter plot. Do you mean to say that only scatter plot do not support such reference?

Any comments or suggestions would be really helpful..

Best Regards,  
Nirajan

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [September 24, 2019, 9:20pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431/4 "2019-09-24T21:20:23Z")

</div>

Perhaps I am misunderstanding your data. Can you post the mapping for your index?

---

<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: [October 22, 2019, 9:20pm UTC](https://discuss.elastic.co/t/how-to-plot-key-value-pairs-with-scatter-plot-in-kibana/200431/5 "2019-10-22T21:20:24Z")

</div>

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