Splunk Search

How do I change the label of the x-axis on a chart?

Hppjet
Path Finder

alt text

index="all_eqt" Plant=15 ProcessCode=T DefectCode="*" MachineNumber<26 | stats sum(TotalSquareYards) as "Total Square Yards" by DefectCode

How do I change the x-axis "TA" label to display "styles" instead?

0 Karma
1 Solution

Sukisen1981
Champion

if you want to change the x axis label , which probably is coming as 'DefectCode' you just can edit the chart type and put a custom x axis label to TA. Visualization > Format > X Axis > Ttile > Custom > (your label.)
However, I think the DefectCode field value is TA which you want to rename as Styles
For this you need to :
|eval DefectCode=if(DefectCode="TA","Styles",DefectCode) BEFORE the stats command.
Now, if you have other DefectCode types you need to append the labels you want after the last , in the if statement

View solution in original post

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

Recent thread on this topic here

0 Karma

Sukisen1981
Champion

if you want to change the x axis label , which probably is coming as 'DefectCode' you just can edit the chart type and put a custom x axis label to TA. Visualization > Format > X Axis > Ttile > Custom > (your label.)
However, I think the DefectCode field value is TA which you want to rename as Styles
For this you need to :
|eval DefectCode=if(DefectCode="TA","Styles",DefectCode) BEFORE the stats command.
Now, if you have other DefectCode types you need to append the labels you want after the last , in the if statement

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...