CustomLabel CustomLabel CustomLabel CustomLabel Class

定义

表示轴的自定义标签。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
继承
实现

注解

CustomLabel对象存储在CustomLabelsCollection类中, 该类公开CustomLabelsAxis类的属性。CustomLabel objects are stored in the CustomLabelsCollection class, which is exposed as the CustomLabels property of the Axis class.

如果使用CustomLabels属性指定了自定义标签, 则将自动生成第一个标签行的轴标签。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.

ToPositionFromPosition属性确定标签适用的轴范围。The ToPosition and FromPosition properties determine the axis range that the label applies to.

通过使用GridTicks属性, 可以为自定义轴标签显示网格线和/或刻度线; 此属性指定是否将在标签范围的中间绘制自定义网格线或刻度线。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.

构造函数

CustomLabel() CustomLabel() CustomLabel() CustomLabel()

创建 CustomLabel 类的新实例。Creates a new instance of the CustomLabel class.

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

用指定的 fromPositiontoPositiontextlabelRowmarkStyle 参数初始化 CustomLabel 类的新实例。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) CustomLabel(Double, Double, String, Int32, LabelMarkStyle, GridTickTypes) CustomLabel(Double, Double, String, Int32, LabelMarkStyle, GridTickTypes) CustomLabel(Double, Double, String, Int32, LabelMarkStyle, GridTickTypes)

用指定的 fromPositiontoPositiontextlabelRowmarkStylegridTick 参数初始化 CustomLabel 类的新实例。Initializes a new instance of the CustomLabel class with the specified fromPosition, toPosition, text, labelRow, markStyle and gridTick parameters.

属性

Axis Axis Axis Axis

获取此 CustomLabel 对象所属的轴。Gets the axis that this CustomLabel object belongs to.

ForeColor ForeColor ForeColor ForeColor

获取或设置自定义标签的文本颜色。Gets or sets the text color of the custom label.

FromPosition FromPosition FromPosition FromPosition

获取或设置自定义标签在轴坐标中的开始位置。Gets or sets the beginning position, in axis coordinates, of the custom label.

GridTicks GridTicks GridTicks 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 Image Image Image

获取或设置自定义标签图像。Gets or sets the custom label image.

ImageMapAreaAttributes ImageMapAreaAttributes ImageMapAreaAttributes ImageMapAreaAttributes

获取或设置一个字符串,该字符串表示自定义标签图像的区域特性。Gets or sets a string that represents the area attributes of a custom label image.

ImagePostBackValue ImagePostBackValue ImagePostBackValue ImagePostBackValue

获取或设置在发生 Click 事件时,可以处理的回发值。Gets or sets the postback value that can be processed on a Click event.

ImageTransparentColor ImageTransparentColor ImageTransparentColor ImageTransparentColor

获取或设置在绘制自定义标签图像时,将替换为透明色的颜色。Gets or sets a color that will be replaced with a transparent color when a custom label image is drawn.

ImageUrl ImageUrl ImageUrl ImageUrl

获取或设置标签图像的 URL 目标。Gets or sets the URL target of the label image.

LabelMark LabelMark LabelMark LabelMark

获取或设置自定义标签的标签标记。Gets or sets the label mark for a custom label. 这仅适用于第二行中的标签。This applies to labels in the second row only.

MapAreaAttributes MapAreaAttributes MapAreaAttributes MapAreaAttributes

获取或设置自定义标签的映射区特性(如果有)。Gets or sets the map area attributes, if any, of the custom label.

MarkColor MarkColor MarkColor MarkColor

获取或设置自定义标签的标记颜色。Gets or sets the marker color for the custom label.

Name Name Name Name

获取或设置自定义标签的名称。Gets or sets the name of the custom label.

PostBackValue PostBackValue PostBackValue PostBackValue

获取或设置在发生 Click 事件时,可以处理的回发值。Gets or sets the postback value that can be processed on a Click event.

RowIndex RowIndex RowIndex RowIndex

获取或设置自定义标签行的索引。Gets or sets the index of the custom label row.

Tag Tag Tag Tag

获取或设置与此图表元素关联的对象。Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
Text Text Text Text

获取或设置自定义标签文本。Gets or sets the custom label text.

ToolTip ToolTip ToolTip ToolTip

获取或设置自定义标签工具提示文本。Gets or sets the custom label tooltip text.

ToPosition ToPosition ToPosition ToPosition

获取或设置自定义标签在轴坐标中的结束位置。Gets or sets the end position of the custom label, in axis coordinates.

Url Url Url Url

获取或设置自定义标签的目标 URL。Gets or sets the target URL of the custom label.

方法

Clone() Clone() Clone() Clone()

返回克隆的标签对象。Returns a cloned label object.

Dispose() Dispose() Dispose() Dispose()

释放由 ChartElement 占用的资源。Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

释放由 ChartElement 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources.

(Inherited from ChartElement)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的 Object 是否等同于当前的 ChartElementDetermines whether the specified Object is equal to the current ChartElement.

(Inherited from ChartElement)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

返回特定类型的哈希算法。Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前 Object 的字符串。Returns a string that represents the current Object.

(Inherited from ChartElement)

适用于