Splunk Search

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

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

SplunkTrust
SplunkTrust

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

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