Splunk Search

Sorting the data values in a stacked timechart

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

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!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...