Merge branch '1908-No-se-muestran-correctamente-las-gráficas-con-decimales-dev' into 'develop'

Fixed shorten axis units

See merge request artica/pandorafms!1359
This commit is contained in:
vgilc 2018-03-09 12:22:27 +01:00
commit df6370ac4b
1 changed files with 6 additions and 1 deletions

View File

@ -1928,7 +1928,12 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
var formatted = number_format(v, force_integer, "", short_data);
}
else {
var formatted = v;
// It is an integer
if(v - Math.floor(v) == 0){
var formatted = number_format(v, force_integer, "", 2);
} else {
var formatted = v;
}
}
return '<div class='+font+' style="font-size:'+font_size+'pt;">'+formatted+'</div>';