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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...