CustomLabel Class

Definition

Represents a custom label for an axis.

public ref class CustomLabel : System::Web::UI::DataVisualization::Charting::ChartNamedElement, System::Web::UI::DataVisualization::Charting::IChartMapArea
public class CustomLabel : System.Web.UI.DataVisualization.Charting.ChartNamedElement, System.Web.UI.DataVisualization.Charting.IChartMapArea
type CustomLabel = class
    inherit ChartNamedElement
    interface IChartMapArea
Public Class CustomLabel
Inherits ChartNamedElement
Implements IChartMapArea
Inheritance
Implements

Remarks

CustomLabel objects are stored in the CustomLabelsCollection class, which is exposed as the CustomLabels property of the Axis class.

Axis labels for the first label row are automatically generated unless custom labels are specified using the CustomLabels property. If you specify a custom label along the first label row, no axis labels will be automatically generated for the entire first row.

Only custom labels may be used for the second label row.

The ToPosition and FromPosition properties determine the axis range that the label applies to.

A grid line and/or tick mark can be displayed for a custom axis label by using the GridTicks property; this property specifies whether a custom grid line or tick mark will be drawn in the middle of the label range.

Constructors

CustomLabel()

Creates a new instance of the CustomLabel class.

CustomLabel(Double, Double, String, Int32, LabelMarkStyle)

Initializes a new instance of the CustomLabel class with the specified fromPosition, toPosition, text, labelRow, and markStyle parameters.

CustomLabel(Double, Double, String, Int32, LabelMarkStyle, GridTickTypes)

Initializes a new instance of the CustomLabel class with the specified fromPosition, toPosition, text, labelRow, markStyle and gridTick parameters.

Properties

Axis

Gets the axis that this CustomLabel object belongs to.

ForeColor

Gets or sets the text color of the custom label.

FromPosition

Gets or sets the beginning position, in axis coordinates, of the custom label.

GridTicks

Gets or sets a property that specifies whether custom tick marks and grid lines will be drawn in the center of the label.

Image

Gets or sets the custom label image.

ImageMapAreaAttributes

Gets or sets a string that represents the area attributes of a custom label image.

ImagePostBackValue

Gets or sets the postback value that can be processed on a Click event.

ImageTransparentColor

Gets or sets a color that will be replaced with a transparent color when a custom label image is drawn.

ImageUrl

Gets or sets the URL target of the label image.

LabelMark

Gets or sets the label mark for a custom label. This applies to labels in the second row only.

MapAreaAttributes

Gets or sets the map area attributes, if any, of the custom label.

MarkColor

Gets or sets the marker color for the custom label.

Name

Gets or sets the name of the custom label.

PostBackValue

Gets or sets the postback value that can be processed on a Click event.

RowIndex

Gets or sets the index of the custom label row.

Tag

Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
Text

Gets or sets the custom label text.

ToolTip

Gets or sets the custom label tooltip text.

ToPosition

Gets or sets the end position of the custom label, in axis coordinates.

Url

Gets or sets the target URL of the custom label.

Methods

Clone()

Returns a cloned label object.

Dispose()

Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean)

Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources.

(Inherited from ChartElement)
Equals(Object)

Determines whether the specified Object is equal to the current ChartElement.

(Inherited from ChartElement)
GetHashCode()

Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current Object.

(Inherited from ChartElement)

Applies to