Using formatting on Avg. Metric


(Shubham Mahajan) #1

Hi Team,
Is there a way to format the avg. value shown in figure to 1 decimal point or no decimal point using script or something?? here i am using gauge visualization and Average metric of value field in doc. But i want to format the value after doing the average. All the values in document is Integer only. Please help!!


(Tim Sullivan) #2

Yes, there is a way to do this.

Go into the "Options" tab for your average metric, look for "Data formatter" and choose "Custom." Put in a formatting string of 0,0. This will round the values that are displayed to whole numbers.

Default formatting, 0,0.[000]

Custom formatting, 0,0

For more formatting options, take a look at: http://numeraljs.com/#format


(Shubham Mahajan) #3

@tsullivan Thanks for the reply, Tim. But i was looking this feature in the Gauge visualization not in TSVB..Is there a way to do this in that??


(Tim Sullivan) #4

Sorry, when you said "Gauge visualization," I thought you mean the one that is part of TSVB. I think the gauge plugin you're referring to is a 3rd party plugin https://github.com/sbeyn/kibana-plugin-gauge-sg. Someone from the user community might be able to help, or you could try asking the author of that plugin.


(Shubham Mahajan) #5

Hi @sbeyn, do u know if this formatting kind can be done in Gauge Visualization???


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.