How to show year only in X-axis, Kibana using date histogram?

how can I display the year only on a date histogram, I would like to display the years, but it seems i have intervals,

please see below screenshot

however I tried Terms aggregation here's the result, I want to achieve the first screenshot to diplay the year only but It should display all the years from 1990 - 2019.

thank you in advance

best regards

The visualization tries to be smart and limits the amount of ticks displayed for dates - in this case it's only showing only every second label.

To work around this, try to create a scripted field for the year (as a number, not a date) and use the terms aggregation on that: doc['year'].value.getYear()

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