Splunk Search
Highlighted

Is it possible to change default colors for charts?

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
Highlighted

Re: Is it possible to change default colors for charts?

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
Highlighted

Re: Is it possible to change default colors for charts?

Contributor

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

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

0 Karma
Highlighted

Re: Is it possible to change default colors for charts?

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;
}



| eval message="Happy Splunking!!!"


Highlighted

Re: Is it possible to change default colors for charts?

Explorer

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

0 Karma
Highlighted

Re: Is it possible to change default colors for charts?

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
Highlighted

Re: Is it possible to change default colors for charts?

SplunkTrust
SplunkTrust
0 Karma
Highlighted

Re: Is it possible to change default colors for charts?

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
Highlighted

Re: Is it possible to change default colors for charts?

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