Change format of labels in a visualization X axis chart

Hello, I'd like to know if it is possible to change the format of the labels at the chart axis in visualizations. An image with an example is attached.

It's not possible to change the orientation in Lens, I created a feature request for this here: [Lens] Allow configuration of axis labels orientation · Issue #92574 · elastic/kibana · GitHub Alternatively you can use the legacy visualizations (select the "Aggregation based" tile in the bottom left in the modal, then use vertical bar or area chart). In there you can use the "Align" setting in the "Metrics & Axes" tab to change the orientation.

You can change the format by editing the dateFormat:scaled advanced setting in the Management section. This formatting is trying to adjust the format to the time range - if you are looking at just the last few hours, it will show hour and minute, if you are looking at the last year, it will show date without time and so on.

Keep in mind this setting is applied to all date x-axes in the current space. There's an open feature request for allowing custom date formats on the chart level ([Lens] Date formatter · Issue #67206 · elastic/kibana · GitHub).

Thank you Joe for your answer. I forgot to tell that I also would like to be able to show every legend according with the interval selected, i.e., if the time range is 2021-01-01 to 2021-01-10, I expect to see in the correcponding axis (X or Y) the following legends: 2021-01-01, 2021-01-02, 2021-01-03, 2021-01-04, 2021-01-05, . . . . . . . , 2021-01-09, 2021-01-10.

That's not possible in Kibana today - all chart implementations will find good points in time to place ticks for continuous scales like dates.

You might be able to work around this a bit by using a scripted field to turn the date into a string of the granularity you want (e.g. daily) and use the "Top values" function instead, but it has various other downsides.

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