Splunk Search

Is it possible to change default colors for charts?

dominiquevocat
Motivator

Is it possible to change the default colors for charts (seriesColors), preferably so that it survives an upgrade?

I would like to use the colors in the CI for the charts be default ( as far as it goes, not that many colors 🙂 )

0 Karma

danielsachse
Loves-to-Learn

You can use an undocumented setting in ui-prefs.conf:

 

[default]
display.visualizations.charting.seriesColors = [0xea1b0a,0x1ea2b1,0xb00402,<ADD YOUR COLORS>]

 


It just didn't work as embedded report. Everywhere else - it looks fine.

If you need to set the seriesColors for a specific embedded report - you can add the property in the stanza of the report in the savedsearches.conf:

[myreport]
display.visualizations.charting.seriesColors = [0xea1b0a,0x1ea2b1,0xb00402,<ADD YOUR COLORS>]
0 Karma

marina_rovira
Contributor

Hello!
Since any answer is accepted, does it mean that is not possible to change the default array with the color I want?

I would like to make the graphs in my dashboard more unified with the company official colors, but not having to change it for every chart.

Thank you in advance.

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@dominiquevocat - Did one of the answers below help provide a solution your question? If yes, please click “Accept” below the best answer to resolve this post and upvote anything that was helpful. If no, please leave a comment with more feedback. Thanks.

0 Karma

jkat54
SplunkTrust
SplunkTrust
0 Karma

dominiquevocat
Motivator

to make it more precise: i would like to change the default stylesheet or something i.e. influence the colors Splunk uses unless you specify something in the xml of a dashboard etc.

0 Karma

srinivasup
Explorer

{"Error": 0xFF0000,"Success":0x00FF00}

0 Karma

niketn
Legend

You can use either or both for fieldColors and seriesColors with your set of colors to be consistent across your app.


[Update]

Following are built in Chart Coloring options (Refer to Chart Color Options in Splunk 6.x Dashboard Examples app)

<option name="charting.backgroundColor">
<option name="charting.foregroundColor">
<option name="charting.fontColor">
<option name="charting.seriesColors">

You can use CSS to override styling as per your need as well. You can override svg segments using !important in CSS. (Refer to Custom Layout Example: Dark example in Splunk 6.x Dashboard Examples App.

/* SVG */
.highcharts-container svg {
    background: #000;
}
.highcharts-container svg>rect:not(.block-background) {
    fill: #000 !important;
    opacity: 0.1;
}
.highcharts-container svg text:not(.single-result):not(.delta-label) {
    fill: #ccc !important;
}
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

felipesewaybric
Contributor

And you can use in the options xml, like this:

{"field1":#23B5F9, "field2":#FB8900, "field3":#FF5733, "field4":#14B87C}

0 Karma

mhassan24
Explorer

Yes, there is.
You have the option of deliberately assigning colors to series (in order) rather than allowing Splunk to go with default on dashboards:
http://docs.splunk.com/Documentation/Splunk/6.2.4/Viz/Chartcustomization

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...