AbstractTypeBar
extends AbstractType
in package
\PhpOffice\PhpPresentation\Shape\Chart\Type\Bar.
Table of Contents
Constants
- DIRECTION_HORIZONTAL = 'bar'
- DIRECTION_VERTICAL = 'col'
- Orientation of bars
- GROUPING_CLUSTERED = 'clustered'
- Grouping of bars
- GROUPING_PERCENTSTACKED = 'percentStacked'
- GROUPING_STACKED = 'stacked'
Properties
- $barDirection : string
- Orientation of bars.
- $barGrouping : string
- Grouping of bars.
- $gapWidthPercent : int
- Space between bar or columns clusters.
- $hasAxisX : bool
- Has Axis X?
- $hasAxisY : bool
- Has Axis Y?
- $overlapWidthPercent : int
- Overlap within bar or columns clusters. Value between 100 and -100 percent.
- $hashIndex : int
- Hash index.
- $series : array<int, Series>
Methods
- __clone() : mixed
- addSeries() : $this
- Add Series.
- getBarDirection() : string
- Get orientation.
- getBarGrouping() : string
- Get grouping (stack or expanded style bar).
- getGapWidthPercent() : int
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getOverlapWidthPercent() : int
- getSeries() : array<int, Series>
- Get Series.
- hasAxisX() : bool
- Has Axis X?
- hasAxisY() : bool
- Has Axis Y?
- setBarDirection() : AbstractTypeBar
- Set bar orientation.
- setBarGrouping() : AbstractTypeBar
- Set bar grouping (stack or expanded style bar).
- setGapWidthPercent() : $this
- setHashIndex() : AbstractType
- Set hash index.
- setOverlapWidthPercent() : self
- setSeries() : $this
- Set Series.
Constants
DIRECTION_HORIZONTAL
public
mixed
DIRECTION_HORIZONTAL
= 'bar'
DIRECTION_VERTICAL
Orientation of bars
public
mixed
DIRECTION_VERTICAL
= 'col'
GROUPING_CLUSTERED
Grouping of bars
public
mixed
GROUPING_CLUSTERED
= 'clustered'
GROUPING_PERCENTSTACKED
public
mixed
GROUPING_PERCENTSTACKED
= 'percentStacked'
GROUPING_STACKED
public
mixed
GROUPING_STACKED
= 'stacked'
Properties
$barDirection
Orientation of bars.
protected
string
$barDirection
= self::DIRECTION_VERTICAL
$barGrouping
Grouping of bars.
protected
string
$barGrouping
= self::GROUPING_CLUSTERED
$gapWidthPercent
Space between bar or columns clusters.
protected
int
$gapWidthPercent
= 150
$hasAxisX
Has Axis X?
protected
bool
$hasAxisX
= true
$hasAxisY
Has Axis Y?
protected
bool
$hasAxisY
= true
$overlapWidthPercent
Overlap within bar or columns clusters. Value between 100 and -100 percent.
protected
int
$overlapWidthPercent
= 0
For stacked bar charts, the default overlap will be 100, for grouped bar charts 0.
$hashIndex
Hash index.
private
int
$hashIndex
$series
private
array<int, Series>
$series
= []
Methods
__clone()
public
__clone() : mixed
Tags
addSeries()
Add Series.
public
addSeries(Series $value) : $this
Parameters
- $value : Series
Return values
$thisgetBarDirection()
Get orientation.
public
getBarDirection() : string
Return values
stringgetBarGrouping()
Get grouping (stack or expanded style bar).
public
getBarGrouping() : string
Return values
stringgetGapWidthPercent()
public
getGapWidthPercent() : int
Return values
intgetHashCode()
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
getOverlapWidthPercent()
public
getOverlapWidthPercent() : int
Return values
intgetSeries()
Get Series.
public
getSeries() : array<int, Series>
Return values
array<int, Series>hasAxisX()
Has Axis X?
public
hasAxisX() : bool
Return values
boolhasAxisY()
Has Axis Y?
public
hasAxisY() : bool
Return values
boolsetBarDirection()
Set bar orientation.
public
setBarDirection([string $value = self::DIRECTION_VERTICAL ]) : AbstractTypeBar
Parameters
- $value : string = self::DIRECTION_VERTICAL
Return values
AbstractTypeBarsetBarGrouping()
Set bar grouping (stack or expanded style bar).
public
setBarGrouping([string $value = self::GROUPING_CLUSTERED ]) : AbstractTypeBar
Parameters
- $value : string = self::GROUPING_CLUSTERED
Return values
AbstractTypeBarsetGapWidthPercent()
public
setGapWidthPercent(int $gapWidthPercent) : $this
Parameters
- $gapWidthPercent : int
Return values
$thissetHashIndex()
Set hash index.
public
setHashIndex(int $value) : AbstractType
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
AbstractTypesetOverlapWidthPercent()
public
setOverlapWidthPercent(int $value) : self
Parameters
- $value : int
-
overlap width percentage
Return values
selfsetSeries()
Set Series.
public
setSeries([array<int, Series> $series = [] ]) : $this
Parameters
- $series : array<int, Series> = []