Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
<?php

namespace PhpOffice\PhpSpreadsheet\Chart;

class Layout
{
    /**
     * layoutTarget.
     *
     * @var string
     */
    private $layoutTarget;

    /**
     * X Mode.
     *
     * @var string
     */
    private $xMode;

    /**
     * Y Mode.
     *
     * @var string
     */
    private $yMode;

    /**
     * X-Position.
     *
     * @var float
     */
    private $xPos;

    /**
     * Y-Position.
     *
     * @var float
     */
    private $yPos;

    /**
     * width.
     *
     * @var float
     */
    private $width;

    /**
     * height.
     *
     * @var float
     */
    private $height;

    /**
     * show legend key
     * Specifies that legend keys should be shown in data labels.
     *
     * @var bool
     */
    private $showLegendKey;

    /**
     * show value
     * Specifies that the value should be shown in a data label.
     *
     * @var bool
     */
    private $showVal;

    /**
     * show category name
     * Specifies that the category name should be shown in the data label.
     *
     * @var bool
     */
    private $showCatName;

    /**
     * show data series name
     * Specifies that the series name should be shown in the data label.
     *
     * @var bool
     */
    private $showSerName;

    /**
     * show percentage
     * Specifies that the percentage should be shown in the data label.
     *
     * @var bool
     */
    private $showPercent;

    /**
     * show bubble size.
     *
     * @var bool
     */
    private $showBubbleSize;

    /**
     * show leader lines
     * Specifies that leader lines should be shown for the data label.
     *
     * @var bool
     */
    private $showLeaderLines;

