Merge branch '1177-Graficas_con_valores_negativos_rev2' into 'develop'
fixed error values negatives in reports pdf See merge request !769
This commit is contained in:
commit
601db73596
|
@ -961,7 +961,17 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
||||||
|
|
||||||
$chart_size = ($digits_left * $font_size) + 20;
|
$chart_size = ($digits_left * $font_size) + 20;
|
||||||
|
|
||||||
$max_data = max(max($data));
|
$min_data = 0;
|
||||||
|
$max_data = 0;
|
||||||
|
foreach ($data as $k => $v) {
|
||||||
|
if(min($v) < $min_data){
|
||||||
|
$min_data = min($v);
|
||||||
|
}
|
||||||
|
if(max($v) > $max_data){
|
||||||
|
$max_data = max($v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$default_chart_size = 40;
|
$default_chart_size = 40;
|
||||||
$rest_chars = strlen($max_data) - 6;
|
$rest_chars = strlen($max_data) - 6;
|
||||||
|
@ -982,7 +992,6 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
||||||
|
|
||||||
/*Get minimun value to draw axis properly*/
|
/*Get minimun value to draw axis properly*/
|
||||||
|
|
||||||
$min_data = min(min($data));
|
|
||||||
$ManualScale = array();
|
$ManualScale = array();
|
||||||
$mode = SCALE_MODE_START0;
|
$mode = SCALE_MODE_START0;
|
||||||
if ($min_data < 0) {
|
if ($min_data < 0) {
|
||||||
|
|
Loading…
Reference in New Issue