Skip to content

Add configurable decimal option to single stat widget

Sam Kerr requested to merge stkerr-use-two-decimals-default-single-stat into master

What does this MR do and why?

This MR adds a new option for single stat widgets to be used on the Product Analytics dashboards.

If the decimalPlaces value is specified in the visualization YML file, the single stat widget will use that as the value for animate-decimal-places. If not provided, it will default to 0 decimal places (so whole numbers).

Addresses #387532 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Dashboard with various decimal places: image

One decimal place specified:

image

Two decimal places specified:

image

0 decimal places specified if nothing specified:

image

Five decimal places specified:

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sam Kerr

Merge request reports

Loading