Splunk Search

How to adjust label position in a column chart?

dreadangel
Path Finder

Here is my chart alt text - there is any way to set the position of column labels above the column, not in the middle?

Tags (2)
0 Karma

DavidHourani
Super Champion

Hi @dreadangel,

This is because you are using :

<option name="charting.chart.stackMode">stacked</option>

Change it to :

<option name="charting.chart.stackMode">default</option>
<option name="charting.chart.showDataLabels">all</option>

Let me know if that works for you.

Cheers,
David

0 Karma

dreadangel
Path Finder

Here is the result - not so pretty, but anyway a value is not above the column.

BTW maybe to use a D3.js chart?

0 Karma

DavidHourani
Super Champion

ouch... yeah, true this does look bad...But that's the only way to get the values on top of the bar chart using standard xml. A D3.js chart should do the trick. And possibly reworking the query could help as well ?

0 Karma

dreadangel
Path Finder

@DavidHourani Here is the whole configuration - as you can see I'm using the set you indicated

    <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
    <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option> 
    <option name="charting.axisY.maximumNumber">100</option>
    <option name="charting.axisLabelsX.majorLabelVisibility">auto</option>
    <option name="charting.axisTitleX.visibility">visible</option>
    <option name="charting.axisTitleY.visibility">visible</option>
    <option name="charting.axisTitleY2.visibility">visible</option>
    <option name="charting.axisX.abbreviation">none</option>
    <option name="charting.axisX.scale">linear</option>
    <option name="charting.axisY.abbreviation">none</option>
    <option name="charting.axisY.scale">linear</option>
    <option name="charting.axisY2.abbreviation">none</option>
    <option name="charting.axisY2.enabled">0</option>
    <option name="charting.axisY2.scale">inherit</option>
    <option name="charting.chart">column</option>
    <option name="charting.chart.bubbleMaximumSize">50</option>
    <option name="charting.chart.bubbleMinimumSize">10</option>
    <option name="charting.chart.bubbleSizeBy">area</option>
    <option name="charting.chart.nullValueMode">gaps</option>
    <option name="charting.chart.showDataLabels">all</option>
    <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
    <option name="charting.chart.stackMode">stacked</option>
    <option name="charting.chart.style">shiny</option>
    <option name="charting.drilldown">none</option>
    <option name="charting.fieldColors">{"OLD":0xFFFF64,"LAST":0x22B14C,"UNSUP":0xFF6464}</option>
    <option name="charting.layout.splitSeries">0</option>
    <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
    <option name="charting.legend.labelStyle.overflowMode">ellipsisEnd</option>
    <option name="charting.legend.mode">standard</option>
    <option name="charting.legend.placement">right</option>
    <option name="charting.lineWidth">2</option>
    <option name="height">202</option>
    <option name="refresh.display">progressbar</option>
    <option name="trellis.enabled">0</option>
    <option name="trellis.scales.shared">1</option>
    <option name="trellis.size">medium</option>
0 Karma

DavidHourani
Super Champion

Hi @dreadangel, when setting : <option name="charting.chart.showDataLabels">all</option> it should automatically show on top of the bars.. Which option are you currently using for displaying those values ?

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 ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...