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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...