I want the timestamps for the X-axis labels of a timechart to have the following format:
where HH:mm is in 24-h format, M designates month, m designates minute.
Example: "February 14th, 1PM" should look like "02-14 13:00"
Does anyone now how & where this can be configured?
asked 14 Feb '11, 13:34
You can use chart to do the same as timechart:
And it's easy to format a chart...
Based on gkanapathy's comment, it might be better to implement it like this to ensure proper sorting of the time values:
Thanks for your replies -
The proposed method worked:
... | timechart span=1m sum(HTTP_5xx) | fillnull value=0 | rename _time AS Time | eval Time=strftime(Time, "%m-%d %H:%M")
However, using the above search command, the labels on the X-Axis disappear.
This is how chart labels looked before ("bad" timestamp formatting, but proper labels):
This is how chart labels look now (proper timestamp formatting, but labels not shown):
I use the following chart formatting option the force label visibility:
However, with the reformatted timestamps, the labels only partly appear (i.e. they are still cut off) when stretching the chart horizontally to ~ 2000 pixels...