Table of Contents

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

container IBlockContainer

The container.

kind ChartKind

The chart's kind.

data ChartData

The categories and series.

options ChartInsertOptions

The 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

container IBlockContainer

The container.

kind ChartKind

The chart's kind.

data ChartData

The categories and series.

width double

The width.

height double

The height.

unit Unit

The unit the size is in.

options ChartInsertOptions

The 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.