Axis
in package
implements
ComparableInterface
Table of Contents
Interfaces
- ComparableInterface
- PhpOffice\PhpPresentation\ComparableInterface.
Constants
- AXIS_X = 'x'
- AXIS_Y = 'y'
- CROSSES_AUTO = 'autoZero'
- CROSSES_MAX = 'max'
- CROSSES_MIN = 'min'
- DEFAULT_FORMAT_CODE = 'general'
- TICK_LABEL_POSITION_HIGH = 'high'
- TICK_LABEL_POSITION_LOW = 'low'
- TICK_LABEL_POSITION_NEXT_TO = 'nextTo'
- TICK_MARK_CROSS = 'cross'
- TICK_MARK_INSIDE = 'in'
- TICK_MARK_NONE = 'none'
- TICK_MARK_OUTSIDE = 'out'
Properties
- $crossesAt : string
- $isReversedOrder : bool
- $isVisible : bool
- $majorGridlines : null|Gridlines
- $majorTickMark : string
- $majorUnit : float
- $maxBounds : int
- $minBounds : int
- $minorGridlines : null|Gridlines
- $minorTickMark : string
- $minorUnit : float
- $outline : Outline
- $tickLabelFont : Font
- Tick lable font.
- $tickLabelPosition : string
- $font : Font
- Font.
- $formatCode : string
- Format code.
- $hashIndex : int
- Hash index.
- $title : string
- Title.
- $titleRotation : int
Methods
- __construct() : mixed
- Create a new \PhpOffice\PhpPresentation\Shape\Chart\Axis instance.
- getCrossesAt() : string
- getFont() : Font|null
- Get font.
- getFormatCode() : string
- Get Format Code.
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getMajorGridlines() : Gridlines|null
- getMajorTickMark() : string
- getMajorUnit() : float|null
- getMaxBounds() : int|null
- getMinBounds() : int|null
- getMinorGridlines() : Gridlines|null
- getMinorTickMark() : string
- getMinorUnit() : float|null
- getOutline() : Outline
- getTickLabelFont() : Font|null
- Get tick label font.
- getTickLabelPosition() : string
- getTitle() : string
- Get Title.
- getTitleRotation() : int
- isReversedOrder() : bool
- isVisible() : bool
- Axis is hidden ?
- setCrossesAt() : self
- setFont() : self
- Set font.
- setFormatCode() : self
- Set Format Code.
- setHashIndex() : self
- Set hash index.
- setIsReversedOrder() : self
- setIsVisible() : self
- Hide an axis.
- setMajorGridlines() : self
- setMajorTickMark() : self
- setMajorUnit() : self
- setMaxBounds() : self
- setMinBounds() : self
- setMinorGridlines() : self
- setMinorTickMark() : self
- setMinorUnit() : self
- setOutline() : self
- setTickLabelFont() : self
- Set tick label font.
- setTickLabelPosition() : self
- setTitle() : self
- Set Title.
- setTitleRotation() : self
Constants
AXIS_X
public
mixed
AXIS_X
= 'x'
AXIS_Y
public
mixed
AXIS_Y
= 'y'
CROSSES_AUTO
public
mixed
CROSSES_AUTO
= 'autoZero'
CROSSES_MAX
public
mixed
CROSSES_MAX
= 'max'
CROSSES_MIN
public
mixed
CROSSES_MIN
= 'min'
DEFAULT_FORMAT_CODE
public
mixed
DEFAULT_FORMAT_CODE
= 'general'
TICK_LABEL_POSITION_HIGH
public
mixed
TICK_LABEL_POSITION_HIGH
= 'high'
TICK_LABEL_POSITION_LOW
public
mixed
TICK_LABEL_POSITION_LOW
= 'low'
TICK_LABEL_POSITION_NEXT_TO
public
mixed
TICK_LABEL_POSITION_NEXT_TO
= 'nextTo'
TICK_MARK_CROSS
public
mixed
TICK_MARK_CROSS
= 'cross'
TICK_MARK_INSIDE
public
mixed
TICK_MARK_INSIDE
= 'in'
TICK_MARK_NONE
public
mixed
TICK_MARK_NONE
= 'none'
TICK_MARK_OUTSIDE
public
mixed
TICK_MARK_OUTSIDE
= 'out'
Properties
$crossesAt
protected
string
$crossesAt
= self::CROSSES_AUTO
$isReversedOrder
protected
bool
$isReversedOrder
= false
$isVisible
protected
bool
$isVisible
= true
$majorGridlines
protected
null|Gridlines
$majorGridlines
$majorTickMark
protected
string
$majorTickMark
= self::TICK_MARK_NONE
$majorUnit
protected
float
$majorUnit
$maxBounds
protected
int
$maxBounds
$minBounds
protected
int
$minBounds
$minorGridlines
protected
null|Gridlines
$minorGridlines
$minorTickMark
protected
string
$minorTickMark
= self::TICK_MARK_NONE
$minorUnit
protected
float
$minorUnit
$outline
protected
Outline
$outline
$tickLabelFont
Tick lable font.
protected
Font
$tickLabelFont
$tickLabelPosition
protected
string
$tickLabelPosition
= self::TICK_LABEL_POSITION_NEXT_TO
$font
Font.
private
Font
$font
$formatCode
Format code.
private
string
$formatCode
= self::DEFAULT_FORMAT_CODE
$hashIndex
Hash index.
private
int
$hashIndex
$title
Title.
private
string
$title
= 'Axis Title'
$titleRotation
private
int
$titleRotation
= 0
Methods
__construct()
Create a new \PhpOffice\PhpPresentation\Shape\Chart\Axis instance.
public
__construct([string $title = 'Axis Title' ]) : mixed
Parameters
- $title : string = 'Axis Title'
-
Title
getCrossesAt()
public
getCrossesAt() : string
Return values
stringgetFont()
Get font.
public
getFont() : Font|null
Return values
Font|nullgetFormatCode()
Get Format Code.
public
getFormatCode() : string
Return values
stringgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getHashIndex()
Get hash index.
public
getHashIndex() : null|int
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Return values
null|int —Hash index
getMajorGridlines()
public
getMajorGridlines() : Gridlines|null
Return values
Gridlines|nullgetMajorTickMark()
public
getMajorTickMark() : string
Return values
stringgetMajorUnit()
public
getMajorUnit() : float|null
Return values
float|nullgetMaxBounds()
public
getMaxBounds() : int|null
Return values
int|nullgetMinBounds()
public
getMinBounds() : int|null
Return values
int|nullgetMinorGridlines()
public
getMinorGridlines() : Gridlines|null
Return values
Gridlines|nullgetMinorTickMark()
public
getMinorTickMark() : string
Return values
stringgetMinorUnit()
public
getMinorUnit() : float|null
Return values
float|nullgetOutline()
public
getOutline() : Outline
Return values
OutlinegetTickLabelFont()
Get tick label font.
public
getTickLabelFont() : Font|null
Return values
Font|nullgetTickLabelPosition()
public
getTickLabelPosition() : string
Return values
stringgetTitle()
Get Title.
public
getTitle() : string
Return values
stringgetTitleRotation()
public
getTitleRotation() : int
Return values
intisReversedOrder()
public
isReversedOrder() : bool
Return values
boolisVisible()
Axis is hidden ?
public
isVisible() : bool
Return values
boolsetCrossesAt()
public
setCrossesAt([string $value = self::CROSSES_AUTO ]) : self
Parameters
- $value : string = self::CROSSES_AUTO
Return values
selfsetFont()
Set font.
public
setFont([Font|null $font = null ]) : self
Parameters
- $font : Font|null = null
Return values
selfsetFormatCode()
Set Format Code.
public
setFormatCode([string $value = self::DEFAULT_FORMAT_CODE ]) : self
Parameters
- $value : string = self::DEFAULT_FORMAT_CODE
Return values
selfsetHashIndex()
Set hash index.
public
setHashIndex(int $value) : self
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Parameters
- $value : int
-
Hash index
Return values
selfsetIsReversedOrder()
public
setIsReversedOrder([bool $value = false ]) : self
Parameters
- $value : bool = false
Return values
selfsetIsVisible()
Hide an axis.
public
setIsVisible(bool $value) : self
Parameters
- $value : bool
-
delete
Return values
selfsetMajorGridlines()
public
setMajorGridlines(Gridlines $majorGridlines) : self
Parameters
- $majorGridlines : Gridlines
Return values
selfsetMajorTickMark()
public
setMajorTickMark([string $tickMark = self::TICK_MARK_NONE ]) : self
Parameters
- $tickMark : string = self::TICK_MARK_NONE
Return values
selfsetMajorUnit()
public
setMajorUnit([float|null $unit = null ]) : self
Parameters
- $unit : float|null = null
Return values
selfsetMaxBounds()
public
setMaxBounds([int|null $maxBounds = null ]) : self
Parameters
- $maxBounds : int|null = null
Return values
selfsetMinBounds()
public
setMinBounds([int|null $minBounds = null ]) : self
Parameters
- $minBounds : int|null = null
Return values
selfsetMinorGridlines()
public
setMinorGridlines(Gridlines $minorGridlines) : self
Parameters
- $minorGridlines : Gridlines
Return values
selfsetMinorTickMark()
public
setMinorTickMark([string $tickMark = self::TICK_MARK_NONE ]) : self
Parameters
- $tickMark : string = self::TICK_MARK_NONE
Return values
selfsetMinorUnit()
public
setMinorUnit([null|float $unit = null ]) : self
Parameters
- $unit : null|float = null
Return values
selfsetOutline()
public
setOutline(Outline $outline) : self
Parameters
- $outline : Outline
Return values
selfsetTickLabelFont()
Set tick label font.
public
setTickLabelFont([Font|null $font = null ]) : self
Parameters
- $font : Font|null = null
Return values
selfsetTickLabelPosition()
public
setTickLabelPosition([string $value = self::TICK_LABEL_POSITION_NEXT_TO ]) : self
Parameters
- $value : string = self::TICK_LABEL_POSITION_NEXT_TO
Return values
selfsetTitle()
Set Title.
public
setTitle([string $value = 'Axis Title' ]) : self
Parameters
- $value : string = 'Axis Title'
Return values
selfsetTitleRotation()
public
setTitleRotation(int $titleRotation) : self
Parameters
- $titleRotation : int