Dashboards & Visualizations

How to change font size?

uagraw01
Builder

Hello Splunkers!!

As per the below mentioned code, I want to change the font size of the text which is created through eval ( | eval text= "The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".SystemCapacity/2 ." dual cycles per hour.") . Please guide me how I can change the size of the font?

======================================================

<single>
<search>
<query>| makeresults
| eval SystemCapacity=$HighbayCapacity$*2
| eval text= "The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".SystemCapacity/2 ." dual cycles per hour."
| fields text</query>
<earliest>$time_input.earliest$</earliest>
<latest>$time_input.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">0</option>
<option name="underLabel">Note that due to this, the performance might increase when a higher workload is present.</option>
</single>

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Insert after </query>

<done>
  <set token="SystemCapacity">$result.SystemCapacity$</set>
</done>

View solution in original post

uagraw01
Builder

Below is the highlighted line in yellow for which I want increase the font size.

 

uagraw01_0-1678203355907.png

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Put it in a separate HTML panel (as I suggested earlier)

0 Karma

uagraw01
Builder

@ITWhisperer 

I have used the same approach as you suggested but ".SystemCapacity/2 ." ( calling from query) is not working under paragraph. The result should be SystemCapacity/2

<html>
<body><p>"The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".SystemCapacity/2 ." dual cycles per hour."</p></body>
</html>
<single>
<search>
<query>| makeresults
| eval SystemCapacity=$HighbayCapacity$*2

<!--| eval text= "The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".SystemCapacity/2 ." dual cycles per hour."
| fields text-->

</query>
<earliest>$time_input.earliest$</earliest>
<latest>$time_input.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">0</option>
<option name="underLabel">Note that due to this, the performance might increase when a higher workload is present.</option>
</single>

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could put the result from the query in a token and use that in the paragraph.

0 Karma

uagraw01
Builder

@ITWhisperer 

I have tried this ".$SystemCapacity$/2 ." But no luck found.

<html>
<body><p>"The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".$SystemCapacity$/2 ." dual cycles per hour."</p></body>
</html>

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

How have you set the SystemCapacity token?

0 Karma

uagraw01
Builder

@ITWhisperer From this query result 

 

<query>| makeresults
| eval SystemCapacity=$HighbayCapacity$*2

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

This doesn't show how you are setting the token value. Is this perhaps why it isn't working?

0 Karma

uagraw01
Builder

@ITWhisperer Can you help to fix and give me some idea or any reference dashboard will be helpful for me to understand more.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Insert after </query>

<done>
  <set token="SystemCapacity">$result.SystemCapacity$</set>
</done>

uagraw01
Builder

@ITWhisperer Thanks So much for your help !! Really appreciated 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you considered adding an HTML panel with the explanation text in it rather than including in the single?

The single is probably reducing the size of the text to fit into the graphic, rather than the text expanding the graphic to include the text.

0 Karma

uagraw01
Builder

@ITWhisperer  It tried the below one. But it is not working. Please make me correct on this part.

 

<html>
<style type="text/css">
element.style {
letter-spacing: normal;
font-size: 11.7158px;
font-weight: bold;
fill: rgb(51, 51, 51);
opacity: 1;
}
</style>
</html>
<single>
<search>
<query>| makeresults
| eval SystemCapacity=$HighbayCapacity$*2
| eval text= "The performance is determined by the number of completed orders divided by the time there is an active order. This is compared to the system capacity of ".SystemCapacity/2 ." dual cycles per hour."
| fields text</query>
<earliest>$time_input.earliest$</earliest>
<latest>$time_input.latest$</latest>
</search>
<option name="drilldown">none</option>
<option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">0</option>
<option name="underLabel">Note that due to this, the performance might increase when a higher workload is present.</option>
</single>

 

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...