mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fix gauge pdf reports
This commit is contained in:
parent
37c5acf4d1
commit
603b4e71eb
@ -1169,7 +1169,7 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
|
|||||||
maxinum,
|
maxinum,
|
||||||
valor;
|
valor;
|
||||||
|
|
||||||
for (key in data) {
|
for (var key in data) {
|
||||||
nombre = data[key].gauge;
|
nombre = data[key].gauge;
|
||||||
|
|
||||||
label = data[key].label;
|
label = data[key].label;
|
||||||
@ -1189,8 +1189,8 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
|
|||||||
mininum = round_with_decimals(parseFloat(data[key].min));
|
mininum = round_with_decimals(parseFloat(data[key].min));
|
||||||
maxinum = round_with_decimals(parseFloat(data[key].max));
|
maxinum = round_with_decimals(parseFloat(data[key].max));
|
||||||
|
|
||||||
critical_inverse = parseInt(data[key].critical_inverse);
|
var critical_inverse = parseInt(data[key].critical_inverse);
|
||||||
warning_inverse = parseInt(data[key].warning_inverse);
|
var warning_inverse = parseInt(data[key].warning_inverse);
|
||||||
|
|
||||||
valor = round_with_decimals(data[key].value);
|
valor = round_with_decimals(data[key].value);
|
||||||
|
|
||||||
|
@ -1763,7 +1763,7 @@ function round_with_decimals(value, multiplier) {
|
|||||||
if (typeof multiplier === "undefined") multiplier = 1;
|
if (typeof multiplier === "undefined") multiplier = 1;
|
||||||
|
|
||||||
// Return non numeric types without modification
|
// Return non numeric types without modification
|
||||||
if (typeof value !== "number" || Number.isNaN(value)) {
|
if (typeof value !== "number" || isNaN(value)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user