Class: ChartEx
A chartEx graphic-frame's chart, backed by its cx:chartSpace part.
Constructors
Constructor
new ChartEx(
part):ChartEx
Parameters
| Parameter | Type | Description |
|---|---|---|
part | Part | The chartEx chart's OPC part (/ppt/charts/chartEx{N}.xml). |
Returns
ChartEx
Properties
part
readonlypart:Part
The chartEx chart's OPC part (/ppt/charts/chartEx{N}.xml).
Accessors
axes
Get Signature
get axes():
ChartExAxis[]
The plot-area axes (cx:plotArea/cx:axis) in document order.
Returns
categories
Get Signature
get categories(): (
string|null)[]
Category labels from the first series' cached leaf level (cx:strDim's first cx:lvl). Empty for a category-less layout (a histogram bins raw observations).
Returns
(string | null)[]
element_
Get Signature
get element_():
Element|null
Escape hatch: the underlying cx:chartSpace element. After mutating it call markDirty, or save() writes the original bytes.
Returns
Element | null
layoutId
Get Signature
get layoutId():
string|null
The first series' @layoutId, or null for an empty plot area.
Returns
string | null
layoutIds
Get Signature
get layoutIds():
string[]
The cx:series/@layoutId tokens in plot-area document order: the raw chartEx layout names (waterfall, funnel, treemap, sunburst, boxWhisker, regionMap, or clusteredColumn/paretoLine for histogram & pareto). This is the OOXML truth: a histogram and a pareto both surface as clusteredColumn, so the token does not always round-trip to the write-side ChartType.
Returns
string[]
legend
Get Signature
get legend():
ChartExLegend|null
The legend (cx:chart/cx:legend) position/alignment, or null when hidden.
Returns
ChartExLegend | null
partName
Get Signature
get partName():
string
Partname of the chartEx chart part.
Returns
string
series
Get Signature
get series():
ChartExSeries[]
The data series (cx:plotAreaRegion/cx:series) in document order.
Returns
title
Get Signature
get title():
string|null
The chart title (cx:chart/cx:title rich text), or null when absent.
Returns
string | null
Methods
dataElementById()
dataElementById(
id):Element|null
The cx:data block a series' cx:dataId points at (cx:chartData/cx:data[@id]), or null when the id is unset or unmatched.
Parameters
| Parameter | Type |
|---|---|
id | number | null |
Returns
Element | null
markDirty()
markDirty():
void
Mark the chartEx part dirty so save() reserializes it. Call after mutating element_.
Returns
void