The good news - negative numbers are now supported.
The bad news - default graphs don't seem to like them, as the graph y-axis ignores negative numbers, making them much less useful.
Any suggestions on where to look to make the graphs use a meaningful set of default values for the y axis.
***UPDATE***
It's the functions calculateMinY and calculateMaxY in graph.inc.php, but my math is weak, the code is not commented, and there is a lot of mantissa and exponent manipulation. A patch here would be very helpful!
***********
Also, in the code, chart3.php, lines 46 and 47 are duplicates, one should be removed (yaxismax is duplicated).
The bad news - default graphs don't seem to like them, as the graph y-axis ignores negative numbers, making them much less useful.
Any suggestions on where to look to make the graphs use a meaningful set of default values for the y axis.
***UPDATE***
It's the functions calculateMinY and calculateMaxY in graph.inc.php, but my math is weak, the code is not commented, and there is a lot of mantissa and exponent manipulation. A patch here would be very helpful!
***********
Also, in the code, chart3.php, lines 46 and 47 are duplicates, one should be removed (yaxismax is duplicated).
Code:
$fields=array(
"period"=> array(T_ZBX_INT, O_OPT, P_NZERO, BETWEEN(ZBX_MIN_PERIOD,ZBX_MAX_PERIOD), null),
"from"=> array(T_ZBX_INT, O_OPT, P_NZERO, null, null),
"stime"=> array(T_ZBX_INT, O_OPT, P_NZERO, null, null),
"border"=> array(T_ZBX_INT, O_OPT, P_NZERO, IN('0,1'), null),
"name"=> array(T_ZBX_STR, O_OPT, NULL, null, null),
"width"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535), null),
"height"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535), null),
"yaxistype"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,1"), null),
"graphtype"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,1"), null),
"yaxismin"=> array(T_ZBX_DBL, O_OPT, NULL, BETWEEN(-65535,65535), null),
"yaxismax"=> array(T_ZBX_DBL, O_OPT, NULL, null, null),
"yaxismax"=> array(T_ZBX_DBL, O_OPT, NULL, null, null),
"items"=> array(T_ZBX_STR, O_OPT, NULL, null, null)
);
Comment