Splunk Search

Sorting the data values in a stacked timechart

adrianblakey
New Member

How do I order the horizontal slices in a stacked timechart by value?

The working search string looks like this:

timechart count by author.name limit=0

The data is coming from git commit records. Each record is labelled by author.name. The search string tallies the count of records for every author over a year and produces a nice stacked bar chart, one bar per month with every user's count stacked up in the bar.

However the stack is ordered alphabetically by author.name. How do I order it by count, lowest to highest top to bottom?

0 Karma

FrankVl
Ultra Champion

I wouldn't know of any way to do that. Generically you can manipulate the field value that you are counting by (the author.name in your case) with for instance a numerical prefix, to control the order in which things are shown in the graph.

And there might be a way to have splunk figure out the order of authors by count and number the author.names accordingly. The trouble is that you want to do this over time. So today one author has the highest count, tomorrow it's another. And that is not really something you can deal with by just adding some order prefix to the author.name.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...