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?

dataisbeautiful
Communicator

For anyone stumbling on this thread and wondering about axis labels.

Splunk has replied here: https://splunk.my.site.com/customer/s/article/Display-values-on-x-axis

Splunk ideas link: https://ideas.splunk.com/ideas/EID-I-1833

 

I'm not connected in any way other than also wanting labels to be handled more elegantly than just ignoring them if there are too many.

0 Karma

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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...