mirror of
https://github.com/home-assistant/frontend.git
synced 2026-05-21 23:48:58 +01:00
Add UOM to stats chart, fix coloring of bands (#9665)
This commit is contained in:
@@ -78,7 +78,10 @@ const getDefaultFormatOptions = (
|
||||
num: string | number,
|
||||
options?: Intl.NumberFormatOptions
|
||||
): Intl.NumberFormatOptions => {
|
||||
const defaultOptions: Intl.NumberFormatOptions = options || {};
|
||||
const defaultOptions: Intl.NumberFormatOptions = {
|
||||
maximumFractionDigits: 2,
|
||||
...options,
|
||||
};
|
||||
|
||||
if (typeof num !== "string") {
|
||||
return defaultOptions;
|
||||
|
||||
Reference in New Issue
Block a user