Merge branch 'ent-4311-Fallos_en_graficas_al_descargar_informes' into 'develop'

fixed error in pdf

See merge request artica/pandorafms!2585
This commit is contained in:
Daniel Rodriguez 2019-07-15 16:53:07 +02:00
commit 791d8f512a
2 changed files with 6 additions and 4 deletions

View File

@ -2161,7 +2161,7 @@ function graphic_combined_module(
$graph_values = $temp; $graph_values = $temp;
if (!$params['vconsole']) { if (!$params['vconsole']) {
$width = 1024; $width = $width;
$height = 500; $height = 500;
} }

View File

@ -2791,14 +2791,16 @@ function pandoraFlotArea(
if (short_data) { if (short_data) {
formatted = number_format(v, force_integer, "", short_data); formatted = number_format(v, force_integer, "", short_data);
} else { } else {
// It is an integer // It is an integer.
if (v - Math.floor(v) == 0) { if (v - Math.floor(v) == 0) {
formatted = number_format(v, force_integer, "", 2); formatted = number_format(v, force_integer, "", 2);
} }
} }
// Get only two decimals // Get only two decimals.
formatted = round_with_decimals(formatted, 100); if (typeof formatted != "string") {
formatted = Math.round(formatted * 100) / 100;
}
return formatted; return formatted;
} }