Chart
extends AbstractPart
in package
Word2007 chart part writer: word/charts/chartx.xml.
Tags
Table of Contents
Properties
- $dateFormat : string
- $parentWriter : AbstractWriter
- Parent writer.
- $element : Chart
- Chart element.
- $options : array<string|int, mixed>
- Chart options.
- $types : array<string|int, mixed>
- Type definition.
Methods
- getParentWriter() : AbstractWriter
- Get parent writer.
- setElement() : void
- Set chart element.
- setParentWriter() : void
- Set parent writer.
- write() : string
- Write part.
- getXmlWriter() : XMLWriter
- Get XML Writer.
- writeText() : bool
- Write an XML text, this will call text() or writeRaw() depending on the value of Settings::isOutputEscapingEnabled().
- writeAxis() : void
- Write axis.
- writeAxisTitle() : void
- writeChart() : void
- Write chart.
- writePlotArea() : void
- Write plot area.
- writeSeries() : void
- Write series.
- writeSeriesItem() : void
- Write series items.
- writeShape() : void
- Write shape.
Properties
$dateFormat
protected
string
$dateFormat
= 'Y-m-d\TH:i:sP'
Date format
$parentWriter
Parent writer.
protected
AbstractWriter
$parentWriter
$element
Chart element.
private
Chart
$element
$options
Chart options.
private
array<string|int, mixed>
$options
= []
$types
Type definition.
private
array<string|int, mixed>
$types
= ['pie' => ['type' => 'pie', 'colors' => 1], 'doughnut' => ['type' => 'doughnut', 'colors' => 1, 'hole' => 75, 'no3d' => true], 'bar' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'bar', 'grouping' => 'clustered'], 'stacked_bar' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'bar', 'grouping' => 'stacked'], 'percent_stacked_bar' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'bar', 'grouping' => 'percentStacked'], 'column' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'col', 'grouping' => 'clustered'], 'stacked_column' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'col', 'grouping' => 'stacked'], 'percent_stacked_column' => ['type' => 'bar', 'colors' => 0, 'axes' => true, 'bar' => 'col', 'grouping' => 'percentStacked'], 'line' => ['type' => 'line', 'colors' => 0, 'axes' => true], 'area' => ['type' => 'area', 'colors' => 0, 'axes' => true], 'radar' => ['type' => 'radar', 'colors' => 0, 'axes' => true, 'radar' => 'standard', 'no3d' => true], 'scatter' => ['type' => 'scatter', 'colors' => 0, 'axes' => true, 'scatter' => 'marker', 'no3d' => true]]
Methods
getParentWriter()
Get parent writer.
public
getParentWriter() : AbstractWriter
Return values
AbstractWritersetElement()
Set chart element.
public
setElement(Chart $element) : void
Parameters
- $element : Chart
setParentWriter()
Set parent writer.
public
setParentWriter([AbstractWriter|null $writer = null ]) : void
Parameters
- $writer : AbstractWriter|null = null
write()
Write part.
public
write() : string
Return values
stringgetXmlWriter()
Get XML Writer.
protected
getXmlWriter() : XMLWriter
Return values
XMLWriterwriteText()
Write an XML text, this will call text() or writeRaw() depending on the value of Settings::isOutputEscapingEnabled().
protected
writeText(string $content) : bool
Parameters
- $content : string
-
The text string to write
Return values
bool —Returns true on success or false on failure
writeAxis()
Write axis.
private
writeAxis(XMLWriter $xmlWriter, string $type) : void
Parameters
- $xmlWriter : XMLWriter
- $type : string
Tags
writeAxisTitle()
private
writeAxisTitle(XMLWriter $xmlWriter, mixed $title) : void
Parameters
- $xmlWriter : XMLWriter
- $title : mixed
writeChart()
Write chart.
private
writeChart(XMLWriter $xmlWriter) : void
Parameters
- $xmlWriter : XMLWriter
Tags
writePlotArea()
Write plot area.
private
writePlotArea(XMLWriter $xmlWriter) : void
Parameters
- $xmlWriter : XMLWriter
Tags
writeSeries()
Write series.
private
writeSeries(XMLWriter $xmlWriter[, bool $scatter = false ]) : void
Parameters
- $xmlWriter : XMLWriter
- $scatter : bool = false
writeSeriesItem()
Write series items.
private
writeSeriesItem(XMLWriter $xmlWriter, string $type, array<string|int, mixed> $values) : void
Parameters
- $xmlWriter : XMLWriter
- $type : string
- $values : array<string|int, mixed>
writeShape()
Write shape.
private
writeShape(XMLWriter $xmlWriter[, bool $line = false ]) : void
Parameters
- $xmlWriter : XMLWriter
- $line : bool = false