# Too many lines in Line Chart

**URL:** https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726
**Category:** Kibana
**Created:** [September 7, 2018, 1:57pm UTC](https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726 "2018-09-07T13:57:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![atom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atom/32/34758_2.png) [@atom](https://discuss.elastic.co/u/atom)
#### Post date: [September 7, 2018, 1:57pm UTC](https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726/1 "2018-09-07T13:57:24Z")

</div>

Hi There,  
i have crated a line chart visualization.  
In this visualization i use date histogram for x axis and count of a value for y axis. The visualization is ok but i have too many different counts. Kibana is showing me too many lines in the chart. Is it possible to show only the top 5 counts?

---

<div class="post-metadata">

### Author: ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)
#### Post date: [September 7, 2018, 8:04pm UTC](https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726/2 "2018-09-07T20:04:17Z")

</div>

Hi there, for a date histogram you can change the "Interval" value for your bucket aggregation to change the number of buckets (bars). Here's how switching from an interval of "Minutes" to "Hours" reduces the number of bars in an example chart:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e2ac43540f97bb08ebcae9a7dd7349e2b5012ba.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ec6e7c75f3c10ad35e37d2b6c12327f9d447fa66.png)

I can also choose a custom interval to more precisely define how many bars should show up. In this example, I've chosen a custom interval of `6h`. Dividing my 24 hour time period by this interval results in 5 bars.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/ddb0976652a5cd496a98cf5270fa2a3a2ddaa01f.png)

Hope this helps,  
CJ

---

<div class="post-metadata">

### Author: ![atom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atom/32/34758_2.png) [@atom](https://discuss.elastic.co/u/atom)
#### Post date: [September 13, 2018, 9:31am UTC](https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726/3 "2018-09-13T09:31:13Z")

</div>

Hi cj,

thank for your response.  
I found another way of doing it. Maybe this will be a help if someone searches for it 🙂

I have craeted a timelion visualization and set a limit.

`.es(q='', split=hops.keyword:5, metric=avg:size)`

---

<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 11, 2018, 9:31am UTC](https://discuss.elastic.co/t/too-many-lines-in-line-chart/147726/4 "2018-10-11T09:31:14Z")

</div>

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