Class ChartDataSource
Represents the data source of the chart. This could be a collection, database connection, or other data providers.
Inheritance
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class ChartDataSource : Object
ChartDataSource is the object that supplies the values a chart plots in a Word document. A developer hands it to a Chart so the chart has data to render, whether those values come from an in-memory collection, a database connection, or another provider that feeds the series.
Create one with new ChartDataSource() and assign it to the DataSource property of a Chart. The Chart reads its values from whatever the data source provides, which keeps the data concern separate from the chart's Type, Style, and AxisConfig. Because the source is set on the chart rather than constructed inside it, the same data can be prepared once and attached when the chart is built, then swapped for a different source without rebuilding the chart itself.
The document element tutorial shows how elements like charts assemble into a document, and the add table how-to covers placing structured content nearby.
Constructors
ChartDataSource()
Declaration
public ChartDataSource()