@@ -19,6 +19,10 @@ |
||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | // Stroke the axis. |
| 22 | + |
|
| 23 | + /** |
|
| 24 | + * @param LinearScale $aOtherAxisScale |
|
| 25 | + */ |
|
| 22 | 26 | public function Stroke($aOtherAxisScale, $aStrokeLabels = true) |
| 23 | 27 | { |
| 24 | 28 | if ($this->hide) { |
@@ -84,6 +84,9 @@ discard block |
||
| 84 | 84 | $this->scale->ticks->SetFormatCallback($aFuncName); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $aHAlign |
|
| 89 | + */ |
|
| 87 | 90 | public function SetLabelAlign($aHAlign, $aVAlign = 'top', $aParagraphAlign = 'left') |
| 88 | 91 | { |
| 89 | 92 | $this->label_halign = $aHAlign; |
@@ -188,6 +191,10 @@ discard block |
||
| 188 | 191 | } |
| 189 | 192 | |
| 190 | 193 | // Which side of the axis should the axis title be? |
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * @param integer $aSideOfAxis |
|
| 197 | + */ |
|
| 191 | 198 | public function SetTitleSide($aSideOfAxis) |
| 192 | 199 | { |
| 193 | 200 | $this->title_side = $aSideOfAxis; |
@@ -233,6 +240,9 @@ discard block |
||
| 233 | 240 | $this->label_step = $aStep; |
| 234 | 241 | } |
| 235 | 242 | |
| 243 | + /** |
|
| 244 | + * @param integer $aSidePos |
|
| 245 | + */ |
|
| 236 | 246 | public function SetLabelSide($aSidePos) |
| 237 | 247 | { |
| 238 | 248 | $this->labelPos = $aSidePos; |
@@ -231,6 +231,9 @@ |
||
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | + /** |
|
| 235 | + * @param \Amenadiel\JpGraph\Image\RotImage $aImg |
|
| 236 | + */ |
|
| 234 | 237 | public function GetWidth($aImg) |
| 235 | 238 | { |
| 236 | 239 | $txt = new TextProperty(); |
@@ -47,6 +47,10 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | //--------------- |
| 49 | 49 | // CONSTRUCTOR |
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * @param \Amenadiel\JpGraph\Image\RotImage $aImg |
|
| 53 | + */ |
|
| 50 | 54 | public function __construct($aImg) |
| 51 | 55 | { |
| 52 | 56 | $this->iImg = $aImg; |
@@ -153,6 +157,10 @@ discard block |
||
| 153 | 157 | // Specify the width of the titles(labels) for the activities |
| 154 | 158 | // (This is by default set to the minimum width enought for the |
| 155 | 159 | // widest title) |
| 160 | + |
|
| 161 | + /** |
|
| 162 | + * @param integer $aLabelWidth |
|
| 163 | + */ |
|
| 156 | 164 | public function SetLabelWidth($aLabelWidth) |
| 157 | 165 | { |
| 158 | 166 | $this->iLabelWidth = $aLabelWidth; |
@@ -324,6 +332,10 @@ discard block |
||
| 324 | 332 | } |
| 325 | 333 | |
| 326 | 334 | // Get week number |
| 335 | + |
|
| 336 | + /** |
|
| 337 | + * @param integer $aDate |
|
| 338 | + */ |
|
| 327 | 339 | public function GetWeekNbr($aDate, $aSunStart = true) |
| 328 | 340 | { |
| 329 | 341 | // We can't use the internal strftime() since it gets the weeknumber |
@@ -377,6 +389,10 @@ discard block |
||
| 377 | 389 | } |
| 378 | 390 | |
| 379 | 391 | // Get current year |
| 392 | + |
|
| 393 | + /** |
|
| 394 | + * @param integer $aDate |
|
| 395 | + */ |
|
| 380 | 396 | public function GetYear($aDate) |
| 381 | 397 | { |
| 382 | 398 | return 0 + Date("Y", $aDate); |
@@ -395,18 +411,30 @@ discard block |
||
| 395 | 411 | } |
| 396 | 412 | |
| 397 | 413 | // Get day in month |
| 414 | + |
|
| 415 | + /** |
|
| 416 | + * @param integer $aDate |
|
| 417 | + */ |
|
| 398 | 418 | public function GetMonthDayNbr($aDate) |
| 399 | 419 | { |
| 400 | 420 | return 0 + strftime("%d", $aDate); |
| 401 | 421 | } |
| 402 | 422 | |
| 403 | 423 | // Get day in year |
| 424 | + |
|
| 425 | + /** |
|
| 426 | + * @param integer $aDate |
|
| 427 | + */ |
|
| 404 | 428 | public function GetYearDayNbr($aDate) |
| 405 | 429 | { |
| 406 | 430 | return 0 + strftime("%j", $aDate); |
| 407 | 431 | } |
| 408 | 432 | |
| 409 | 433 | // Get month number |
| 434 | + |
|
| 435 | + /** |
|
| 436 | + * @param integer $aDate |
|
| 437 | + */ |
|
| 410 | 438 | public function GetMonthNbr($aDate) |
| 411 | 439 | { |
| 412 | 440 | return 0 + strftime("%m", $aDate); |
@@ -495,6 +523,9 @@ discard block |
||
| 495 | 523 | |
| 496 | 524 | // Convert a time string to minutes |
| 497 | 525 | |
| 526 | + /** |
|
| 527 | + * @param integer $aTimeString |
|
| 528 | + */ |
|
| 498 | 529 | public function TimeToMinutes($aTimeString) |
| 499 | 530 | { |
| 500 | 531 | // Split in hours and minutes |
@@ -995,6 +1026,10 @@ discard block |
||
| 995 | 1026 | } |
| 996 | 1027 | |
| 997 | 1028 | // Stroke year scale and gridlines |
| 1029 | + |
|
| 1030 | + /** |
|
| 1031 | + * @param integer $aYCoord |
|
| 1032 | + */ |
|
| 998 | 1033 | public function StrokeYears($aYCoord, $getHeight = false) |
| 999 | 1034 | { |
| 1000 | 1035 | if ($this->year->iShowLabels) { |
@@ -237,6 +237,9 @@ discard block |
||
| 237 | 237 | $this->margin_color = [250, 250, 250]; |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | + /** |
|
| 241 | + * @param string $aFilename |
|
| 242 | + */ |
|
| 240 | 243 | public function SetupCache($aFilename, $aTimeout = 60) |
| 241 | 244 | { |
| 242 | 245 | $this->cache_name = $aFilename; |
@@ -284,6 +287,10 @@ discard block |
||
| 284 | 287 | } |
| 285 | 288 | |
| 286 | 289 | // Should the grid be in front or back of the plot? |
| 290 | + |
|
| 291 | + /** |
|
| 292 | + * @param integer $aDepth |
|
| 293 | + */ |
|
| 287 | 294 | public function SetGridDepth($aDepth) |
| 288 | 295 | { |
| 289 | 296 | $this->grid_depth = $aDepth; |
@@ -295,6 +302,10 @@ discard block |
||
| 295 | 302 | } |
| 296 | 303 | |
| 297 | 304 | // Specify graph angle 0-360 degrees. |
| 305 | + |
|
| 306 | + /** |
|
| 307 | + * @param integer $aAngle |
|
| 308 | + */ |
|
| 298 | 309 | public function SetAngle($aAngle) |
| 299 | 310 | { |
| 300 | 311 | $this->img->SetAngle($aAngle); |
@@ -775,6 +786,10 @@ discard block |
||
| 775 | 786 | // Specify density of ticks when autoscaling 'normal', 'dense', 'sparse', 'verysparse' |
| 776 | 787 | // The dividing factor have been determined heuristically according to my aesthetic |
| 777 | 788 | // sense (or lack off) y.m.m.v ! |
| 789 | + |
|
| 790 | + /** |
|
| 791 | + * @param integer $aYDensity |
|
| 792 | + */ |
|
| 778 | 793 | public function SetTickDensity($aYDensity = TICKD_NORMAL, $aXDensity = TICKD_NORMAL) |
| 779 | 794 | { |
| 780 | 795 | $this->xtick_factor = 30; |
@@ -875,6 +890,10 @@ discard block |
||
| 875 | 890 | } |
| 876 | 891 | |
| 877 | 892 | // Get a complete <MAP>..</MAP> tag for the final image map |
| 893 | + |
|
| 894 | + /** |
|
| 895 | + * @param string $aMapName |
|
| 896 | + */ |
|
| 878 | 897 | public function GetHTMLImageMap($aMapName) |
| 879 | 898 | { |
| 880 | 899 | $im = "<map name=\"$aMapName\" id=\"$aMapName\" >\n"; |
@@ -1050,6 +1069,9 @@ discard block |
||
| 1050 | 1069 | } |
| 1051 | 1070 | } |
| 1052 | 1071 | |
| 1072 | + /** |
|
| 1073 | + * @param string $aCSIMName |
|
| 1074 | + */ |
|
| 1053 | 1075 | public function GetCSIMImgHTML($aCSIMName, $aScriptName = 'auto', $aBorder = 0) |
| 1054 | 1076 | { |
| 1055 | 1077 | if ($aScriptName == 'auto') { |
@@ -1551,6 +1573,10 @@ discard block |
||
| 1551 | 1573 | } |
| 1552 | 1574 | } |
| 1553 | 1575 | |
| 1576 | + /** |
|
| 1577 | + * @param integer $aDepth |
|
| 1578 | + * @param boolean $aCSIM |
|
| 1579 | + */ |
|
| 1554 | 1580 | public function StrokeBands($aDepth, $aCSIM) |
| 1555 | 1581 | { |
| 1556 | 1582 | // Stroke bands |
@@ -217,6 +217,9 @@ |
||
| 217 | 217 | return (boolean) (count($this->txtcol)); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | + /** |
|
| 221 | + * @param \Amenadiel\JpGraph\Image\RotImage $aImg |
|
| 222 | + */ |
|
| 220 | 223 | public function Stroke($aImg) |
| 221 | 224 | { |
| 222 | 225 | // Constant |
@@ -259,6 +259,10 @@ discard block |
||
| 259 | 259 | |
| 260 | 260 | // Calculate autoscale. Used if user hasn't given a scale and ticks |
| 261 | 261 | // $maxsteps is the maximum number of major tickmarks allowed. |
| 262 | + |
|
| 263 | + /** |
|
| 264 | + * @param \Amenadiel\JpGraph\Image\RotImage $img |
|
| 265 | + */ |
|
| 262 | 266 | public function AutoScale($img, $min, $max, $maxsteps, $majend = true) |
| 263 | 267 | { |
| 264 | 268 | if (!is_numeric($min) || !is_numeric($max)) { |
@@ -422,6 +426,12 @@ discard block |
||
| 422 | 426 | // [$numsteps,$adjmin,$adjmax,$minstep,$majstep] |
| 423 | 427 | // If $majend==true then the first and last marks on the axis will be major |
| 424 | 428 | // labeled tick marks otherwise it will be adjusted to the closest min tick mark |
| 429 | + |
|
| 430 | + /** |
|
| 431 | + * @param double $min |
|
| 432 | + * @param integer $a |
|
| 433 | + * @param integer $b |
|
| 434 | + */ |
|
| 425 | 435 | public function CalcTicks($maxsteps, $min, $max, $a, $b, $majend = true) |
| 426 | 436 | { |
| 427 | 437 | $diff = $max - $min; |
@@ -465,6 +475,11 @@ discard block |
||
| 465 | 475 | return array($numsteps, $adjmin, $adjmax, $minstep, $majstep); |
| 466 | 476 | } |
| 467 | 477 | |
| 478 | + /** |
|
| 479 | + * @param double $min |
|
| 480 | + * @param integer $a |
|
| 481 | + * @param integer $b |
|
| 482 | + */ |
|
| 468 | 483 | public function CalcTicksFreeze($maxsteps, $min, $max, $a, $b) |
| 469 | 484 | { |
| 470 | 485 | // Same as CalcTicks but don't adjust min/max values |
@@ -489,6 +504,12 @@ discard block |
||
| 489 | 504 | return array($numsteps, $minstep, $majstep); |
| 490 | 505 | } |
| 491 | 506 | |
| 507 | + /** |
|
| 508 | + * @param double $maxsteps |
|
| 509 | + * @param double $min |
|
| 510 | + * @param double $max |
|
| 511 | + * @param integer $a |
|
| 512 | + */ |
|
| 492 | 513 | public function IntCalcTicks($maxsteps, $min, $max, $a, $majend = true) |
| 493 | 514 | { |
| 494 | 515 | $diff = $max - $min; |
@@ -534,6 +555,12 @@ discard block |
||
| 534 | 555 | return array($numsteps, $adjmin, $adjmax, $majstep); |
| 535 | 556 | } |
| 536 | 557 | |
| 558 | + /** |
|
| 559 | + * @param double $maxsteps |
|
| 560 | + * @param double $min |
|
| 561 | + * @param double $max |
|
| 562 | + * @param integer $a |
|
| 563 | + */ |
|
| 537 | 564 | public function IntCalcTicksFreeze($maxsteps, $min, $max, $a) |
| 538 | 565 | { |
| 539 | 566 | // Same as IntCalcTick but don't change min/max values |
@@ -563,6 +590,10 @@ discard block |
||
| 563 | 590 | } |
| 564 | 591 | |
| 565 | 592 | // Determine the minimum of three values witha weight for last value |
| 593 | + |
|
| 594 | + /** |
|
| 595 | + * @param double $weight |
|
| 596 | + */ |
|
| 566 | 597 | public function MatchMin3($a, $b, $c, $weight) |
| 567 | 598 | { |
| 568 | 599 | if ($a < $b) { |
@@ -25,6 +25,9 @@ |
||
| 25 | 25 | return true; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param integer $aType |
|
| 30 | + */ |
|
| 28 | 31 | public function SetLabelLogType($aType) |
| 29 | 32 | { |
| 30 | 33 | $this->label_logtype = $aType; |
@@ -200,6 +200,10 @@ discard block |
||
| 200 | 200 | $this->_gdImgHandle($aGraph->Stroke(_IMG_HANDLER), $x, $y, $fx = 0, $fy = 0, $w, $h); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | + /** |
|
| 204 | + * @param integer $x |
|
| 205 | + * @param integer $y |
|
| 206 | + */ |
|
| 203 | 207 | public function _gdImgHandle($agdCanvas, $x, $y, $fx = 0, $fy = 0, $w = 0, $h = 0, $mix = 100) |
| 204 | 208 | { |
| 205 | 209 | if ($w == 0) { |
@@ -245,6 +249,9 @@ discard block |
||
| 245 | 249 | $this->footer->iRightMargin += $aShadowWidth; |
| 246 | 250 | } |
| 247 | 251 | |
| 252 | + /** |
|
| 253 | + * @param Image\Image $image |
|
| 254 | + */ |
|
| 248 | 255 | public function StrokeTitle($image, $w, $h) |
| 249 | 256 | { |
| 250 | 257 | // Stroke title |