Splunk Search

How to swap X and Y axis?

bryceweb22
Path Finder

I have an area chart with Time_Taken on the x axis and count on the y axis and I want them to be switched, please help.

Thanks!

0 Karma
1 Solution

woodcock
Esteemed Legend

Assuming that all of your values on the existing X-axis ARE NUMBERS (this is a BIG "if"), just add this to the bottom of your existing search:

| untable _time Xaxis Yaxis
| xyseries _time Yaxis Xaxis

View solution in original post

0 Karma

woodcock
Esteemed Legend

Assuming that all of your values on the existing X-axis ARE NUMBERS (this is a BIG "if"), just add this to the bottom of your existing search:

| untable _time Xaxis Yaxis
| xyseries _time Yaxis Xaxis
0 Karma

Vijeta
Influencer

@bryceweb22 Can you share your chart command?You can use untable and xyseries command. This post may help.
https://answers.splunk.com/answers/477392/how-do-i-invert-the-x-and-y-axis-in-my-chart.html

0 Karma

bryceweb22
Path Finder

| rex ".*\s(?P\d+)$$$$"
| chart count by Time_Taken span=16
| sort Time_Taken

This is what I have.

0 Karma

Vijeta
Influencer

@bryceweb22 - You can simply change your visualization from column chart to bar chart, it will make time on y axis and count on x axis.

0 Karma

bryceweb22
Path Finder

Well I have it as a area chart as of right now and I would prefer to keep it that way unless there is no way to swap their positions

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

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