Dashboards & Visualizations

Set custom color for choropleth map bins

wu_weidong
Path Finder

Hi all,

I'm trying to build a (categorical) choropleth map where the 3 ranges are showing specific colors. Part of my code is 

<query>...
| eval count=case(count<=-100,"-100",(count>=-100 AND count<=50),"-100 to -50",count>50,">50")
| sort + count
| geom geo_countries featureIdField=country</query>

<option name="mapping.type">choropleth</option>
<option name="mapping.choroplethLayer.colorBins">3</option>
<option name="mapping.choroplethLayer.colorMode">categorical</option>
<option name="mapping.seriesColors">{"-100":#ff9900,"-100 to 50":#ffcc00,">50":#fff0b3}</option>

However, I'm just seeing the countries colored black, regardless of which bin they fall into. Without specifying "mapping.seriesColors", the countries are colored automatically by Splunk.

Am I using the seriesColors option wrong?

Thank you.

Labels (2)
Tags (1)
0 Karma
1 Solution

wu_weidong
Path Finder

I realized what was wrong. Instead of using mapping.seriesColors, I should use mapping.fieldColors.

View solution in original post

0 Karma

wu_weidong
Path Finder

I realized what was wrong. Instead of using mapping.seriesColors, I should use mapping.fieldColors.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...