    /**
     * Create a new Layout.
< * < * @param array $layout
*/ public function __construct(array $layout = []) { if (isset($layout['layoutTarget'])) { $this->layoutTarget = $layout['layoutTarget']; } if (isset($layout['xMode'])) { $this->xMode = $layout['xMode']; } if (isset($layout['yMode'])) { $this->yMode = $layout['yMode']; } if (isset($layout['x'])) { $this->xPos = (float) $layout['x']; } if (isset($layout['y'])) { $this->yPos = (float) $layout['y']; } if (isset($layout['w'])) { $this->width = (float) $layout['w']; } if (isset($layout['h'])) { $this->height = (float) $layout['h']; } } /** * Get Layout Target. * * @return string */ public function getLayoutTarget() { return $this->layoutTarget; } /** * Set Layout Target. *
< * @param string $value
> * @param string $target
*
< * @return Layout
> * @return $this
*/
< public function setLayoutTarget($value)
> public function setLayoutTarget($target)
{
< $this->layoutTarget = $value;
> $this->layoutTarget = $target;
return $this; } /** * Get X-Mode. * * @return string */ public function getXMode() { return $this->xMode; } /** * Set X-Mode. *
< * @param string $value
> * @param string $mode
*
< * @return Layout
> * @return $this
*/
< public function setXMode($value)
> public function setXMode($mode)
{
< $this->xMode = (string) $value;
> $this->xMode = (string) $mode;
return $this; } /** * Get Y-Mode. * * @return string */ public function getYMode() { return $this->yMode; } /** * Set Y-Mode. *
< * @param string $value
> * @param string $mode
*
< * @return Layout
> * @return $this
*/
< public function setYMode($value)
> public function setYMode($mode)
{
< $this->yMode = (string) $value;
> $this->yMode = (string) $mode;
return $this; } /** * Get X-Position. * * @return number */ public function getXPosition() { return $this->xPos; } /** * Set X-Position. *
< * @param float $value
> * @param float $position
*
< * @return Layout
> * @return $this
*/
< public function setXPosition($value)
> public function setXPosition($position)
{
< $this->xPos = (float) $value;
> $this->xPos = (float) $position;
return $this; } /** * Get Y-Position. * * @return number */ public function getYPosition() { return $this->yPos; } /** * Set Y-Position. *
< * @param float $value
> * @param float $position
*
< * @return Layout
> * @return $this
*/
< public function setYPosition($value)
> public function setYPosition($position)
{
< $this->yPos = (float) $value;
> $this->yPos = (float) $position;
return $this; } /** * Get Width. * * @return number */ public function getWidth() { return $this->width; } /** * Set Width. *
< * @param float $value
> * @param float $width
*
< * @return Layout
> * @return $this
*/
< public function setWidth($value)
> public function setWidth($width)
{
< $this->width = $value;
> $this->width = $width;
return $this; } /** * Get Height. * * @return number */ public function getHeight() { return $this->height; } /** * Set Height. *
< * @param float $value
> * @param float $height
*
< * @return Layout
> * @return $this
*/
< public function setHeight($value)
> public function setHeight($height)
{
< $this->height = $value;
> $this->height = $height;
return $this; } /** * Get show legend key. * * @return bool */ public function getShowLegendKey() { return $this->showLegendKey; } /** * Set show legend key * Specifies that legend keys should be shown in data labels. *
< * @param bool $value Show legend key
> * @param bool $showLegendKey Show legend key
*
< * @return Layout
> * @return $this
*/
< public function setShowLegendKey($value)
> public function setShowLegendKey($showLegendKey)
{
< $this->showLegendKey = $value;
> $this->showLegendKey = $showLegendKey;
return $this; } /** * Get show value. * * @return bool */ public function getShowVal() { return $this->showVal; } /** * Set show val * Specifies that the value should be shown in data labels. *
< * @param bool $value Show val
> * @param bool $showDataLabelValues Show val
*
< * @return Layout
> * @return $this
*/
< public function setShowVal($value)
> public function setShowVal($showDataLabelValues)
{
< $this->showVal = $value;
> $this->showVal = $showDataLabelValues;
return $this; } /** * Get show category name. * * @return bool */ public function getShowCatName() { return $this->showCatName; } /** * Set show cat name * Specifies that the category name should be shown in data labels. *
< * @param bool $value Show cat name
> * @param bool $showCategoryName Show cat name
*
< * @return Layout
> * @return $this
*/
< public function setShowCatName($value)
> public function setShowCatName($showCategoryName)
{
< $this->showCatName = $value;
> $this->showCatName = $showCategoryName;
return $this; } /** * Get show data series name. * * @return bool */ public function getShowSerName() { return $this->showSerName; } /** * Set show ser name * Specifies that the series name should be shown in data labels. *
< * @param bool $value Show series name
> * @param bool $showSeriesName Show series name
*
< * @return Layout
> * @return $this
*/
< public function setShowSerName($value)
> public function setShowSerName($showSeriesName)
{
< $this->showSerName = $value;
> $this->showSerName = $showSeriesName;
return $this; } /** * Get show percentage. * * @return bool */ public function getShowPercent() { return $this->showPercent; } /** * Set show percentage * Specifies that the percentage should be shown in data labels. *
< * @param bool $value Show percentage
> * @param bool $showPercentage Show percentage
*
< * @return Layout
> * @return $this
*/
< public function setShowPercent($value)
> public function setShowPercent($showPercentage)
{
< $this->showPercent = $value;
> $this->showPercent = $showPercentage;
return $this; } /** * Get show bubble size. * * @return bool */ public function getShowBubbleSize() { return $this->showBubbleSize; } /** * Set show bubble size * Specifies that the bubble size should be shown in data labels. *
< * @param bool $value Show bubble size
> * @param bool $showBubbleSize Show bubble size
*
< * @return Layout
> * @return $this
*/
< public function setShowBubbleSize($value)
> public function setShowBubbleSize($showBubbleSize)
{
< $this->showBubbleSize = $value;
> $this->showBubbleSize = $showBubbleSize;
return $this; } /** * Get show leader lines. * * @return bool */ public function getShowLeaderLines() { return $this->showLeaderLines; } /** * Set show leader lines * Specifies that leader lines should be shown in data labels. *
< * @param bool $value Show leader lines
> * @param bool $showLeaderLines Show leader lines
*
< * @return Layout
> * @return $this
*/
< public function setShowLeaderLines($value)
> public function setShowLeaderLines($showLeaderLines)
{
< $this->showLeaderLines = $value;
> $this->showLeaderLines = $showLeaderLines;
return $this; } }