Can someone tell me how to visualize a delta value in bar chart


I have 2 values that are stored in a single field - fieldA. I've provided examples of 2 data points -- the 1st is 4 &2 and the 2nd is 8 & 0. I want to create a series that shows the delta between the values -- my first data point should display 2 and my second data point should display 8. I would like to do this in the same chart or even a new chart is fine. Can someone assist me?

Thanks in advance.

(Joe Fleming) #2

There's no way to do string evaluation in Elasticsearch, and thus no way to do it in Kibana. The ES team is working on a scripting language that will probably allow something like this, but currently the best you can do is use the Lucene Query Syntax, which only supports math operations on number.

You could enable Groovy scripting and create scripted fields that way, but it's a little cumbersome and you'd expose yourself to security problems.

Honestly, your best bet is to do the difference operation when you index the data, and store the value in another field in the documents.

(Lori Rivers) #3

Thank you for your response, Joe.


(system) #4