コード例 #1
0
 static function GetTicksFromMinMax($aMin, $aMax, $aType, $aMinor = false, $aEndPoints = false)
 {
     self::$starthour = date('G', $aMin);
     self::$startmonth = date('n', $aMin);
     self::$startday = date('j', $aMin);
     self::$startyear = date('Y', $aMin);
     self::$endmonth = date('n', $aMax);
     self::$endyear = date('Y', $aMax);
     self::$endday = date('j', $aMax);
     self::$iMin = $aMin;
     self::$iMax = $aMax;
     if ($aType <= DSUTILS_MONTH6) {
         self::doMonthly($aType, $aMinor);
     } elseif ($aType <= DSUTILS_WEEK4) {
         self::doWeekly($aType, $aMinor);
     } elseif ($aType <= DSUTILS_DAY4) {
         self::doDaily($aType, $aMinor);
     } elseif ($aType <= DSUTILS_YEAR5) {
         self::doYearly($aType, $aMinor);
     } else {
         JpGraphError::RaiseL(24003);
     }
     // put a label at the very left data pos
     if ($aEndPoints) {
         $tickPositions[$i++] = $aData[0];
     }
     // put a label at the very right data pos
     if ($aEndPoints) {
         $tickPositions[$i] = $aData[$n - 1];
     }
     return array(self::$tickPositions, self::$minTickPositions);
 }