in function _chart_adjust_resolution($chart_id, &$data, $max_value = NULL) counts $divider and $multiplier values, that rounds to 0.0 accuracy:
if ($max[$chart_id] > $resoluton){
$divider = round($max[$chart_id] / $resoluton, 1);
}
else {
$multiplier = round($resoluton / $max[$chart_id], 1);
}
But when I use different values, very often chart never got 100 and 99 values for maxumum data peaks!
I think we must remove rounding of $divider and $multiplier values.
If I change this code to
if ($max[$chart_id] > $resoluton){
$divider = $max[$chart_id] / $resoluton;
}
else {
$multiplier = $resoluton / $max[$chart_id];
}
my charts looks better and more precisely.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | chart-remove-rounding-868092-1.patch | 619 bytes | 13rac1 |
Comments
Comment #1
13rac1 commentedAgreed. Patch for 7.x-1.x-dev attached.
Comment #2
13rac1 commentedPatch applied to 7.x-1.x-dev. Needed in 6.x-1.x-dev.
Comment #3
13rac1 commentedApplied to 6.x-1.x.