Dashboards & Visualizations

How to change the background color of the panels in a dashboard using the style tag in XML?

nivethainspire_
Explorer

How to change the background color of the panels in a dashboard using the style tag in XML?

Tags (4)
0 Karma

rjthibod
Champion

I don't think you can do it directly via the "style" tag from HTML without referencing the Javascript classes for the panels/charts.

Instead, see the answer in this post that references the SimpleXML documentation for changing background colors.

https://answers.splunk.com/answers/462462/how-and-where-do-i-customize-my-dashboard-via-xml.html#ans...

Doc: http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/ChartConfigurationReference, see charting.BackgroundColor

0 Karma

niketn
Legend

@rjthibod, this should indeed be possible through CSS style as well. Panel Color, Dashboard Color etc. Please refer to Custom Layout Dark example in Splunk 6.x Dashboard Examples app.

Ideally unless we want to convert from Simple XML to HTML dashboard, it is best to use Simple XML chart configuration reference the way you have pointed out. For any HTML DOM elements which can not be styled using Simple XML Chart Configuration Reference Style override can be applied.

<html depends="$alwaysHideHTMLPanelOnlyforStyling$">
    <style>
           .dashboard-master{
                background-color:blue !important;
            }
           .dashboard-row .dashboard-panel{
                background-color:red !important;
            }
   </style>
</html>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

stuartidelta01
Path Finder

docs link doesn't work (because of the comma) - here's one that does, for the latest version at this point in time:

http://docs.splunk.com/Documentation/Splunk/6.6.2/Viz/ChartConfigurationReference

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...