當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Utils::between方法代碼示例

本文整理匯總了PHP中Khill\Lavacharts\Utils::between方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utils::between方法的具體用法?PHP Utils::between怎麽用?PHP Utils::between使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Khill\Lavacharts\Utils的用法示例。


在下文中一共展示了Utils::between方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: opacity

 /**
  * Sets the transparency of assigned object points
  *
  * 1.0 being completely opaque and 0.0 fully transparent.
  *
  * @param  float $opacity
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  * @return \Khill\Lavacharts\Charts\Chart
  */
 public function opacity($opacity)
 {
     if (Utils::between(0.0, $opacity, 1.0) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'float', 'between 0.0 - 1.0');
     }
     return $this->setOption(__FUNCTION__, $opacity);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:16,代碼來源:OpacityTrait.php

示例2: pieHole

 /**
  * If between 0 and 1, displays a donut chart.
  *
  * The hole with have a radius equal to $pieHole times the radius of the chart.
  *
  *
  * @param  integer|float $pieHole Size of the pie hole.
  * @return \Khill\Lavacharts\Charts\DonutChart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function pieHole($pieHole)
 {
     if (Utils::between(0.0, $pieHole, 1.0) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'float', 'while, 0 < pieHole < 1 ');
     }
     return $this->setOption(__FUNCTION__, $pieHole);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:17,代碼來源:DonutChart.php

示例3: offset

 /**
  * How far to separate the slice from the rest of the pie.
  * from 0.0 (not at all) to 1.0 (the pie's radius).
  *
  * @param  float $offset
  * @return \Khill\Lavacharts\Configs\Slice
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function offset($offset)
 {
     if (Utils::between(0.0, $offset, 1.0) === false) {
         throw new InvalidConfigValue(__FUNCTION__, 'float', 'where 0.0 < $offset < 1.0');
     }
     return $this->setOption(__FUNCTION__, $offset);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:15,代碼來源:Slice.php

示例4: strokeOpacity

 /**
  * Sets the opacity of the stroke.
  *
  * @param  float $strokeOpacity
  * @return \Khill\Lavacharts\Configs\Stroke
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function strokeOpacity($strokeOpacity)
 {
     if (Utils::between(0.0, $strokeOpacity, 1.0, true) === false) {
         throw new InvalidConfigValue(__FUNCTION__, 'float', 'between 0.0 and 1.0');
     }
     return $this->setOption(__FUNCTION__, $strokeOpacity);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:14,代碼來源:Stroke.php

示例5: areaOpacity

 /**
  * The default opacity of the colored area under an area chart series, where
  * 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for
  * an individual series, set the areaOpacity value in the series property.
  *
  * @param  float              $o
  * @throws InvalidConfigValue
  * @return ComboChart
  */
 public function areaOpacity($o)
 {
     if (Utils::between(0.0, $o, 1.0)) {
         return $this->addOption(array(__FUNCTION__ => $o));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'float', 'between 0.0 - 1.0');
     }
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:17,代碼來源:ComboChart.php

示例6: areaOpacity

 /**
  * The default opacity of the colored area under an area chart series, where
  * 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for
  * an individual series, set the areaOpacity value in the series property.
  *
  * @param  float              $opacity
  * @throws InvalidConfigValue
  * @return AreaChart
  */
 public function areaOpacity($opacity)
 {
     if (Utils::between(0.0, $opacity, 1.0, true)) {
         $this->addOption(array('areaOpacity' => $opacity));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'float', 'where 0 < opacity < 1');
     }
     return $this;
 }
開發者ID:antoniotajuelo,項目名稱:lavacharts,代碼行數:18,代碼來源:AreaChart.php

