Chart

A Chart is the fundamental building block for building any of the chart types. See the Charts Overview topic for an overview of creating charts.

A chart is represented in Core Suite using the Chart class. When creating any of the numerous chart types available by Core Suite, you always begin with an instance of the Chart class.

When creating a chart, think of it as the canvas where you place one or more plot areas and one or more legends. Plot areas and associated data series are where most the charting work is performed.

Properties

A chart has numerous properties for customization and collections for adding titles, legends, and plot areas. For a complete list of properties refer to the Chart API topic.

Plot Areas

A chart has a PlotAreas collection for adding one or more plot areas to a chart. However, if no plot area is assigned to a chart, then the chart creates a default plot area. You can access a chart's default plot area through its PrimaryPlotArea property.

Titles

You can add an optional top and bottom title to a plot area. The HeaderTitles and FooterTitles are collections of Title instances to allow multiple titles. You can also modify a title's properties.

Chart chart = new Chart(0, 0, 400, 200);
Title topTitle = new Title("DynamicPDF Item Report");
topTitle.FontSize = 24;
Title subTitle = new Title("For the 2024 Calendar Year.");
Title bottomTitle = new Title("Produced by CeTe 2024");
bottomTitle.FontSize = 6;
chart.HeaderTitles.Add(topTitle);
chart.HeaderTitles.Add(subTitle);
chart.FooterTitles.Add(bottomTitle)
    
Title title = new Title("Item Count");
title.FontSize = 8;
Title title2 = new Title("In thousands of items.");
title2.FontSize = 8;
chart.PrimaryPlotArea.TopTitles.Add(title);
chart.PrimaryPlotArea.BottomTitles.Add(title2);

Bar Chart Example Figure 1. A chart with a title and subtitle.

AutoLayout

The Chart class has an AutoLayout property which by default is true. You can disable auto-layout by assigning false to this property. However, when a chart's auto-layout is disabled you are then responsible for laying out a chart and its associated plot areas and legends manually. Refer to the individual documentation topics for plot areas and legends for more information.