本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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');
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例13: testBetweenWithBadParams
/**
* @dataProvider badParamsProvider
*/
public function testBetweenWithBadParams($lower, $test, $upper, $includeLimits = TRUE)
{
$this->assertFalse(Utils::between($lower, $test, $upper, $includeLimits));
}
示例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;
}
示例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;
}