ChartStyle

ChartStyle enumeration

Specifies predefined styles of a chart.

public enum ChartStyle

Values

NameValueDescription
Normal0Represents the default chart style.
Muted1A style with muted colors.
Saturated2A style with more saturated colors.
Shaded3A style with shaded data points.
Flat4A style with flat data points without gradient.
Shadowed5A style with data points having a shadow.
Gradient6A style with gradient fill of data points.
Original7A style with an original appearance of a chart.
Transparent18A style with transparent data points.
Transparent29A style with transparent data points.
Outline10A style with data points having no fill, but only an outline.
OutlineBlack11A style with black chart background, in which data points have no fill, but only an outline.
Black12A style with black chart background.
Grey13A style with gray gradient chart background.
Blue14A style with blue chart background.
ShadedPlot15A style, in which the plot area is shaded.

Examples

Shows how to set and get chart style.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a chart in the Black style.
builder.InsertChart(ChartType.Column, 400, 250, ChartStyle.Black);

doc.Save(ArtifactsDir + "Charts.SetChartStyle.docx");

doc = new Document(ArtifactsDir + "Charts.SetChartStyle.docx");

// Get a chart to update.
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Chart chart = shape.Chart;

// Get the chart style.
Assert.That(chart.Style, Is.EqualTo(ChartStyle.Black));

See Also