Other Usage

How to change treemap default colors for categorical colorMode?

connect
Engager

I am using treemap visualization. I have been trying to change the default color of the treemap using the following options:

<option name="treemap_app.treemap.maxColor">
<option name="treemap_app.treemap.minColor">

colorMode has been set to categorical

<option name="treemap_app.treemap.colorMode">categorical</option>

treemap doesn't seem to honor any changes to maxColor or minColor and uses the default colors.

Is this a bug in treemap?

 

maxColor/minColor seems to work if colorMode is changed is sequential but that is not the view I'm interested in

 

 

Labels (1)
Tags (1)
0 Karma

tscroggins
Influencer

Hi,

Documentation is no longer linked on Splunkbase, but it's still available here: https://docs.splunk.com/Documentation/Treemap/1.5.0/TreemapViz/TreeMapFormat 

Minimum and maximum color values are only used in sequential mode.

In categorical mode, Treemap uses a default palette provided by Splunk:

 

ColorCodes.CATEGORICAL = [
    "#7b56db", "#cb2196", "#008c80", "#9d6300", "#f6540b", "#ff969e", "#99b100", "#f4b649", "#ae8cff", "#8cbcff",
    "#813193", "#0051b5", "#009ceb", "#00cdaf", "#00490a", "#dd9900", "#465d00", "#ff677b", "#ff6ace", "#00689d"
];

ColorCodes.CATEGORICAL_DARK = ColorCodes.CATEGORICAL; // @pwied: for now we use the same colors in dark mode

 

When useColors is false, Treemap defaults to this shade of blue: #1e93c6.

0 Karma

connect
Engager

Thank you @tscroggins  Is there any recommended way to change the defaults values for

ColorCodes.CATEGORICAL

 and have changes be limited to treemap visuals?

0 Karma

tscroggins
Influencer

There isn't a simple way, but if you're feeling adventurous, you can unminify and edit $SPLUNK_HOME/etc/apps/treemap_app/appserver/static/visualizations/treemap/visualization.js. You'll lose Splunk support, but any changes you make could be submitted to Splunk as ideas or feature enhancement requests.

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...