Legend
in package
Table of Contents
Constants
- POSITION_BOTTOM = 'b'
- POSITION_LEFT = 'l'
- POSITION_RIGHT = 'r'
- POSITION_TOP = 't'
- POSITION_TOPRIGHT = 'tr'
- POSITION_XLREF = [self::XL_LEGEND_POSITION_BOTTOM => self::POSITION_BOTTOM, self::XL_LEGEND_POSITION_CORNER => self::POSITION_TOPRIGHT, self::XL_LEGEND_POSITION_CUSTOM => '??', self::XL_LEGEND_POSITION_LEFT => self::POSITION_LEFT, self::XL_LEGEND_POSITION_RIGHT => self::POSITION_RIGHT, self::XL_LEGEND_POSITION_TOP => self::POSITION_TOP]
- XL_LEGEND_POSITION_BOTTOM = -4107
- Legend positions
- XL_LEGEND_POSITION_CORNER = 2
- XL_LEGEND_POSITION_CUSTOM = -4161
- XL_LEGEND_POSITION_LEFT = -4131
- XL_LEGEND_POSITION_RIGHT = -4152
- XL_LEGEND_POSITION_TOP = -4160
Properties
- $borderLines : GridLines
- $fillColor : ChartColor
- $layout : Layout|null
- Legend Layout.
- $legendText : AxisText|null
- $overlay : bool
- Allow overlay of other elements?
- $position : string
- Legend position.
Methods
- __clone() : mixed
- Implement PHP __clone to create a deep clone, not just a shallow copy.
- __construct() : mixed
- Create a new Legend.
- getBorderLines() : GridLines
- getFillColor() : ChartColor
- getLayout() : Layout|null
- Get Layout.
- getLegendText() : AxisText|null
- getOverlay() : bool
- Get allow overlay of other elements?
- getPosition() : string
- Get legend position as an excel string value.
- getPositionXL() : false|int
- Get legend position as an Excel internal numeric value.
- setBorderLines() : self
- setLegendText() : self
- setOverlay() : void
- Set allow overlay of other elements?
- setPosition() : bool
- Get legend position using an excel string value.
- setPositionXL() : bool
- Set legend position using an Excel internal numeric value.
Constants
POSITION_BOTTOM
public
mixed
POSITION_BOTTOM
= 'b'
POSITION_LEFT
public
mixed
POSITION_LEFT
= 'l'
POSITION_RIGHT
public
mixed
POSITION_RIGHT
= 'r'
POSITION_TOP
public
mixed
POSITION_TOP
= 't'
POSITION_TOPRIGHT
public
mixed
POSITION_TOPRIGHT
= 'tr'
POSITION_XLREF
public
mixed
POSITION_XLREF
= [self::XL_LEGEND_POSITION_BOTTOM => self::POSITION_BOTTOM, self::XL_LEGEND_POSITION_CORNER => self::POSITION_TOPRIGHT, self::XL_LEGEND_POSITION_CUSTOM => '??', self::XL_LEGEND_POSITION_LEFT => self::POSITION_LEFT, self::XL_LEGEND_POSITION_RIGHT => self::POSITION_RIGHT, self::XL_LEGEND_POSITION_TOP => self::POSITION_TOP]
XL_LEGEND_POSITION_BOTTOM
Legend positions
public
mixed
XL_LEGEND_POSITION_BOTTOM
= -4107
XL_LEGEND_POSITION_CORNER
public
mixed
XL_LEGEND_POSITION_CORNER
= 2
XL_LEGEND_POSITION_CUSTOM
public
mixed
XL_LEGEND_POSITION_CUSTOM
= -4161
XL_LEGEND_POSITION_LEFT
public
mixed
XL_LEGEND_POSITION_LEFT
= -4131
XL_LEGEND_POSITION_RIGHT
public
mixed
XL_LEGEND_POSITION_RIGHT
= -4152
XL_LEGEND_POSITION_TOP
public
mixed
XL_LEGEND_POSITION_TOP
= -4160
Properties
$borderLines
private
GridLines
$borderLines
$fillColor
private
ChartColor
$fillColor
$layout
Legend Layout.
private
Layout|null
$layout
$legendText
private
AxisText|null
$legendText
= null
$overlay
Allow overlay of other elements?
private
bool
$overlay
= true
$position
Legend position.
private
string
$position
= self::POSITION_RIGHT
Methods
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone() : mixed
__construct()
Create a new Legend.
public
__construct([string $position = self::POSITION_RIGHT ][, Layout|null $layout = null ][, bool $overlay = false ]) : mixed
Parameters
- $position : string = self::POSITION_RIGHT
- $layout : Layout|null = null
- $overlay : bool = false
getBorderLines()
public
getBorderLines() : GridLines
Return values
GridLinesgetFillColor()
public
getFillColor() : ChartColor
Return values
ChartColorgetLayout()
Get Layout.
public
getLayout() : Layout|null
Return values
Layout|nullgetLegendText()
public
getLegendText() : AxisText|null
Return values
AxisText|nullgetOverlay()
Get allow overlay of other elements?
public
getOverlay() : bool
Return values
boolgetPosition()
Get legend position as an excel string value.
public
getPosition() : string
Return values
stringgetPositionXL()
Get legend position as an Excel internal numeric value.
public
getPositionXL() : false|int
Return values
false|intsetBorderLines()
public
setBorderLines(GridLines $borderLines) : self
Parameters
- $borderLines : GridLines
Return values
selfsetLegendText()
public
setLegendText(AxisText|null $legendText) : self
Parameters
- $legendText : AxisText|null
Return values
selfsetOverlay()
Set allow overlay of other elements?
public
setOverlay(bool $overlay) : void
Parameters
- $overlay : bool
setPosition()
Get legend position using an excel string value.
public
setPosition(string $position) : bool
Parameters
- $position : string
-
see self::POSITION_*
Return values
boolsetPositionXL()
Set legend position using an Excel internal numeric value.
public
setPositionXL(int $positionXL) : bool
Parameters
- $positionXL : int
-
see self::XL_LEGEND_POSITION_*