diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-03 06:47:58 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-03 06:47:58 +0000 |
| commit | b9f71e665cbaa32ab8bbec01878e95067b81789b (patch) | |
| tree | 118be6e701fd15f1dc08eaab1ff5788fe8aef71d /frontends/php/include/classes/graph.inc.php | |
| parent | 3ac895b7cbd0773d788999849b4560fa6b6a4f3b (diff) | |
| download | zabbix-b9f71e665cbaa32ab8bbec01878e95067b81789b.tar.gz zabbix-b9f71e665cbaa32ab8bbec01878e95067b81789b.tar.xz zabbix-b9f71e665cbaa32ab8bbec01878e95067b81789b.zip | |
- added zero line for left y-axis (Artem)
- colors for left & right zero lines moved to predefined variables GRAPH_ZERO_LINE_COLOR_LEFT, GRAPH_ZERO_LINE_COLOR_RIGHT (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4416 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/graph.inc.php')
| -rw-r--r-- | frontends/php/include/classes/graph.inc.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/frontends/php/include/classes/graph.inc.php b/frontends/php/include/classes/graph.inc.php index 5723de5c..fd97fd7c 100644 --- a/frontends/php/include/classes/graph.inc.php +++ b/frontends/php/include/classes/graph.inc.php @@ -34,6 +34,9 @@ define("GRAPH_TYPE_NORMAL", 0); define("GRAPH_TYPE_STACKED", 1); define("GRAPH_STACKED_ALFA", 15); //0..100 + + define("GRAPH_ZERO_LINE_COLOR_LEFT", 'AAAAAA'); + define("GRAPH_ZERO_LINE_COLOR_RIGHT", '888888'); define('ZBX_MAX_TREND_DIFF', 3600); @@ -1224,13 +1227,16 @@ $str = str_pad(convert_units($this->sizeY*$i/6*($maxY-$minY)/$this->sizeY+$minY,$units),10," ", STR_PAD_LEFT); ImageString($this->im, 1, 5, $this->sizeY-$this->sizeY*$i/6-4+$this->shiftY, $str, $this->GetColor("Dark Red No Alpha")); } -/* imageline($this->im, - $this->shiftXleft, - $this->zero[GRAPH_YAXIS_SIDE_LEFT], - $this->shiftXleft+$this->sizeX, - $this->zero[GRAPH_YAXIS_SIDE_LEFT], - $this->GetColor('Red') - );//*/ + if(($this->zero[GRAPH_YAXIS_SIDE_LEFT] != $this->sizeY+$this->shiftY) && + ($this->zero[GRAPH_YAXIS_SIDE_LEFT] != $this->shiftY)){ + imageline($this->im, + $this->shiftXleft, + $this->zero[GRAPH_YAXIS_SIDE_LEFT], + $this->shiftXleft+$this->sizeX, + $this->zero[GRAPH_YAXIS_SIDE_LEFT], + $this->GetColor(GRAPH_ZERO_LINE_COLOR_LEFT) + ); //*/ + } } } @@ -1259,7 +1265,7 @@ $this->zero[GRAPH_YAXIS_SIDE_RIGHT], $this->shiftXleft+$this->sizeX, $this->zero[GRAPH_YAXIS_SIDE_RIGHT], - $this->GetColor('AAAAAA') + $this->GetColor(GRAPH_ZERO_LINE_COLOR_RIGHT) ); //*/ } } |
