편집

다음을 통해 공유


CustomLabel Class

Definition

Represents a custom label for an axis.

public ref class CustomLabel : System::Windows::Forms::DataVisualization::Charting::ChartNamedElement
public class CustomLabel : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type CustomLabel = class
    inherit ChartNamedElement
Public Class CustomLabel
Inherits ChartNamedElement
Inheritance

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, GridTickTypes)

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

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

Initializes a new instance of the CustomLabel class with the specified fromPosition, toPosition, text, labelRow, and markStyle 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.

ImageTransparentColor

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

LabelMark

Gets or sets the label mark for a custom label. This applies to labels in rows other than the first row.

MarkColor

Gets or sets the marker color for the custom label.

Name

Gets or sets the name of the custom label.

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 starting position of the custom label, in axis coordinates.

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