Class XlsxChart
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
A chart on a worksheet or a chart sheet (Phase 211): its type, title, series, axes and legend as its part states them, and where it is. Read from the part when the sheet's charts are listed; a chart that is not changed is saved as the bytes it was.
public sealed class XlsxChart
- Inheritance
-
XlsxChart
- Inherited Members
Properties
- Anchor
Gets where the chart is on its sheet; null for a chart sheet's, which fills the sheet.
- Axes
Gets the axes, in the part's order (none for a pie or a doughnut).
- Legend
Gets the legend; null when the chart has none.
- Name
Gets the chart's name (its frame's, as Excel's
ChartObject.Name; a chart sheet's chart is named for the sheet).
- Series
Gets the series, in the chart's order.
- Style
Gets the id of the chart's style (its style part's, as Excel's
ChartStyle: 201 for a new chart's); null when it has no style part.
- Title
Gets the title as the chart shows it: its own text, or for a title Excel makes itself the one series' name (or "Chart Title" for several); null when the chart has no title.
- Type
Gets the chart's type; Combination when its series are of several.
Methods
- AddSeries(string, string?, string?)
Adds a series to the chart's (first) plot, after its last.
- ChangeType(XlsxChartType)
Changes the chart's type: its plot and its axes are written again for the new type with the same series (their look the new type's), the rest of the chart as it is.
- Remove()
Takes the chart off its sheet: its frame, the chart part and the style parts only it used.
- RemoveSeries(int)
Takes a series out of the chart.
- SetAxisScale(int, double?, double?)
Fixes the least and greatest values an axis shows, or lets Excel choose them.
- SetAxisTitle(int, string?)
Gives an axis a title of its own text, or none.
- SetAxisVisible(int, bool)
Shows or hides an axis (Excel keeps a hidden axis as
delete="1").
- SetLegend(XlsxLegendPosition?)
Gives the chart a legend at a position, or none.
- SetSeries(int, string?, string?, string?)
Changes the ranges a series reads, its caches written again from the cells. A reference left null stays as it is.
- SetTitle(string?)
Gives the chart a title of its own text, or none.
- ToString()
The chart's name, type and how many series it has.