CustomLabelsCollection.Add 方法

定义

CustomLabel 对象添加到集合中。Adds a CustomLabel object to the collection.

重载

Add(Double, DateTimeIntervalType)

将多个 CustomLabel 类型的 DateTime 对象添加到集合中。Adds multiple CustomLabel objects of type DateTime to the collection. 使用标签填充轴的整个第一行。Populates the entire first row of an axis with labels.

Add(Double, Double, String)

使用给定的轴范围和文本将 CustomLabel 对象添加到集合中。Adds a CustomLabel object to the collection, using the given axis range and text.

Add(Double, DateTimeIntervalType, String)

将多个 DateTimeCustomLabelsCollection 对象添加到集合。Adds multiple DateTimeCustomLabelsCollection objects to the collection. 使用具有特定格式的标签填充轴的整个第一行。Populates the entire first row of an axis with labels with the specified format.

Add(Double, Double, String, Int32, LabelMarkStyle)

使用给定的轴范围、文本、行索引和标记样式将自定义标签添加到集合中。Adds a custom label to the collection, using the given axis range, text, row index and marking style.

Add(Double, DateTimeIntervalType, String, Int32, LabelMarkStyle)

向集合中添加多个自定义标签。Adds multiple custom labels to the collection. 这些标签将是具有指定间隔类型、文本格式、行索引和标记样式的 DateTime 标签。The labels will be DateTime labels with the specified interval type, text format, row index and marking style.

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

使用给定的轴范围、文本、行索引、标记样式和网格刻度类型将自定义标签添加到集合中。Adds a custom label to the collection, using the given axis range, text, row index, marking style and grid tick type.

Add(Double, DateTimeIntervalType, Double, Double, String, Int32, LabelMarkStyle)

向集合中添加多个自定义标签。Adds multiple custom labels to the collection. 这些标签将是具有指定间隔类型的 DateTime 标签,并将为由 minmax 参数确定的轴范围生成这些标签。The labels will be DateTime labels with the specified interval type, and will be generated for the axis range that is determined by the min and max arguments.

Add(Double, DateTimeIntervalType)

将多个 CustomLabel 类型的 DateTime 对象添加到集合中。Adds multiple CustomLabel objects of type DateTime to the collection. 使用标签填充轴的整个第一行。Populates the entire first row of an axis with labels.

public:
 void Add(double labelsStep, System::Web::UI::DataVisualization::Charting::DateTimeIntervalType intervalType);
public void Add (double labelsStep, System.Web.UI.DataVisualization.Charting.DateTimeIntervalType intervalType);
override this.Add : double * System.Web.UI.DataVisualization.Charting.DateTimeIntervalType -> unit
Public Sub Add (labelsStep As Double, intervalType As DateTimeIntervalType)

参数

labelsStep
Double

一个 Double,确定自定义标签的绘制频率。A Double value that determines how often the custom labels will be drawn.

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定间隔类型。A DateTimeIntervalType enumeration value that determines the interval type.

注解

Add方法 CustomLabel 为轴的整个第一个标签行创建和初始化对象,该标签具有 DateTime 指定类型的标签。The Add method creates and initializes CustomLabel objects for the entire first label row of an axis with DateTime labels of the specified type.

labelsStep参数确定自定义标签的绘制频率。The labelsStep parameter determines how often the custom labels will be drawn.

备注

RecalculateAxesScale调用此特定方法定义之前,必须先调用方法。The RecalculateAxesScale method must be called prior to calling this particular method definition.

适用于

Add(Double, Double, String)

使用给定的轴范围和文本将 CustomLabel 对象添加到集合中。Adds a CustomLabel object to the collection, using the given axis range and text.

public:
 System::Web::UI::DataVisualization::Charting::CustomLabel ^ Add(double fromPosition, double toPosition, System::String ^ text);
public System.Web.UI.DataVisualization.Charting.CustomLabel Add (double fromPosition, double toPosition, string text);
override this.Add : double * double * string -> System.Web.UI.DataVisualization.Charting.CustomLabel
Public Function Add (fromPosition As Double, toPosition As Double, text As String) As CustomLabel

参数

fromPosition
Double

向其应用标签的轴范围的最小值。The minimum value of the axis range to which the label is applied.

toPosition
Double

向其应用标签的轴范围的最大值。The maximum value of the axis range to which the label is applied.

text
String

标签文本。The label text.

返回

CustomLabel

新添加的 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.

备注

