Changeset 7655 for trunk/phpgwapi/inc/class.gdgraph.inc.php
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.gdgraph.inc.php
r2 r7655 119 119 // Draw dashed lines for x axis 120 120 $linespace = ($this->graph_width - $this->margin_left - $this->margin_right) / ($this->num_lines_x - 1); 121 for ($i = 1; $i < $this->num_lines_x; $i++)121 for ($i = 1; $i < $this->num_lines_x; ++$i) 122 122 { 123 123 $x = $i * $linespace + $this->margin_left; … … 130 130 // Draw dashed lines for y axis 131 131 $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 132 for ($i = 1; $i < $this->num_lines_y; $i++)132 for ($i = 1; $i < $this->num_lines_y; ++$i) 133 133 { 134 134 $y = $this->graph_height - $this->margin_bottom - ($i * $linespace); … … 174 174 $this->img->MoveTo($i * $linespace + $this->margin_left, $this->graph_height - $this->margin_bottom + 8); 175 175 $this->img->DrawText(array('text' => $text['date_formatted'])); 176 $i++;176 ++$i; 177 177 } 178 178 … … 223 223 } 224 224 225 for($y=0;$y<$largest; $y++)225 for($y=0;$y<$largest;++$y) 226 226 { 227 227 if($line['sdate'] == $this->line_captions_x[$y]['date']) … … 249 249 elseif($line['edate'] <= $this->line_captions_x[$largest]['date'] && $line['edate'] >= $this->line_captions_x[0]['date']) 250 250 { 251 for($y=0;$y<$largest; $y++)251 for($y=0;$y<$largest;++$y) 252 252 { 253 253 if($line['edate'] == $this->line_captions_x[$y]['date']) … … 262 262 } 263 263 264 for ($w = -3; $w < 4; $w++)264 for ($w = -3; $w < 4; ++$w) 265 265 { 266 266 $this->img->Line(1+$x1,$y1+$w,$x2,$y2+$w); 267 267 } 268 $color_index++;269 $i++;268 ++$color_index; 269 ++$i; 270 270 } 271 271 // Draw the y axis text … … 274 274 $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 275 275 $space = 1; 276 for ($i = 0;$i<count($this->data); $i++)276 for ($i = 0;$i<count($this->data);++$i) 277 277 { 278 278 $y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7; 279 279 $this->img->MoveTo($this->margin_left - 6, $y); 280 280 $this->img->DrawText(array('text' => $this->data[$i]['title'],'justification' => 'right','margin_left' => $this->margin_left)); 281 $space++;281 ++$space; 282 282 } 283 283
Note: See TracChangeset
for help on using the changeset viewer.