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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...