RecalculateAxesScale调用此特定方法定义之前,必须先调用方法。The RecalculateAxesScale method must be called prior to calling this particular method definition.

适用于

Add(Double, DateTimeIntervalType, String)

将多个 DateTimeCustomLabelsCollection 对象添加到集合。Adds multiple DateTimeCustomLabelsCollection objects to the collection. 使用具有特定格式的标签填充轴的整个第一行。Populates the entire first row of an axis with labels with the specified format.

public:
 void Add(double labelsStep, System::Web::UI::DataVisualization::Charting::DateTimeIntervalType intervalType, System::String ^ format);
public void Add (double labelsStep, System.Web.UI.DataVisualization.Charting.DateTimeIntervalType intervalType, string format);
override this.Add : double * System.Web.UI.DataVisualization.Charting.DateTimeIntervalType * string -> unit
Public Sub Add (labelsStep As Double, intervalType As DateTimeIntervalType, format As String)

参数

labelsStep
Double

一个 Double,确定自定义标签的绘制频率。A Double value that determines how often the custom labels will be drawn.

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定 labelsStep 参数的度量单位。A DateTimeIntervalType enumeration value that determines the unit of measure for the labelsStep parameter.

format
String

一个确定自定义标签格式的值。A value that determines the format of the custom label. 更多信息,请参见日期和事件格式字符串。For more information, see Date and Time Format Strings.

注解

此方法 CustomLabel 为轴的具有指定类型的第一个标签行创建和初始化对象 DateTimeThis method creates and initializes CustomLabel objects for an axis' entire first label row with DateTime labels of the specified type.

步骤确定自定义标签的绘制频率,还可以指定可选的标签格式。The step determines how often the custom labels will be drawn, and optional label formatting can be specified as well.

备注

RecalculateAxesScale调用此特定方法定义之前,必须先调用方法。The RecalculateAxesScale method must be called prior to calling this particular method definition.

适用于

Add(Double, Double, String, Int32, LabelMarkStyle)

使用给定的轴范围、文本、行索引和标记样式将自定义标签添加到集合中。Adds a custom label to the collection, using the given axis range, text, row index and marking style.

public:
 System::Web::UI::DataVisualization::Charting::CustomLabel ^ Add(double fromPosition, double toPosition, System::String ^ text, int rowIndex, System::Web::UI::DataVisualization::Charting::LabelMarkStyle markStyle);
