How can i change the x-axis labels for a date format in Kibana.
Please see the below screenshot.
In below x-axis i want to change the date format and reduce the width
How can i change the x-axis labels for a date format in Kibana.
Please see the below screenshot.
In below x-axis i want to change the date format and reduce the width
There is a global option that allows you to do this globally in Settings >> Advanced >> dateFormat:scaled.
Change the default value to this, for instance, and you'll see date only even if data points are bucketed hourly:
[
["", "hh:mm:ss.SSS"],
["PT1S", "HH:mm:ss"],
["PT1M", "HH:mm"],
["PT1H",
"YYYY-MM-DD"],
["P1DT", "YYYY-MM-DD"],
["P1YT", "YYYY"]
]
If you always, always just want date, you can also make it simple and enter:
[["", "YYYY-MM-DD"]]
Please note though, this applies to all date ranges for all visualisations.
I have the same issue. I'm using Kibana 4.1.0.
However, in my case - a Date Range aggregation - dateFormat:scaled
seems not to be the relevant setting.
I want, for example, "9am to 10am" (that is, format "ha") as an x-axis label, but I'm getting the full "MMMM Do YYYY, HH:mm:ss.SSS" format, which is the default format specified by the dateFormat
setting, not the dateFormat:scaled
setting: the formatted x-axis label values match this dateFormat
pattern, not any of the patterns specified by dateFormat:scaled
.
Setting dateFormat
to "ha" works, but I don't want to specify "ha" as the global value for all cases; just for a particular visualization (I can also live with "just for a particular dashboard").
Is it possible to "inject" a value for dateFormat
into the Kibana URL (query string), to override the global setting? (I'm already programmatically building the URL, so this is no extra burden.)
I thought perhaps specifying:
{ "format": "ha" }
in the JSON Input field for the Date Range aggregation might work, but nope.
It's better if you start your own thread please, this one is pretty old.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.