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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...