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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...