Splunk Search

How to create a timechart with charting.legend.labels, but maintain the x-axis label format and color two lines red and blue?

hunyady
Explorer

I have a timechart with two lines (sum and max of values). Have a problem with the display format of the x-axis. It is now: ddd mm.yy (11. Okt 15).
If I insert a line of

<option name ="charting.legends.labels">[field_kum,field_sum]</option> 

then the display format of the x-axis changes: i.E. 2015-10-15T00:00:00.0000 +02. Why?
Can anybody help me?
I need it, while I must have the line color for the two fields exactly as red and blue. If I don't have this label-line, then it will be randomly blue/red or red/blue... 😞
I must use a timechart, not a chart!
thank you

0 Karma

mporath_splunk
Splunk Employee
Splunk Employee

You can always set explicit mapping for your charting series like so:

<option name="charting.fieldColors">
    {"field_kum":0xFF0000,"field_sum":0x0000FF}
</option>

That will always set field_kum to red and field_sum to blue

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...