# Kibana4 Histogram X-Axis Not Ordering Properly

**URL:** <https://discuss.elastic.co/t/kibana4-histogram-x-axis-not-ordering-properly/21921>\
**Category:** Elasticsearch\
**Created:** [January 30, 2015, 3:23pm UTC](https://discuss.elastic.co/t/kibana4-histogram-x-axis-not-ordering-properly/21921 "2015-01-30T15:23:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Alexander\_Reynolds](https://discuss.elastic.co/u/Alexander_Reynolds)\
**Post date:** [January 30, 2015, 3:23pm UTC](https://discuss.elastic.co/t/kibana4-histogram-x-axis-not-ordering-properly/21921/1 "2015-01-30T15:23:36Z")

</div>

Hello all,

I've started playing around with Kibana4 and the use of scripted fields to  
generate fields such as \*timestamp.\_hourOfDay. \*I've been trying to  
generate a Histogram visualization that will show me the the top 5 most  
popular event types during each hour of the day. However, when I set the  
size of the Terms sub-aggregation to 4 or greater the X-axis begins with  
Hour 9 instead of Hour 0. Here's what it looks like with Terms size set to  
5:

[https://lh3.googleusercontent.com/-Qtd4vd0lZGA/VMuhEHNfvFI/AAAAAAAAAF4/CLyKAOvmoYA/s1600/Capture.PNG](https://lh3.googleusercontent.com/-Qtd4vd0lZGA/VMuhEHNfvFI/AAAAAAAAAF4/CLyKAOvmoYA/s1600/Capture.PNG)

And here's what it looks like with Terms size set to 3:

[https://lh6.googleusercontent.com/-Ae42kfZesJ4/VMuho3LPHgI/AAAAAAAAAGA/FgscDv63ae8/s1600/Capture2.PNG](https://lh6.googleusercontent.com/-Ae42kfZesJ4/VMuho3LPHgI/AAAAAAAAAGA/FgscDv63ae8/s1600/Capture2.PNG)

This behavior occurs in both the Line Chart and Vertical Bar Chart, but not  
in the Pie Chart. Any suggestions as to what I might be doing wrong/how to  
go about fixing this?

Thanks!

Cheers,

Al

--  
Notice of Confidentiality: \*\*\*This E-mail and any of its attachments may  
contain Lincoln National Corporation proprietary information, which is  
privileged, confidential, or subject to copyright belonging to the Lincoln  
National Corporation family of companies. This E-mail is intended solely  
for the use of the individual or entity to which it is addressed. If you  
are not the intended recipient of this E-mail, you are hereby notified that  
any dissemination, distribution, copying, or action taken in relation to  
the contents of and attachments to this E-mail is strictly prohibited and  
may be unlawful. If you have received this E-mail in error, please notify  
the sender immediately and permanently delete the original and any copy of  
this E-mail and any printout. Thank You. \*\*\*

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f572ee07-d1de-47c4-947b-be6d48c706c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f572ee07-d1de-47c4-947b-be6d48c706c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:35am UTC](https://discuss.elastic.co/t/kibana4-histogram-x-axis-not-ordering-properly/21921/2 "2017-07-06T00:35:39Z")

</div>

Closed on July 6, 2017, 12:35am UTC


