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!

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

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...