Plot Area

A Chart contains one or more plot areas. The PlotArea is the object containing the series (one or more series) and is the area within the bounds of the chart where the series is plotted. By default, every Chart instance contains a PrimaryPlotArea, and every plot area has an x-axis and y-axis.

The following code illustrates obtaining a chart's primary plot area.

Chart chart = new Chart(0, 0, 400, 200);
PlotArea plotArea = chart.PrimaryPlotArea;        
Dim MyChart As New Chart(0, 0, 400, 200)
Dim MyPlotArea As PlotArea = MyChart.PrimaryPlotArea   

To create a now plot area, add a new PlotArea to the Chart instance's PlotAreas property (PlotAreaList).

Chart chart = new Chart(0, 0, 700, 400);
PlotArea plotArea = chart.PlotAreas.Add(50, 50, 300, 300);        
Dim MyChart = New Chart(0, 0, 700, 400)
Dim MyPlotArea As PlotArea = MyChart.PlotAreas.Add(50, 50, 300, 300)

All plot areas in a chart are automatically laid out when a Chart object's AutoLayout property is True (the default value). All plot areas inside the chart will have their layout properties automatically determined and vertically aligns all plot areas within the chart. Setting a Chart instance's AutoLayout property to False requires manually configuring all values.

Manually configuring a chart requires configuring all other elements (i.e., legends) added to a chart.


Property Description
BackgroundColor Gets or sets the Color object to use for the background.
BottomTitles Gets the Title object to use for the bottom title
Chart Gets the Chart object.
ClipToPlotArea Gets or sets the boolean value specifying whether to clip data or not. By default it is True.
Height Gets or sets the height.
Series Gets the SeriesList object .
TopTitles Gets the Title object to use for the top title.
Width Gets or sets the width.
X Gets or sets the X coordinate.
XAxes Gets the XAxisList object.
Y Gets or sets the Y coordinate.
YAxes Gets the YAxisList object.

In this topic