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:
vgilc 2018-04-20 08:26:36 +02:00
commit 1cb423fcfe
1 changed files with 3 additions and 0 deletions

View File

@ -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;