Dashboards & Visualizations

How to set color series for specific fields for all its possible values without setting them from the beginning?

amitbenda
Loves-to-Learn Lots

Hi,

I have a column chart that shows 1 field, but filters by others.

I want the columns to be different for each value of a specific selection field in the input, but I can not set for each value its color in the first place because I have something like 950 values (maybe more).

So if the user chooses to look at 3 values in the filter, he will see each value in a different color and know the color of each value.

I did not find anything like it, I just saw that the color should be set to each value from the beginning.
Can you help me?

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can use tokens to pass the colours, for example, if the first field in the filter is "locationX" set a token "firstcolour" to "0xff0000" or "red" or something appropriate, then use the $firstcolour$ token as the colour for the first series.

0 Karma

amitbenda
Loves-to-Learn Lots

not sure I understood .. can you show me such a code for example?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
    <set token="firstcolour">0xff0000</set>
    <set token="secondcolour">0x00ff00</set>
    <set token="thirdcolour">0xffff00</set>
    <set token="fourthcolour">0x0000ff</set>
    <set token="fifthcolour">0x00ffff</set>

        <option name="charting.seriesColors">[$firstcolour$,$secondcolour$,$thirdcolour$,$fourthcolour$,$fifthcolour$]</option>
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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