Splunk Search

Customize a CSS file to modify the color palette of charts

cmcclure_splunk
Splunk Employee
Splunk Employee

Our team is currently using Splunk within core dashboards within the Splunk software and through embedded reports on external sites. We have a request from our customers to modify the color palette of the charts that are produced in this method. We know how to update charts using the seriesColors option within the XML of a dashboard, but is there a way we can customize a CSS file (which tags would we use) to reproduce that same effect? This would allow us (or hopefully allow us) to carry that same color palette into embedded reports by enforcing the use of a specific CSS file.

lguinn2
Legend

Yes, you can have multiple CSS files. Put them in your app directories, and you can reference them in your dashboards. Simple XML dashboards in Splunk 6 load dashboard.js and dashboard.css by default. (In older versions, the default files were application.js and application.css.)

Here is some documentation about CSS files in Splunk and where they should be stored. In your dashboard XML (first line), you need to reference the custom CSS file:

<dashboard  stylesheet="myCustomFile.css">
0 Karma
Get Updates on the Splunk Community!

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...