Show months on X-Axis while maintaining daily granularity of data

Hi,

I have a Kibana visualisation that represents disk capacity utilisation on a few servers. New data gets ingested daily, and should go a few months back on the visualisation.
This is what it currently looks like:

Is there any way to make the graphs look exactly the same, but have month names instead of numerical dates?


(created with Paint)

Best regards,
Kult.

Hi,

You can change the format of the field under field formatters and choose to display what you would like as axes values.

You can also use scripted fields to make date to display as month. But this would be a slightly expensive operation.

Thanks,
Bhavya

1 Like

Hi Bhavya,

Thanks for the swift reply!

Do you mean I should set format to "Date" and set "MMMM" for the moment.js format?


I've done that, but it appears to have no effect on the visualisation.

Best regards,
Kult.

Hi, you will actually need to set this in Scaled date format in Management > Advanced Settings:

The reason is that this allows for more granular control of formatting. For example, for intervals less than week, it makes sense format them as weekdays instead of months.

2 Likes

Hi jen-huang,

As a test for trying to understand what that setting really does, I've left it unchanged, went back to my index pattern's @timestamp and changed moment.js format pattern to be "YYYY-MM-DD" (as it is one of the predefined ones in dateFormate:scaled). After that, I went back to the visualisation, but unfortunately I saw no changes. The only place I see the pattern change some behaviour is in Discovery.


image

I'd expect all those 00:00 to be dropped from the graph after I made the change.

What am I missing here?

Best regards,
Kult.

Just realised that I had to change Interval to "Monthly" to make the thing effective. Works fine now.
Cheers!

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