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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...