Chart supports an unlimited number of labels that can be used to describe a chart and its components. 

There are two types of labels: axis labels and data point labels. Axis labels are used along an axis, while data point labels are used to describe data points.

Axis Label Features

Data Point Label Features

Axis Labels

Automatic Creation

Labels by default are automatically created for an axis.

IIf data points do not provide an associated X axis label and custom labels are not being used, then X axis labels are created using the axis scale (see the figure below).

Data points can optionally specify an associated axis label via the AxisLabel property, and this label is then displayed along the X axis for that data point (wee the figure below).

Automatic X Axis Labels

Note that custom labels can also be used along an axis./p>

Automatic Sizing of Label Text

You can automatically adjust the size of the axis label text by setting the Axis.IsLabelAutoFit property to true.  The Axis.LabelAutoFitStyles property then determines how autofitting occurs.

Depending on the Axis.LabelAutoFitStyles property, the axis label angle, font size, and offset are then automatically adjusted to fit the label text.

DateTime Support and Formatting

If an axis utilizes a DateTime interval type, then its axis labels are displayed as DateTime values. Both custom and standard .NET date/time formatting can be used. 

Multiple Label Rows

Custom axis labels can be specified, and these custom labels are displayed using label rows (see the figure below):

Label Rows and Offsets

Easy Positioning Using Interval Properties

In the Axis.LabelStyle property, the interval, interval offset, interval type and interval offset type properties determine how often an axis' labels are drawn.

Both the interval and offset can be DateTime values.  Note that Sunday is considered the first day of the week. This is assignment is used to determine when positioning offsets. The figure below demonstrates an offset of one day and an interval of one week.

Label Interval and Offset

  Data Point Labels

Use data point labels to describe specific data points. Specify text for the label using the DataPoint.Label property. You can also see the IsValueShownAsLabel property in a Series or DataPoint object to display the data point values as labels.

Note that you can use a line break for multi-line labels. At design time, use a '\n' character sequence. At run time, use your respective programming language's line break or carriage return expression. For example, vbCrLf for Visual Basic.

Keywords

You can use keywords in the DataPoint.Label property. These keywords are replaced with dynamically generated values into the data points' labels. The figure below demonstrates using the #VAL keyword.

Using Keywords in Point Labels

Keywords are case-sensitive, and are specific to the chart element to which they are applied. For example, #VAL is used for series and data points. Refer to the following table for a listing of all available keywords:

Keyword/Th> Replaced By
#VALX X value of the data point
#VAL, #VALY, #VALY2, #VALY3, ... Y values of the data point
#SER Series name
#LABEL: Data point label
#INDEX Data point index
#PERCENT Percentage of the data point Y value
#TOTAL Total of all Y values in the series
#LEGENDTEXT Legend text

SSmart Labels

When using data point labels for charts with a large data set, data point labels often collide. Smart labels helps overcome these issues by repositioning the labels based on a set of user-defined rules, which are available via the Series.SmartLabelStyle property. In the figures below, the chart on the left does not use smart labels, while the chart on the right uses smart labels.

Smart Labels

DateTime Support and Formatting

Data point labels have the same DateTime formatting support as axis labels.  Refer to the DateTime Support and Formatting section for axis labels.