示例7: strokeOpacity

 /**
  * Sets the opacity of the stroke.
  *
  * @param  float             $strokeOpacity
  * @throws InvalidConfigValue
  * @return Stroke
  */
 public function strokeOpacity($so)
 {
     if (Utils::between(0.0, $so, 1.0, true)) {
         $this->strokeOpacity = (double) $so;
     } else {
         throw new InvalidConfigValue(__FUNCTION__, 'float');
     }
     return $this;
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:16,代碼來源:Stroke.php

示例8: pieHole

 /**
  * If between 0 and 1, displays a donut chart. The hole with have a radius
  * equal to $pieHole times the radius of the chart.
  *
  * @param int|float $pieHole
  *
  * @return DonutChart
  */
 public function pieHole($pieHole)
 {
     if (Utils::between(0.0, $pieHole, 1.0)) {
         $this->addOption(array('pieHole' => $pieHole));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'float', 'while, 0 < pieHole < 1 ');
     }
     return $this;
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:17,代碼來源:DonutChart.php

示例9: offset

 /**
  * How far to separate the slice from the rest of the pie.
  * from 0.0 (not at all) to 1.0 (the pie's radius).
  *
  * @param  float              $offset
  * @throws InvalidConfigValue
  * @return Slice
  */
 public function offset($offset)
 {
     if (Utils::between(0.0, $offset, 1.0)) {
         $this->offset = $offset;
     } else {
         throw new InvalidConfigValue(__FUNCTION__, 'float', 'where 0.0 < $offset < 0.1');
     }
     return $this;
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:17,代碼來源:Slice.php

示例10: addColumnFromArray

 /**
  * Supplemental function to add columns from an array.
  *
  * @param  array                   $colDefArray
  * @throws InvalidColumnDefinition
  * @return DataTable
  */
 private function addColumnFromArray($colDefArray)
 {
     if (Utils::arrayValuesCheck($colDefArray, 'string') && Utils::between(1, count($colDefArray), 4, true)) {
         call_user_func_array(array($this, 'addColumnFromStrings'), $colDefArray);
     } else {
         throw new InvalidColumnDefinition($colDefArray);
     }
     return $this;
 }
開發者ID:alienwizard,項目名稱:MediahelpCRM_local,代碼行數:16,代碼來源:DataTable.php

示例11: markerOpacity

 /**
  * The opacity of the markers, where 0.0 is fully transparent and 1.0
  * is fully opaque.
  *
  * @param  float $markerOpacity
  * @return \Khill\Lavacharts\Charts\GeoChart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function markerOpacity($markerOpacity)
 {
     if (Utils::between(0, $markerOpacity, 1) === false) {
         throw new InvalidConfigValue(__FUNCTION__, 'float', 'between 0.0 - 1.0');
     }
     return $this->setOption(__FUNCTION__, $markerOpacity);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:15,代碼來源:GeoChart.php

示例12: slantedTextAngle

 /**
  * Sets the angle of the axis text, if it's drawn slanted.
  * Ignored if "slantedText" is false, or is in auto mode, and the chart decided to
  * draw the text horizontally. This option is only supported for a discrete axis.
  *
  * @param  int $angle Angle of labels
  * @return \Khill\Lavacharts\Configs\HorizontalAxis
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function slantedTextAngle($angle)
 {
     if (is_int($angle) === false || Utils::between(1, $angle, 90) == false) {
         throw new InvalidConfigValue(self::TYPE . '->' . __FUNCTION__, 'int', 'between 1 - 90');
     }
     return $this->setOption(__FUNCTION__, $angle);
 }
開發者ID:tahertechs,項目名稱:lavacharts,代碼行數:16,代碼來源:HorizontalAxis.php

示例13: testBetweenWithBadParams

 /**
  * @dataProvider badParamsProvider
  */
 public function testBetweenWithBadParams($lower, $test, $upper, $includeLimits = TRUE)
 {
     $this->assertFalse(Utils::between($lower, $test, $upper, $includeLimits));
 }
開發者ID:alienwizard,項目名稱:MediahelpCRM_local,代碼行數:7,代碼來源:UtilsBetweenTest.php

示例14: markerOpacity

 /**
  * The opacity of the markers, where 0.0 is fully transparent and 1.0
  * is fully opaque.
  *
  * @param  float|int          $mo
  * @throws InvalidConfigValue
  * @return GeoChart
  */
 public function markerOpacity($mo)
 {
     if ($mo === 0 || $mo === 1) {
         $this->addOption(array(__FUNCTION__ => $mo));
     } elseif (is_float($mo) && Utils::between(0.0, $mo, 1.0, true)) {
         $this->addOption(array(__FUNCTION__ => $mo));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'float|int', 'between 0 - 1');
     }
     return $this;
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:19,代碼來源:GeoChart.php

示例15: slantedTextAngle

 /**
  * Sets the angle of the axis text, if it's drawn slanted. Ignored if
  * axis.slantedText is false, or is in auto mode, and the chart decided to
  * draw the text horizontally.
  *
  * This option is only supported for a discrete axis.
  *
  * @param int Angle of labels
  *
  * @return HorizontalAxis
  */
 public function slantedTextAngle($angle)
 {
     if (is_int($angle) && Utils::between(1, $angle, 90)) {
         $this->slantedTextAngle = $angle;
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'int', 'between 1 - 90');
     }
     return $this;
 }
開發者ID:alvarobfdev,項目名稱:applog,代碼行數:20,代碼來源:HorizontalAxis.php


注:本文中的Khill\Lavacharts\Utils::between方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。