Splunk Search

How to get a column chart to show all x-axis labels?

kualo
Explorer

Hi

I want to show score distribution by column chart. The score ranges from 0 to 100
I have the below search and it gives me the correct result. If I only have fewer scores it will show the score labels.
However, but it won't show all the score labels on x-axis.
Is there anyway to show all 0-100 on the x-axis?
Thanks and merry Christmas.

some search | stats count by score.
0 Karma

niketn
Legend

I think plotting of 100 data points on x-axis is would not be possible unless you reduce browser text size to 90% or 85% or more or maybe display up to 85 data points on x-axis.

You can try some charting properties to accommodate as many data points as possible:

    <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
    <option name="charting.axisLabelsX.majorLabelStyle.rotation">-90</option>
    <option name="charting.axisLabelsX.majorLabelVisibility">show</option>
    <option name="charting.axisX.includeZero">true</option>

You can also explore Punchcard custom visualization which can plot the 100 series data in x-axis (offers 45 degree rotation for labels)

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

somesoni2
Revered Legend

How about this? (will show 0 count for score that are not returned by your search)

 some search | stats count by score | append [| gentimes start=-1 | eval score=mvrange(0,101) | table score | mvexpand score | eval count=0 ] | stats max(count) as count by score
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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