# Need to add the values for every second and display it in a bar chart

**URL:** <https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515>\
**Category:** Kibana\
**Created:** [July 10, 2017, 6:17pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515 "2017-07-10T18:17:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tejas\_Ghutukade](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Tejas\_Ghutukade](https://discuss.elastic.co/u/Tejas_Ghutukade)\
**Post date:** [July 10, 2017, 6:17pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/1 "2017-07-10T18:17:23Z")

</div>

M trying to visualize a bar chart where on metric i have sum of a field and for bucket its date histogram for the timestamp field and second interval but the interval is auto set to hour cause of too many buckets.

How can i get the sum of the fields for every second?

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [July 10, 2017, 7:42pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/2 "2017-07-10T19:42:46Z")

</div>

Can you zoom in on your time range?

Using some test data, when my time range is `15 minutes`, I see the warning that it's been scaled larger because of too many buckets, but if I drill down into a shorter time range, It will show me seconds.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/9/e/9ee41032acedd579781a9710a7389a3cefe327f1.png) ![](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fec29a14e3b4af680e110c1a1685755f23b3f5c6.png)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 11, 2017, 5:17am UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/3 "2017-07-11T05:17:26Z")

</div>

Can you describe what data you have and what you are trying to visualise that require 1s buckets?

---

<div class="post-metadata">

**Author:** ![Tejas\_Ghutukade](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Tejas\_Ghutukade](https://discuss.elastic.co/u/Tejas_Ghutukade)\
**Post date:** [July 12, 2017, 7:08pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/4 "2017-07-12T19:08:09Z")

</div>

I have a transaction logs data with timestamp, processing time, and message size data and what i want to see is max number of transactions occurring per second within the minute/hour /day.  
But when ever i choose the interval as second i tells that bcoz of too many buckets it set the interval to an hour.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 12, 2017, 10:49pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/5 "2017-07-12T22:49:41Z")

</div>

As you are looking for the max per second interval, any direct aggregation will generate tons of buckets and cause memory problems when querying any longer time period. One approach to get around this would be to run an aggregation over the last minute every minute and calculate the max here before storing this data as summary records in a separate index. You can the do a simple max aggregation against this instead, which would be more efficient as longer intervals could be used and still give the correct max value for that interval.

---

<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:** [August 9, 2017, 10:49pm UTC](https://discuss.elastic.co/t/need-to-add-the-values-for-every-second-and-display-it-in-a-bar-chart/92515/6 "2017-08-09T22:49:45Z")

</div>

Closed on August 9, 2017, 10:49pm UTC

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