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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...