Method Chart
- Namespace
- DocWright.Word.Composition
- Assembly
- DocWright.Word.Composition.dll
Chart(IBlockContainer, ChartKind, ChartData, ChartInsertOptions?)
Places a chart at Word's default size (6 by 3.5 inches).
public static void Chart(this IBlockContainer container, ChartKind kind, ChartData data, ChartInsertOptions? options = null)
Parameters
containerIBlockContainerThe container.
kindChartKindThe chart's kind.
dataChartDataThe categories and series.
optionsChartInsertOptionsThe grouping, direction, title, legend and workbook; null for Word's defaults.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The container is not one a composition made, or the data is refused (checked when the composition is lowered).
Chart(IBlockContainer, ChartKind, ChartData, double, double, Unit, ChartInsertOptions?)
Places a chart at a size.
public static void Chart(this IBlockContainer container, ChartKind kind, ChartData data, double width, double height, Unit unit = Unit.Point, ChartInsertOptions? options = null)
Parameters
containerIBlockContainerThe container.
kindChartKindThe chart's kind.
dataChartDataThe categories and series.
widthdoubleThe width.
heightdoubleThe height.
unitUnitThe unit the size is in.
optionsChartInsertOptionsThe grouping, direction, title, legend and workbook; null for Word's defaults.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentOutOfRangeException
A dimension is not a positive finite number.