Dashboards & Visualizations

Column chart - adding labels directly below each column and coloring the columns

mmkoehler
Loves-to-Learn

I've read a bunch of questions and answers on this topic but I am not able to implement the column chart meeting these two requirements:

  1. For each column there should be a lable directly below the column.
  2. Each column should have a predefined color.

This is a mock-up of how it should look like:

mmkoehler_0-1632307748394.png

These were my two attempts:

First attempt (Coloring the columns did not work, but labels below the columns worked):

search:  

 

index=itdmfc-p source="jira_history://IT-DemMgmt-FC" issue_type="Sub-task"
| rename components{} AS components
| where components LIKE "Cloud"
| dedup key
| eval assigned = if(status=="Assigned", "Assigned", null)
| eval inProgress = if(status=="In Progress", "In Progress", null)
| eval waiting = if(status=="Waiting for customer", "Waiting for customer", null)
| eval accepted = if(status=="Accepted", "Accepted", null)
| eval declined = if(status=="Finally Declined", "Finally Declined", null)
| eval obsolete = if(status=="Obsolete", "Obsolete", null)
| eval total = "1"
| chart count(total) as Total, count(assigned) as Assigned, count(inProgress) as "In Progress", count(waiting) as "Waiting for customer", count(accepted) as Accepted, count(declined) as Declined, count(obsolete) as Obsolete
| transpose 0 column_name="Status"​

 

Result: (impossible to color the single columns separately)

mmkoehler_0-1632311657031.png

I've tried coloring the columns with <option name="charting.seriesColors">[ffffff, F5B041, F7DC6F, D5DBDB, 3DB42A]</option> and also with charting.fieldColors but it didn't bring the expected result.

 

Second attempt (Coloring the columns worked, but labels below columns not):

search: 

 

index=itdmfc-p source="jira_history://IT-DM-FC" issue_type="Sub-task"
| rename components{} AS components
| where components LIKE "Cloud"
| dedup key
| eval assigned = if(status=="Assigned", "Assigned", null)
| eval inProgress = if(status=="In Progress", "In Progress", null)
| eval waiting = if(status=="Waiting for customer", "Waiting for customer", null)
| eval accepted = if(status=="Accepted", "Accepted", null)
| eval declined = if(status=="Finally Declined", "Finally Declined", null)
| eval obsolete = if(status=="Obsolete", "Obsolete", null)
| eval total = "1"
| chart count(total) as Total, count(assigned) as Assigned, count(inProgress) as "In Progress", count(waiting) as "Waiting for customer", count(accepted) as Accepted, count(declined) as Declined, count(obsolete) as Obsolete​

 

Result:

mmkoehler_2-1632311962111.png

This second attempt allowed me to color the columns, but I wasn't able to add the labels directly below each single column.

Is there a way to combine both requirements: Having labels directly below the columns as in my first attempt and coloring each column separately as in my second attempt?

 

Labels (1)
0 Karma

jhanvidattani
Path Finder

You can refer to spunk solution to see how to assign a specific colors to chart columns based on it's value: https://community.splunk.com/t5/Dashboards-Visualizations/How-to-assign-colors-to-values-in-a-chart/...

 

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!

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

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