Cumulative Sum over Terms or Hour Only

Hello dear forum members,

I'm desperately trying to reproduce such a simple graphic in Kibana and it doesn't seem to be possible.

The first column, textual data. The second column, numeric data. The third column, the cumulative sum.

Real data example:
00h -- 350
01h -- 200
02h -- 425
(going up to 23h)

Of course, I tried to use the "Cumulative Sum" function when creating a "Vertical Bar" visualization, but I am forced to use an "Date Histogram" aggregation .

I get the right result this way, but displaying on the x-axis isn't really what I want. I would like only the time to appear and not the entire date / time.

In addition, there are gaps between the values. Is there a way to make all the data appear on the x-axis?

What can I do to achieve something like this?

I am currently using the stack in v7.3.


You're right that this is only working for the date histogram aggregation using our built-in visualizations. I think your only option is to use the Vega visualization to go beyond the limits of our existing tools. In Vega, you can build the query you want and then perform a cumulative sum using the Vega window functions.

Hi Wylie!

Thanks for your answer. I will try that as soon as I have a new opportunity.

For now, since I have access to the SQL query (logstash), I adapted the query to do the cumulative by itself. With that, I'm able to generate a vertical bar chart.


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