Dashboards & Visualizations

Adjust size of panels on a particular dashboard instead of at the app level

snowmizer
SplunkTrust
SplunkTrust

I would like to create a dashboard (using advanced xml) that has more than two panels (singlevalue charts and pie charts) per row. I have added this to my application.css file on my app:

.panel_row2_col .layoutCell { width: 33% !important; }

This works but that will mean that every dashboard in the app will use this layout and I don't want that. Is there a way to specify the panel layout at the dashboard level? I've played with the "width" parameter inside "Flashchart" but that changes the size of the pie chart or singlevalue not the panel itself.

Thanks.

Tags (2)
2 Solutions

southeringtonp
Motivator

Each dashboard using Advanced XML can specify its own CSS.

Just add a new stylesheet in appserver/static, and set stylesheet=xxx.css in your <view... tag at the start of your dashboard.

View solution in original post

sideview
SplunkTrust
SplunkTrust

There's two methods you can use, and which one depends on your preference and on how many custom views you have.

1) application.css, but with .splView-my_view_name prefix

same as you have, but do

.splView-my_view_name .panel_row2_col .layoutCell { 
  width:33% !important; 
} 

2) custom css file on the app itself. If you put stylesheet=foo.css in the view tag, it will look for a foo.css file ie: etc/apps//appserver/static/foo.css

View solution in original post

sideview
SplunkTrust
SplunkTrust

There's two methods you can use, and which one depends on your preference and on how many custom views you have.

1) application.css, but with .splView-my_view_name prefix

same as you have, but do

.splView-my_view_name .panel_row2_col .layoutCell { 
  width:33% !important; 
} 

2) custom css file on the app itself. If you put stylesheet=foo.css in the view tag, it will look for a foo.css file ie: etc/apps//appserver/static/foo.css

southeringtonp
Motivator

Each dashboard using Advanced XML can specify its own CSS.

Just add a new stylesheet in appserver/static, and set stylesheet=xxx.css in your <view... tag at the start of your dashboard.

snowmizer
SplunkTrust
SplunkTrust

Thanks. This worked great.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...