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
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.
Thank you @tscroggins Is there any recommended way to change the defaults values for
ColorCodes.CATEGORICAL
and have changes be limited to treemap visuals?
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.