Vega/Kibana : Data table that makes calculcations between aggregations


I want to do a data table in kibana like the following:

That means, the 2 first columns are the sum of price and quantity and the 3rd column divides both sums to get a ratio. Also I want this to be dynamic to changes in time range.

As far as I've seen getting the ratio is not possible in kibana, but I've noticed that there is a plugin were you can create Vega-Lite graphs in kibana.

I am new both in Vega-Lite and in kibana, so is there an example of code that creates a data table?

Thank you!

Visualizations within Kibana should respect whatever your time filter is all the time if that's what you mean. You can also keep your time filter to relative dates which will keep your time up-to-date if you're looking for something like a constant "last two weeks" window.

Any 3rd party plugins you pull-in to Kibana are free to do whatever they want though so no guarantees that they will continue to respect your time filters.

Hi! Thank you for your answer.

Do you know where can I find a code example of how to create a data table with Vega?
From the Vega site I didn't find anything.

Well, Vega's not super meant for purely textual tables so it won't be fun, but you could make it work by absolutely positioning text to a grid...

Here's an example:

Ok! I will check it out!
Thanks! :slight_smile:

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