How to Plot key value pairs with scatter plot in kibana

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:

 "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

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.

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

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

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