Dashboards & Visualizations

Rename Label names on X axis in a column / barchart

pal4life
Path Finder

Hi,
Currently my labels on X axis are 2017-01-31T23:59:01.000-06:00 in the visualization, I am wondering have can I Change this and accordingly the other future month ones to January, February etc.

Thanks

0 Karma

woodcock
Esteemed Legend

Make sure that you time field is called _time and that you have used span=1mon and, if possible, call timechart as the last command (it has special MoJo for X-axis labeling that does this for you).

Also, check out this Q&A:
https://answers.splunk.com/answers/320303/how-to-rename-the-time-along-the-x-axis-of-my-time.html#an...

0 Karma

cmerriman
Super Champion

you should be able to do something like before your chart :

|eval month=strftime(_time,"%B") if you just want the month name
|eval monthYear=strftime(_time,"%Y, %B") if you want the year with the month name

and then chart by month or monthYear. if you NEED to chart the way you're currently doing it, you might be able to do a foreach command:

|foreach *-* [eval <<FIELD>>=strftime('<<FIELD>>',"%B")
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...