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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...