Splunk Search

Colors inversed in my piechart ! why ?

henriq_c
Explorer

Hi !

I have a piechart and I assigned red color for a x value and green color for a y value on it. But sometimes it switches (green for x and red for y...)! What is the reason ?

How to keep it stable without inversion of colors ?

Thank you

0 Karma
1 Solution

harsmarvania57
SplunkTrust
SplunkTrust

Try below configuration, replace X_VALUE and Y_VALUE in below config with actual values.

<option name="charting.fieldColors">
  {"X_VALUE": 0xFF0000, "Y_VALUE":0x009900}
</option>

View solution in original post

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

Try below configuration, replace X_VALUE and Y_VALUE in below config with actual values.

<option name="charting.fieldColors">
  {"X_VALUE": 0xFF0000, "Y_VALUE":0x009900}
</option>
0 Karma

henriq_c
Explorer

i used this like that

<option name="charting.legend.labels">["x","y"]</option>
 <option name="charting.seriesColors">[0x169F3E,0xFF0000]</option>
0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

charting.seriesColors will not work for specific colors to specific values, in this case you need to use charting.fieldColors

Here is documentation for charting.seriesColors

Note: To apply static colors to specific fields use the charting.fieldColors property. 

Ref. doc https://docs.splunk.com/Documentation/Splunk/7.2.4/Viz/ChartConfigurationReference#General_chart_pro...

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

Recently have you upgraded the Splunk ? Are you using charting.fieldColors in your chart to set color ?

0 Karma

henriq_c
Explorer

For the piechart I use [0x169F3E,0xFF0000]

How do use it for 2 values in a piechart ?
I have the 7.0.x version of splunk

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 ...