Splunk Search

Chart labels disappear when too small to display

helenashton
Path Finder

My specific situation concerns a bar chart, but I think it applies to all charts.

When I have so many bars that the labels cannot be displayed then the labels disappear entirely. I believe this is how highcharts (used in simple XML) is designed.

I know I can set the height on my chart and the labels will show, but I often don't know how many bars I will have. And when I have only a few, my chart looks ridiculous!

Could we have a way to deal with this? For example, be able to set the bar width? Or some other mechanism where we don't need knowledge of how many bars?

ngatchasandra
Builder

Hi helenashton,

Try to put this option in your simple xml in chart, this will affect your bar behaviour to let you see labels:

 <option name="height">200</option>
0 Karma

helenashton
Path Finder

Hi,

Not quite what I want to do. As I said above:
"I know I can set the height on my chart and the labels will show, but I often don't know how many bars I will have. And when I have only a few, my chart looks ridiculous!"

ngatchasandra
Builder

Try to configure options that follow:

charting.chart.barSpacing (Specifies, in pixels, the spacing between bars in a bar chart; default is 1) and charting.chart.seriesSpacing (Specifies, in pixels, the spacing between clustered series in a bar chart.)

you can follow the link http://docs.splunk.com/Documentation/Splunk/6.2.2/Viz/ChartConfigurationReference#Bar_chart_properti...

0 Karma

ngatchasandra
Builder

The param (advanced XML) for specifying the width of a chart cell is:

<param name="charting.chart">column</param>

<param name="charting.chart.columnStyle.width">1</param>

This makes all of your column chart cells have a width of 1 pixel. Change the number as necessary! But i don't see yet the width option in Simple XML for Colum chart

0 Karma

helenashton
Path Finder

ngatchasandra: Thanks for all your info.
I tried the barSpacing and it changes the width of the bar, but the labels take up the same space - they are not spaced out any. I am also not using advanced XML (we used to, but were told it would not be developed further so have switched to simple XML).

0 Karma

helenashton
Path Finder

juvetm: Ok, so I have not missed a setting, it's just not possible.
I could probably work round it with JS if the highcharts didn't make the labels XML empty when the chart was too short 😞
It would be a really useful feature for charts!

0 Karma

juvetm
Communicator

Hi helenashton,
what you ask is impossible in splunk for the moment
you know that bar chart is been display depending the request you make so it is impossible to set the width of the bar chart.the bar that you see depend the request you make so you can not know the number bar you need all the bars depend the value in the field.
thanks

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...