Hi,
I have a splunk dashboard with different panels i.e. pie chart, table etc.
I need to increase the font size of text inside the table. Can anyone please help in this?
Is there a way to modify the source xml of dashboard to achieve this?
Just to add,I am using shared splunk server where multiple application's logs are forwarded so I do not have admin access of Splunk.
@ggangwar, add the following code to your existing dashboard's Simple XML Code, it changes the font size in all tables
<row depends="$alwaysHideCSSPanel$">
<panel>
<html>
<style>
table tbody tr td{
font-size:150% !important;
}
</style>
</html>
</panel>
</row>
Refer to one of my older answers for your options to apply CSS to your dashboard: https://answers.splunk.com/answers/590387/how-do-i-update-panel-color-in-splunk-using-css-1.html
@ggangwar, add the following code to your existing dashboard's Simple XML Code, it changes the font size in all tables
<row depends="$alwaysHideCSSPanel$">
<panel>
<html>
<style>
table tbody tr td{
font-size:150% !important;
}
</style>
</html>
</panel>
</row>
Refer to one of my older answers for your options to apply CSS to your dashboard: https://answers.splunk.com/answers/590387/how-do-i-update-panel-color-in-splunk-using-css-1.html
@niketnilay Somehow, the pdf generated out of this dashboard is not having effect of applied css.
Can you please suggest what can I do for this?
@ggangwar PDF renderer in Splunk has a lot of limitations and does not play well with customization in dashboard. So your option would be to Print PDF manually and export.
May be if it is run on a dumb terminal use a utility code to take a snapshot at regular interval and email. (All this outside of Splunk).
If this is the case, Splunk product needs improvement in order to have this feature. From User's perspective, it is inconsistent behavior in terms of what is visible in Dashboard and what is actually added in PDF.
@ggangwar as far as I know this behavior has always been there. So I agree that PDF export needs complete revamp. If you have Splunk Entitlement you should reach out to Splunk Support with the enhancement request!
Thanks It helped. 🙂
I did not include depends field inside row. Using this was causing my table to disappear. Hence, , I rather put it under panel:
<row>
<panel depends="$alwaysHideCSSPanel$">
<html>
<style>
table thead tr th,td{
font-size:150% !important;
width:150px !important;
border: 1px solid black !important;
text-align: right !important
}
table thead tr th{
font-weight: bold !important;
}
</style>
</html>
</panel>
<panel>
<table>....
...
</panel>
</row>
Thank you. It worked for me.
And, if I want to increase the font of table header as well? Then can it be done as follows?:
table tbody tr th{
font-size:150% !important;
}
@ggangwar, almost there... Following is what you should use.
table thead tr th{
font-size:150% !important;
}
My answer link attached above also tells you how to use Browser Inspector tool to find the CSS Selector for specific node to apply CSS Override. Do up vote if you find it useful!
Hi
I want to change font size label (to bold) in pie chart
please help me with code