ChartArea Class

.NET Framework (current version)
 

Represents a chart area on the chart image.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)


public class ChartArea : ChartNamedElement

NameDescription
System_CAPS_pubmethodChartArea()

Initializes a new instance of the ChartArea class.

System_CAPS_pubmethodChartArea(String)

Initializes a new instance of the ChartArea class with the specified chart area name.

NameDescription
System_CAPS_pubpropertyAlignmentOrientation

Gets or sets the alignment orientation of a chart area.

System_CAPS_pubpropertyAlignmentStyle

Gets or sets the alignment style of the ChartArea.

System_CAPS_pubpropertyAlignWithChartArea

Gets or sets the name of the ChartArea object to which this chart area should be aligned.

System_CAPS_pubpropertyArea3DStyle

Gets or sets a ChartArea3DStyle object, which is used to implement 3D for all series in a chart area.

System_CAPS_pubpropertyAxes

Gets or sets an array that represents all axes for a chart area.

System_CAPS_pubpropertyAxisX

Gets or sets an Axis object that represents the primary X-axis.

System_CAPS_pubpropertyAxisX2

Gets or sets an Axis object that represents the secondary X-axis.

System_CAPS_pubpropertyAxisY

Gets or sets an Axis object that represents the primary Y-axis.

System_CAPS_pubpropertyAxisY2

Gets or sets an Axis object that represents the secondary Y-axis.

System_CAPS_pubpropertyBackColor

Gets or sets the background color of a ChartArea object.

System_CAPS_pubpropertyBackGradientStyle

Gets or sets the orientation for the background gradient of a chart area, and also determines whether or not a gradient is used.

System_CAPS_pubpropertyBackHatchStyle

Gets or sets the hatching style of a ChartArea object.

System_CAPS_pubpropertyBackImage

Gets or sets the background image of a ChartArea object.

System_CAPS_pubpropertyBackImageAlignment

Gets or sets the alignment of a ChartArea background image.

System_CAPS_pubpropertyBackImageTransparentColor

Gets or sets the color of a ChartArea object background image that will be drawn as transparent.

System_CAPS_pubpropertyBackImageWrapMode

Gets or sets the drawing mode for the background image of a ChartArea object.

System_CAPS_pubpropertyBackSecondaryColor

Gets or sets the secondary color for the background of a ChartArea object.

System_CAPS_pubpropertyBorderColor

Gets or sets the border color of a ChartArea object.

System_CAPS_pubpropertyBorderDashStyle

Gets or sets the border style of a ChartArea object.

System_CAPS_pubpropertyBorderWidth

Gets or sets the border width of a ChartArea object.

System_CAPS_pubpropertyInnerPlotPosition

Gets or sets an ElementPosition object, which defines the inner plot position of a chart area object.

System_CAPS_pubpropertyIsSameFontSizeForAllAxes

Gets or sets a flag that determines if the labels of the relevant chart area axes are of equal size.

System_CAPS_pubpropertyName

Gets or sets the unique name of a ChartArea object.(Overrides ChartNamedElement.Name.)

System_CAPS_pubpropertyPosition

Gets or sets an ElementPosition object that defines the position of a ChartArea object within the Chart.

System_CAPS_pubpropertyShadowColor

Gets or sets the shadow color of a ChartArea object.

System_CAPS_pubpropertyShadowOffset

Gets or sets the shadow offset, in pixels, of a ChartArea object.

System_CAPS_pubpropertyTag

Gets or sets an object associated with this chart element.(Inherited from ChartElement.)

System_CAPS_pubpropertyVisible

Gets or sets a value that indicates if a chart area is visible.

NameDescription
System_CAPS_pubmethodDispose()

Releases the resources used by the ChartElement.(Inherited from ChartElement.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the ChartArea class and optionally releases the managed resources.(Overrides ChartElement.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified Object is equal to the current ChartElement.(Inherited from ChartElement.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Returns a hash function for a particular type.(Inherited from ChartElement.)

System_CAPS_pubmethodGetSeriesDepth(Series)

Returns the depth of a Series in a chart area.

System_CAPS_pubmethodGetSeriesZPosition(Series)

Returns the Z position of a series, which is useful for custom drawing.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRecalculateAxesScale()

Recalculates the properties of the chart area after changes have been made to the chart in the Customize event.

System_CAPS_pubmethodToString()

Returns a string that represents the current Object.(Inherited from ChartElement.)

System_CAPS_pubmethodTransformPoints(Point3D[])

Applies 3D transformations to an array of 3D points, which must be done before GDI+ drawing methods can be called.

Within any given chart, the inner plot position is the rectangular area, inside the x and y-axis lines, where the data points are drawn. The plot position is the rectangular area that encompasses the inner plot position, the tick marks, and the axis labels. The chart area is the rectangular area that encompasses the plot position, the tick marks, the axis labels and the axis titles on the chart.

A chart area is represented by a ChartArea class; ChartArea objects are stored in the ChartAreaCollection class.

The number of chart series that can be plotted in a chart area is unlimited.

A ChartArea object:

  • Uses one distinct inner plotting area.

  • Is used to plot one or more chart series.

  • Has primary and secondary x and y-axes, except for pie and doughnut chart types.

When you use Shape chart types, which includes pie, doughnut, funnel, pyramid, polar, and radar charts, the inner plotting position defines the size of the chart type shape. For example, when you increase the value of the InnerPlotPosition property on a pie chart, you will increase the radius of the pie shape.

For all other chart types, each chart area has two sets of X- and Y-axes, primary and secondary. To access properties related to these axes, use the AxisX, AxisX2, AxisY and AxisY2 properties. If you need to set a property that affects all axes on the chart, use the Axes property.

One or more series are associated with a chart area. The series has a ChartArea property that determines the chart area that each series belongs to. By default, the series is connected to the default chart area. To disable the display of a series, set the ChartArea property of that series to a zero-length string.

If another chart area is added to the chart, you can associate any series with the new chart area. In all Shape chart types, as well as bar and stacked bar chart types, each series must be plotted in a separate chart area. In all other chart types, multiple series can be combined in the same chart area.

A 3D chart is displayed on a chart area-by-chart area basis. You can use the Area3DStyle property to enable and customize your chart in 3D.

The chart area minimum and maximum will not be automatically recalculated if you add new data, so the chart will not automatically change axis sizes.  You can require the chart area to recalculate these values by using the RecalculateAxesScale method.

To align multiple chart areas vertically, set the AlignmentOrientation property. To align multiple chart areas horizontally, you must first position the chart areas using the Position property, and then set the AlignmentOrientation property to Horizontal.

To suppress the display of a series, set the Series property of that series to a zero-length string.

.NET Framework
Available since 4.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: