From 3aa935a6d59f4d0fc4ef658823bf774af2322204 Mon Sep 17 00:00:00 2001 From: laserrapt0r <68563050+laserrapt0r@users.noreply.github.com> Date: Sat, 23 Apr 2022 13:47:00 +0200 Subject: [PATCH] Update graph-php.class.php ticks were calculated by x values, not y. --- graph-php.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph-php.class.php b/graph-php.class.php index e9bebc1..b3606a0 100644 --- a/graph-php.class.php +++ b/graph-php.class.php @@ -2193,7 +2193,7 @@ private function gd_draw_values_y( ){ $global_min_y = ( isset($this->cfg['global_force_min_y'])?$this->cfg['global_force_min_y']:$this->cfg['global_min_y']); $global_max_y = ( isset($this->cfg['global_force_max_y'])?$this->cfg['global_force_max_y']:$this->cfg['global_max_y']); - $arr_short_values = $this->long_2_short_arrays( $this->transform_x_values([$global_min_y, $global_max_y ]) ); + $arr_short_values = $this->long_2_short_arrays( $this->transform_y_values([$global_min_y, $global_max_y ]) ); rsort( $arr_short_values ); $count_short_values = count( $arr_short_values ); $pixels_available = $this->cfg['pix_height'] - $this->cfg['pix_paddingtop'] - 1 - $this->cfg['pix_paddingbottom'] - 1 - $this->cfg['pix_paddinginsidetop'] - $this->cfg['pix_paddinginsidebottom']; @@ -2639,4 +2639,4 @@ public function compute_offset( $arrval, $accommodate_to_x_samples = 0 ){ return $tableval; } // /compute_offset() }// /graph - ?> \ No newline at end of file + ?>