Dashboards & Visualizations

Color table cells in scheduled PDF delivery

bruceclarke
Contributor

I know I can add javascript to a dashboard to color table cells based on each cell's value. When I download the PDF, however, the cell's color is obviously removed. I was wondering if there is a way to schedule a PDF delivery of this dashboard that preserves the table cell colors.

Does anyone know of a solution for this?

shandr
Path Finder

Bumping this thread. I'd like a solution to this post too.

Below is Simple XML code I have used.

<table>
<search></search>
<format type="color" field="Health">
<colorPalette type="map">{"Critical":#6A5C9E, "Abnormal":#6A5C9E, "Normal":#65A637}</colorPalette>
</format>
</table>

See output, image below. (Dashboard left, PDF right.)
shandr_0-1707353225666.png

Splunk Cloud
Version 9.0.2303.201
Experience: Classic

Links to Splunk Cloud docs
https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML 
https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/DashboardPDFs

0 Karma

sduchene_splunk
Splunk Employee
Splunk Employee

a/look at this app : https://splunkbase.splunk.com/app/4030/
if it does not fit your need :
b/
One workaround is to use a css for printing, using very thick borders :
example of css :

@media print {
td.range-severe {
box-shadow: inset 0 0 0 1000px darkred !important;
color: #eee !important;
-webkit-print-color-adjust: exact !important;
}
}

working example with this app, containing the js and css, and a dashboard : https://github.com/simondev65/tableprintpdf
look for the dashboard inside, export to pdf using your browser : print->pdf. (not the export to pdf within splunk).
alt text

(this example is courtesy of @dveuve_splunk )

0 Karma

jlaigo2
Path Finder

After over 2 years is splunk still not going to provide a working solution for this?

bruceclarke
Contributor

I'm still having this issue. Does anyone have a workaround?

0 Karma

carroyo82
New Member

I supposed that if you use format in simple XML you should achieve what you are looking for:

http://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML

But the reality is that this does not work, despite of the fact that the documentation talks about all the simpleXML parameteres printed in pdf......

http://docs.splunk.com/Documentation/Splunk/6.6.0/Viz/DashboardPDFs

"You cannot generate PDFs of dashboards that are built using advanced XML or HTML. PDF generation works only with dashboards built with simple XML."

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...