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>
Insert after </query>
<done>
<set token="SystemCapacity">$result.SystemCapacity$</set>
</done>
Below is the highlighted line in yellow for which I want increase the font size.
Put it in a separate HTML panel (as I suggested earlier)
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>
You could put the result from the query in a token and use that in the paragraph.
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>
How have you set the SystemCapacity token?
This doesn't show how you are setting the token value. Is this perhaps why it isn't working?
@ITWhisperer Can you help to fix and give me some idea or any reference dashboard will be helpful for me to understand more.
Insert after </query>
<done>
<set token="SystemCapacity">$result.SystemCapacity$</set>
</done>
@ITWhisperer Thanks So much for your help !! Really appreciated
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.
@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>