Dashboards & Visualizations

Xaxis data not showing up in a bar chart

sarithapguptha
Engager

Hi,

Please help, I want to get the xaxis values in a bar chart.
In the image attached, i have a query which doesnot have transpose command where I can see the values appearing for xaxis then when i tried to change the color for each bar using transpose command then suddenly the xaxis values does not appear.
In the query i m displaying top highest 10 values

alt text

Labels (1)
0 Karma
1 Solution

niketn
Legend

@sarithapguptha if you need color by each resource value as well as display the resource name in the x-axis, you should use | eval {resource}= cost after head 10, instead of using the transpose command.

Following is a run anywhere example for you to try out.

index=_internal sourcetype=splunkd log_level=INFO cumulative_hits=*
| stats sum(cumulative_hits) as cost by name
| sort - cost
| head 10
| eval {name}='cost'
| fields - cost
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@sarithapguptha if you need color by each resource value as well as display the resource name in the x-axis, you should use | eval {resource}= cost after head 10, instead of using the transpose command.

Following is a run anywhere example for you to try out.

index=_internal sourcetype=splunkd log_level=INFO cumulative_hits=*
| stats sum(cumulative_hits) as cost by name
| sort - cost
| head 10
| eval {name}='cost'
| fields - cost
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

sarithapguptha
Engager

@niketn 

Thank you for the solution... it worked 😊

 

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 ...