# Time based count in Kibana Visualization

**URL:** <https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835>\
**Category:** Kibana\
**Created:** [September 22, 2021, 9:40am UTC](https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835 "2021-09-22T09:40:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anchit\_Banerjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anchit_banerjee/32/78726_2.png) [@Anchit\_Banerjee](https://discuss.elastic.co/u/Anchit_Banerjee)\
**Post date:** [September 22, 2021, 9:40am UTC](https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835/1 "2021-09-22T09:40:54Z")

</div>

Hello All,

I am trying to create a pie-chart of a particular event with count in Kibana.

I am fetching the data from Oracle DB through logstash JDBC input pipeline.

Eg:  
Name Count  
event1 10  
event2 20

I want to create a pie chart which shows the count of the event with respect to selected time frame. (Like if I select time frame as last 1hour, it should only show the count of event1 & event2 for the last 1 hour and not the cumulative)

Please guide me how can I achieve it

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [September 22, 2021, 6:11pm UTC](https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835/2 "2021-09-22T18:11:11Z")

</div>

Can you provide an example document showing the structure of your data?

---

<div class="post-metadata">

**Author:** ![Anchit\_Banerjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anchit_banerjee/32/78726_2.png) [@Anchit\_Banerjee](https://discuss.elastic.co/u/Anchit_Banerjee)\
**Post date:** [September 23, 2021, 2:33pm UTC](https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835/3 "2021-09-23T14:33:02Z")

</div>

Hello Nathan,

Thanks for your response. I figured it out

While creating the index pattern, in time field I have selected a timestamp which is there in a specific table that a queried. Now I have used that to plot pie chart with count and it shows dynamic values when different time frames are chosen

---

<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:** [October 21, 2021, 2:33pm UTC](https://discuss.elastic.co/t/time-based-count-in-kibana-visualization/284835/4 "2021-10-21T14:33:49Z")

</div>

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