Splunk Search

How to change the font color in Simple XML for each line series in a timechart?

Sukisen1981
Champion

I have a timechart with 3 line series:
A,B and C

Now, I have used series colors in Simple XML to change the colors of the 3 respective lines.
However, the font color of the data label is still the default color.

How can I change the font color for each line separately in Simple XML?
If I set char.fontcolor, it changes the font color for all data values.

0 Karma

somesoni2
Revered Legend

You would have to use the charting.fieldColors (sample update the field name and colors as per your need.

 <option name="charting.fieldColors">
          {"ERROR": 0xFF0000, "WARN": 0xFF9900, "INFO":0x0066FF, "NULL":0xC4C4C0}
        </option>
0 Karma

Sukisen1981
Champion

doesn't work.
This xml transfers the field or the series , not the color of the font, perhaps my question is not clear:
snippet from my simple xml
[Influx,Closure,Open]
[0x009900,0x333399,0xCC3300]
this works and changes the colors of influx, closure and open accordingly, which is basically the same as your code.
what I want is to change the font colors of influx,closure and open also to match the series colors. All 3 are lines in a timechart

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...