Dashboards & Visualizations

Editing number precision in the source dashboard editor-Why is my precision option not persisting but other options are?

MDSplunkNinja
Explorer

Hello,

I have a dashboard which has one panel displaying a statistics table.  The table is very wide (~300 numeric columns) which makes manually editing the number precision for each column prohibitive in the UI.  I attempted to do this in the source editor but the number precision I input does not translate to the table in the panel after saving.

Here is a sample block of code I am inserting:

 

<format type="number" field="xxxxx_percent">
<option name="precision">0.000</option>
<option name="unit">%</option>
<option name="unitPosition">after</option>
</format>

 

and the result looks like this:

MDSplunkNinja_0-1660935189351.png

Anyone know why my precision option is not persisting but the other options are?

Thank you in advance!

-MD

Labels (4)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The precision option expects an integer specifying the number of decimal places to display.  Entering "0.000" means show no decimals.  Try

<option name="precision">3</option>

See https://docs.splunk.com/Documentation/Splunk/9.0.1/Viz/TableFormatsXML#Number_format_rules for more information.

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

MDSplunkNinja
Explorer

This makes total sense.  It is a little misleading however between the UI format option which gives options like 0, 0.0, 0.00, 0.000, 0.0000, and the Source format which requires an integer which when having zero decimal precision is the same setting in both..."0".  An enhancement for the UI to align with the Source editing would probably be a good idea.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You're not wrong.  Go to https://ideas.splunk.com to make your suggestion.

---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The precision option expects an integer specifying the number of decimal places to display.  Entering "0.000" means show no decimals.  Try

<option name="precision">3</option>

See https://docs.splunk.com/Documentation/Splunk/9.0.1/Viz/TableFormatsXML#Number_format_rules for more information.

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...