ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
OptionalacceptThe flip this content takes when asked to mirror as flip states.
Defined by content that can be mirrored, such as a shape or a picture; absent, the content cannot: a frame dragged through its opposite edge is moved there but not mirrored, as Excel does with a chart. Must be pure, as acceptRotation is. A connector may accept each axis on its own.
OptionalacceptThe rotation this content takes when asked to turn by degrees, clockwise.
Optionaloptions: IListener.OptionsAdds a series with no data, drawn as a new series of the chart's type is, and returns it.
Optionalname: string | ICellRange
The series' name: text, or a cell ('=Sheet1!$D$1').
Optionalindex: number
Where the series goes in the plot order, from 0; at the end when left out.
Optionaloptions: ITransaction.OperationOptionsOffice Scripts' addChartSeries, VBA's SeriesCollection.NewSeries. Give it data with
IChart.ISeries.setValues and IChart.ISeries.setXAxisValues, or
IChart.ISeries.setFormula.
Batches all 'transactional' changes until they have all be committed or rolled back.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.
Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.
Close the record and cleans resources. Can't be undone.
Deletes the chart, and with it the movable that places it.
Optionaloptions: ITransaction.OperationOptionsProvides a mechanism to perform a set of operations in a batch.
A callback that performs multiple operations all within the same transaction.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Returns the chart's axes. A pie has none.
Returns the chart area: the whole chart's fill, border and font, the element every other element is inside.
Returns the chart's preset style, 1 to 48: the colors and effects Excel's Chart Styles gallery gives the chart's parts. 2 for a chart that states none, as the file format's default.
Returns the chart's type, by the names of IChart.Type, or 'unknown'.
'columnClustered', 'barStacked100', 'lineMarkers', 'pie', 'xyscatter',
'waterfall', 'pareto' and so on. A chart whose groups of series are drawn differently is
'combo', and IChart.ISeries.getChartType says how each series is drawn. Within one group
series may differ in markers; the chart then answers its first series' type, as Excel does.
OptionalgetThe points a connector's end may be glued to, in a width by height frame of this
content, before the frame is placed.
Optionaloptions: ConnectionsOptionsAbsent, the four edge midpoints — top, left, bottom, right, numbered in that order, each
leaving straight out — as Excel offers on a picture, a chart, a slicer or a control. A
shape is the exception and answers its geometry's own sites (a triangle's three, a
connector's none); a group answers none, since Excel glues to a group's members and never
to the group. Must be synchronous: null means the content cannot answer yet and will call
options.onReady when it can.
Returns the data labels of every series at once: reads answer the first series', and each
setter sets every series (Office Scripts' chart.getDataLabels(), VBA's ApplyDataLabels).
Returns the data table: the chart's values in a table under the plot area, shown or not.
OptionalgetHow a movable of this content moves and sizes with the cells under it when it is added without an anchor type.
Absent, it moves and sizes with them (IAnchored.Type.TwoCell), as Excel inserts a shape or a chart. A picture moves with its cell but keeps its size.
Returns the alternative text used by assistive technologies, or null if none has been set.
Returns how a blank cell is plotted: as a gap, as zero, or with a line drawn across it.
Returns the element at path (see IChart.IElement.getPath), or null where the chart
has none: a path that names nothing, or a part an edit removed.
Returns the element drawn at point: a hit test of the chart as laid out.
In px from the chart's top-left, unzoomed, as getLayout speaks.
Optionallayout: Size | ChartLayout
The layout to test, as getLayout answered it, or the size to lay the chart out at; by default the chart is laid out at its movable's bounds.
The topmost element there, as Excel stacks them: the title and legend over everything,
then data labels, trendlines and error bars, a series' points, the lines under them, axis titles,
axes and gridlines, the plot area, and the chart area under it all. null outside the chart,
or when the chart has no layout.
A press on a bar answers the bar's point; its series is the point's parent. Excel selects the series on a first press and the point on the next; which to select is the caller's.
Returns the box element is drawn in, in px from the chart's top-left, or null where the
chart as laid out draws nothing for it (a hidden part, a point with no value, the data table).
The element, or its path.
Optionallayout: Size | ChartLayout
As for getElementAt.
Returns the elements the chart shows, as Excel's Chart Elements list offers them to choose from: the chart area, the plot area, each series, and the title, legend, axes, axis titles, gridlines, data labels, trendlines, error bars, data table and group lines that are shown. Points, markers and legend entries are left out; a series' IChart.ISeries.getPoints lists its points.
Returns the chart's groups: each the series drawn one way against one pair of axes, with the
options they share (VBA's ChartGroups). A chart of one type has one group; a combo one per
type and axis pair.
A unique identifier for the record. This will never change.
This enables the record to be identified across transactions and users in a collaborative environment. The id is store-issued (IStore.create); the store keys all state by it.
Returns the chart laid out as Excel lays it out: every rect, axis scale, tick label, bar and point, in px from the chart's top-left, with every color concrete.
Optionalsize: { height: number; width: number }
The chart's size in px, unzoomed. Defaults to the movable's bounds.
null when the chart cannot be laid out: it has no size, or it is of a type not yet
laid out (waterfall, histogram, pareto, box and whisker, treemap, sunburst, funnel, map).
Returns the movable that places the chart on the sheet, or null if it is not placed by one.
OptionalgetReturns whether hidden rows and columns are left out of the chart.
Returns the cells the content names - a chart's series, a control's linked cell, a slicer's
column - or null when it names none.
Not where the movable sits: that is IMovable.getRange. The references are formulas the calculation engine holds, so they follow the cells they name through inserts, deletes, cuts, sheet renames and undo, and ContentEvents.onReferencesChange is announced when they have. A reference to deleted cells is left out. Without a running engine the references read as they were set.
Returns whether the chart area's corners are rounded.
Returns whether each series is a row or a column of the chart's cells, as its first series reads them.
Returns what the chart area is drawn with: its fill, its border and the chart's font (Office
Scripts' getFormat(), VBA's ChartArea.Format).
Returns an immutable type string.
Returns a label for the kind of content, such as Chart or Picture.
Every committed update gives the record a new, strictly increasing version id.
Used with getId to uniquely identify a version of the record.
The id is an identity, not a per-record count: ids are drawn from a single store-wide sequence bumped once per commit, so all records written in the same commit share an id and a given record's ids increase but are not sequential.
Records are immutable so a restore/revert doesn't change them — it repoints, and the version id reported is the one for the snapshot the store is currently at. Version ids are never reused: a write after an undo receives an id higher than any previously issued, so a stale reader can always detect the change.
Returns true if no more operations are allowed.
OptionalisIf the model unable to be modified.
If the model unable to be modified.
Draws every series as type, in one group on the primary axes, as Excel's Change Chart Type
does: the series keep their colors, and what each type cannot draw with is restated (a bar's
fill becomes a line's color, a pie takes a slice per point).
Optionaloptions: ITransaction.OperationOptionsA combo becomes one group; the secondary axes go. Office Scripts' setChartType, VBA's
Chart.ChartType. To change one series, see IChart.ISeries.setChartType.
Replaces every series with the series Excel makes of source, as Insert Chart does.
The cells: a range, or an address. A bare address is on the chart's sheet; several areas are separated by commas.
OptionalseriesBy: SeriesBy
Whether each series is a row or a column of the cells. 'auto' lets the cells
decide, as Insert Chart does.
Optionaloptions: ITransaction.OperationOptionsSet the alternative text used by assistive technologies.
Sets how a blank cell is plotted.
Optionaloptions: ITransaction.OperationOptionsAdds, places or removes a chart element by the names of Excel's Add Chart Element menu
(VBA's SetElement): 'legendRight', 'dataLabelOutsideEnd', 'primaryValueAxisTitleRotated',
'primaryValueGridLinesMinorMajor', 'trendlineAddLinear', 'errorBarStandardDeviation'…
Optionaloptions: ITransaction.OperationOptionsOptionalsetSet the name.
The name of the content.
Sets whether hidden rows and columns are left out of the chart.
Optionaloptions: ITransaction.OperationOptionsSets whether the chart area's corners are rounded.
Optionaloptions: ITransaction.OperationOptionsReads the chart's cells the other way: each series a row of them, or a column. The same cells, as IChart.setData reads them with that direction.
Optionaloptions: ITransaction.OperationOptionsSets several properties of the chart and its parts at once, as one step to undo.
Optionaloptions: ITransaction.OperationOptions
Interface for working with a chart.
Remarks
A chart is the content of a movable, which places it — see IChart.getMovable.