CustomLabelsCollection.Add Method (Double, Double, String)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Adds a CustomLabel object to the collection, using the given axis range and text.

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

public CustomLabel Add(
	double fromPosition,
	double toPosition,
	string text


Type: System.Double

The minimum value of the axis range to which the label is applied.

Type: System.Double

The maximum value of the axis range to which the label is applied.

Type: System.String

The label text.

Return Value

Type: System.Web.UI.DataVisualization.Charting.CustomLabel

The newly added CustomLabel object.

Adds one custom label to the first label row of the relevant axis. No label mark is used.

If a custom label is used anywhere in the first label row, no labels are automatically generated for that first row.


The RecalculateAxesScale method must be called prior to calling this particular method definition.

.NET Framework
Available since 4.0
Return to top