From af0ff51997b7d90d9478964dbfe15eddf5661c82 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 8 Feb 2015 05:55:08 +0000 Subject: [PATCH] adjusted the bar graph width when spacing is disabled --- codepot/src/codepot/controllers/code.php | 2 +- codepot/src/codepot/libraries/phpgraphlib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index a8b3100a..9dbdc1d0 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -857,7 +857,7 @@ class Code extends Controller // fill the holes $stats[$date] = 0; } - + $month++; $total_months++; } diff --git a/codepot/src/codepot/libraries/phpgraphlib.php b/codepot/src/codepot/libraries/phpgraphlib.php index d7dd18b8..70aee388 100644 --- a/codepot/src/codepot/libraries/phpgraphlib.php +++ b/codepot/src/codepot/libraries/phpgraphlib.php @@ -303,7 +303,7 @@ class PHPGraphLib { } else { - $unit_width = ($this->width - $this->y_axis_margin - $this->right_margin) / (($this->data_count * 2)); + $unit_width = ($this->width - $this->y_axis_margin - $this->right_margin) / (($this->data_count * 2) + 1); } if ($unit_width < 1 && !$this->bool_ignore_data_fit_errors) {