Class ChartEditor
Changes one chart of a document (Phase 221), from EditChart(WordDocument, ChartRef, IConversionDiagnostics?). Each method is an edit of its own: the part's elements the change owns are rewritten, every other character of the part is kept, and the chart's drawing model changes with it; Undo() puts both back.
public sealed class ChartEditor
- Inheritance
-
ChartEditor
- Inherited Members
Remarks
A chart Word made carries a workbook behind it. The values here are the chart's caches; the workbook is left as it
is (the 2.0 boundary: a Word package writes no cell), and a change of values says so through the diagnostics given
to EditChart(WordDocument, ChartRef, IConversionDiagnostics?) (DXP2010).
Properties
- Chart
Gets the chart.
- HasWorkbook
Gets whether the chart has a workbook behind it (its
c:externalData).
Methods
- AddSeries(ChartDataSeries)
Adds a series at the end of the chart's series.
- RemoveSeries(int)
Removes a series.
- SetAxisScale(double?, double?, double?)
Sets the value axis' scale: its minimum, maximum and major unit, each null for automatic.
- SetAxisTitle(ChartAxisKind, string?)
Sets an axis' title, or takes it off.
- SetCategories(IEnumerable<string>)
Sets the categories of every series.
- SetDataLabels(bool)
Shows or hides every series' value labels.
- SetGrouping(ChartGrouping)
Sets how a bar, line or area chart's series combine.
- SetKind(ChartKind, ChartGrouping, bool)
Changes the chart's kind: the plot and its axes are written again for the kind, with the series' names, categories and values; what else the old plot stated of its series (their colours, labels, markers) is not carried to the new kind, as Word's Change Chart Type gives the new kind's defaults.
- SetLegend(ChartLegendPosition?)
Sets where the legend is, or takes it off.
- SetSeriesColor(int, ColorRgb)
Sets a series' colour: its fill (bars, areas, slices) or its line (lines, scatter).
- SetSeriesValues(int, IEnumerable<double?>, IEnumerable<double?>?)
Sets a series' values (and a scatter series' X values).
- SetTitle(string?)
Sets the chart's title, or takes it off.