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) {
|
||||
// Return non numeric types without modification
|
||||
if (typeof(value) !== "number") return value;
|
||||
|
||||
if ((value * multiplier) == 0) return 0;
|
||||
if ((value * multiplier) >= 1) {
|
||||
return Math.round(value * multiplier) / multiplier;
|
||||
|
|
Loading…
Reference in New Issue