mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Merge branch 'ent-1793-Etiquetas-de-las-graficas-con-decimales-2' into 'develop'
Modified round decimals to avoid round string values See merge request artica/pandorafms!1441
This commit is contained in:
commit
1cb423fcfe
@ -1554,6 +1554,9 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
|
|||||||
}
|
}
|
||||||
|
|
||||||
function round_with_decimals (value, multiplier = 1) {
|
function round_with_decimals (value, multiplier = 1) {
|
||||||
|
// Return non numeric types without modification
|
||||||
|
if (typeof(value) !== "number") return value;
|
||||||
|
|
||||||
if ((value * multiplier) == 0) return 0;
|
if ((value * multiplier) == 0) return 0;
|
||||||
if ((value * multiplier) >= 1) {
|
if ((value * multiplier) >= 1) {
|
||||||
return Math.round(value * multiplier) / multiplier;
|
return Math.round(value * multiplier) / multiplier;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user