public System.Web.UI.DataVisualization.Charting.CustomLabel Add (double fromPosition, double toPosition, string text, int rowIndex, System.Web.UI.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * double * string * int * System.Web.UI.DataVisualization.Charting.LabelMarkStyle -> System.Web.UI.DataVisualization.Charting.CustomLabel
Public Function Add (fromPosition As Double, toPosition As Double, text As String, rowIndex As Integer, markStyle As LabelMarkStyle) As CustomLabel

参数

fromPosition
Double

向其应用标签的轴范围的最小值。The minimum value of the axis range the label is applied to.

toPosition
Double

向其应用标签的轴范围的最大值。The maximum value of the axis range the label is applied to.

text
String

标签文本。The label text.

rowIndex
Int32

标签行索引。The label row index.

markStyle
LabelMarkStyle

指定用于标签的刻度线样式的枚举值。An enumeration value that specifies the tick mark style used for the label.

返回

CustomLabel

新添加的 CustomLabel 对象。The newly added CustomLabel object.

适用于

Add(Double, DateTimeIntervalType, String, Int32, LabelMarkStyle)

向集合中添加多个自定义标签。Adds multiple custom labels to the collection. 这些标签将是具有指定间隔类型、文本格式、行索引和标记样式的 DateTime 标签。The labels will be DateTime labels with the specified interval type, text format, row index and marking style.

public:
 void Add(double labelsStep, System::Web::UI::DataVisualization::Charting::DateTimeIntervalType intervalType, System::String ^ format, int rowIndex, System::Web::UI::DataVisualization::Charting::LabelMarkStyle markStyle);
public void Add (double labelsStep, System.Web.UI.DataVisualization.Charting.DateTimeIntervalType intervalType, string format, int rowIndex, System.Web.UI.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * System.Web.UI.DataVisualization.Charting.DateTimeIntervalType * string * int * System.Web.UI.DataVisualization.Charting.LabelMarkStyle -> unit
Public Sub Add (labelsStep As Double, intervalType As DateTimeIntervalType, format As String, rowIndex As Integer, markStyle As LabelMarkStyle)

参数

labelsStep
Double

一个 Double,确定自定义标签的绘制频率。A Double value that determines how often the custom labels will be drawn.

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定 labelsStep 参数的度量单位。A DateTimeIntervalType enumeration value that determines the unit of measure for the labelsStep parameter.

format
String

标签文本格式。The label text format.

rowIndex
Int32

标签行索引。The label row index.

markStyle
LabelMarkStyle

指定用于标签的刻度线样式的枚举值。An enumeration value that specifies the tick mark style used for the label.

适用于

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

使用给定的轴范围、文本、行索引、标记样式和网格刻度类型将自定义标签添加到集合中。Adds a custom label to the collection, using the given axis range, text, row index, marking style and grid tick type.

public:
 System::Web::UI::DataVisualization::Charting::CustomLabel ^ Add(double fromPosition, double toPosition, System::String ^ text, int rowIndex, System::Web::UI::DataVisualization::Charting::LabelMarkStyle markStyle, System::Web::UI::DataVisualization::Charting::GridTickTypes gridTick);
public System.Web.UI.DataVisualization.Charting.CustomLabel Add (double fromPosition, double toPosition, string text, int rowIndex, System.Web.UI.DataVisualization.Charting.LabelMarkStyle markStyle, System.Web.UI.DataVisualization.Charting.GridTickTypes gridTick);
override this.Add : double * double * string * int * System.Web.UI.DataVisualization.Charting.LabelMarkStyle * System.Web.UI.DataVisualization.Charting.GridTickTypes -> System.Web.UI.DataVisualization.Charting.CustomLabel
Public Function Add (fromPosition As Double, toPosition As Double, text As String, rowIndex As Integer, markStyle As LabelMarkStyle, gridTick As GridTickTypes) As CustomLabel

参数

fromPosition
Double

向其应用标签的轴范围的最小值。The minimum value of the axis range the label is applied to.

toPosition
Double

向其应用标签的轴范围的最大值。The maximum value of the axis range the label is applied to.

text
String

标签文本。The label text.

rowIndex
Int32

标签行索引。The label row index.

markStyle
LabelMarkStyle

指定用于标签的刻度线样式的枚举值。An enumeration value that specifies the tick mark style used for the label.

gridTick
GridTickTypes

指定用于标签的网格刻度类型的 GridTickTypes 枚举值。A GridTickTypes enumeration value that specifies the grid tick type used for the label.

返回

CustomLabel

新添加的 CustomLabel 对象。The newly added CustomLabel object.

适用于

Add(Double, DateTimeIntervalType, Double, Double, String, Int32, LabelMarkStyle)

向集合中添加多个自定义标签。Adds multiple custom labels to the collection. 这些标签将是具有指定间隔类型的 DateTime 标签,并将为由 minmax 参数确定的轴范围生成这些标签。The labels will be DateTime labels with the specified interval type, and will be generated for the axis range that is determined by the min and max arguments.

public:
 void Add(double labelsStep, System::Web::UI::DataVisualization::Charting::DateTimeIntervalType intervalType, double min, double max, System::String ^ format, int rowIndex, System::Web::UI::DataVisualization::Charting::LabelMarkStyle markStyle);
public void Add (double labelsStep, System.Web.UI.DataVisualization.Charting.DateTimeIntervalType intervalType, double min, double max, string format, int rowIndex, System.Web.UI.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * System.Web.UI.DataVisualization.Charting.DateTimeIntervalType * double * double * string * int * System.Web.UI.DataVisualization.Charting.LabelMarkStyle -> unit
Public Sub Add (labelsStep As Double, intervalType As DateTimeIntervalType, min As Double, max As Double, format As String, rowIndex As Integer, markStyle As LabelMarkStyle)

参数

labelsStep
Double

一个 Double,确定自定义标签的绘制频率。A Double value that determines how often the custom labels will be drawn.

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定 labelsStep 参数的度量单位。A DateTimeIntervalType enumeration value that determines the unit of measure for the labelsStep parameter.

min
Double

轴范围的最小值。The minimum value of the axis range.

max
Double

轴范围的最大值。The maximum value of the axis range.

format
String

标签文本格式。The label text format.

rowIndex
Int32

标签行索引。The label row index.

markStyle
LabelMarkStyle

指定用于标签的刻度线样式的枚举值。An enumeration value that specifies the tick mark style used for the label.

适用于