CustomLabelsCollection.Add 方法

定义

将对象 CustomLabel 添加到集合。

重载

名称 说明
Add(Double, DateTimeIntervalType)

将类型的CustomLabel多个DateTime对象添加到集合。 使用标签填充轴的整个第一行。

Add(Double, Double, String)

CustomLabel使用给定的轴范围和文本将对象添加到集合。

Add(Double, DateTimeIntervalType, String)

将多个 DateTimeCustomLabelsCollection 对象添加到集合。 使用指定格式的标签填充轴的整个第一行。

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

使用给定的轴范围、文本、行索引和标记样式将自定义标签添加到集合。

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

将多个自定义标签添加到集合。 标签将是 DateTime 具有指定间隔类型、文本格式、行索引和标记样式的标签。

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

使用给定的轴范围、文本、行索引、标记样式和网格刻度类型向集合添加自定义标签。

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

将多个自定义标签添加到集合。 标签将是 DateTime 具有指定间隔类型的标签,将为由 min 参数 max 确定的轴范围生成标签。

Add(Double, DateTimeIntervalType)

将类型的CustomLabel多个DateTime对象添加到集合。 使用标签填充轴的整个第一行。

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

参数

labelsStep
Double

一个 Double 值,该值确定自定义标签的绘制频率。

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 确定间隔类型的枚举值。

注解

该方法Add使用指定类型的标签为轴CustomLabel的整个第一个标签行创建和初始化DateTime对象。

labelsStep 参数确定自定义标签的绘制频率。

注释

RecalculateAxesScale必须在调用此特定方法定义之前调用该方法。

适用于

Add(Double, Double, String)

CustomLabel使用给定的轴范围和文本将对象添加到集合。

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

参数

fromPosition
Double

标签应用到的轴范围的最小值。

toPosition
Double

标签应用到的轴范围的最大值。

text
String

标签文本。

返回

新添加 CustomLabel 的对象。

注解

将一个自定义标签添加到相关轴的第一个标签行。 不使用标签标记。

如果在第一个标签行中的任何位置使用自定义标签,则不会为该第一行自动生成任何标签。

注释

RecalculateAxesScale必须在调用此特定方法定义之前调用该方法。

适用于

Add(Double, DateTimeIntervalType, String)

将多个 DateTimeCustomLabelsCollection 对象添加到集合。 使用指定格式的标签填充轴的整个第一行。

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

参数

labelsStep
Double

一个 Double 值,该值确定自定义标签的绘制频率。

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定参数的 labelsStep 度量单位。

format
String

一个确定自定义标签格式的值。

注解

此方法使用指定类型的标签为轴的整个第一个标签行CustomLabel创建和初始化DateTime对象。

该步骤确定自定义标签的绘制频率,还可以指定可选的标签格式。

注释

RecalculateAxesScale必须在调用此特定方法定义之前调用该方法。

适用于

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

使用给定的轴范围、文本、行索引和标记样式将自定义标签添加到集合。

public:
 System::Windows::Forms::DataVisualization::Charting::CustomLabel ^ Add(double fromPosition, double toPosition, System::String ^ text, int rowIndex, System::Windows::Forms::DataVisualization::Charting::LabelMarkStyle markStyle);
public System.Windows.Forms.DataVisualization.Charting.CustomLabel Add(double fromPosition, double toPosition, string text, int rowIndex, System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * double * string * int * System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle -> System.Windows.Forms.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

标签应用于的轴范围的最小值。

toPosition
Double

标签应用于的轴范围的最大值。

text
String

标签文本。

rowIndex
Int32

标签行索引。

markStyle
LabelMarkStyle

一个 LabelMarkStyle 枚举值,该值指定标签的标记样式。

返回

新添加 CustomLabel 的对象。

适用于

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

将多个自定义标签添加到集合。 标签将是 DateTime 具有指定间隔类型、文本格式、行索引和标记样式的标签。

public:
 void Add(double labelsStep, System::Windows::Forms::DataVisualization::Charting::DateTimeIntervalType intervalType, System::String ^ format, int rowIndex, System::Windows::Forms::DataVisualization::Charting::LabelMarkStyle markStyle);
public void Add(double labelsStep, System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType intervalType, string format, int rowIndex, System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType * string * int * System.Windows.Forms.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 值,该值确定自定义标签的绘制频率。

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定参数的 labelsStep 度量单位。

format
String

标签文本格式。

rowIndex
Int32

标签行索引。

markStyle
LabelMarkStyle

一个 LabelMarkStyle 枚举值,该值指定标签的标记样式。

适用于

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

使用给定的轴范围、文本、行索引、标记样式和网格刻度类型向集合添加自定义标签。

public:
 System::Windows::Forms::DataVisualization::Charting::CustomLabel ^ Add(double fromPosition, double toPosition, System::String ^ text, int rowIndex, System::Windows::Forms::DataVisualization::Charting::LabelMarkStyle markStyle, System::Windows::Forms::DataVisualization::Charting::GridTickTypes gridTick);
public System.Windows.Forms.DataVisualization.Charting.CustomLabel Add(double fromPosition, double toPosition, string text, int rowIndex, System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle, System.Windows.Forms.DataVisualization.Charting.GridTickTypes gridTick);
override this.Add : double * double * string * int * System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle * System.Windows.Forms.DataVisualization.Charting.GridTickTypes -> System.Windows.Forms.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

标签应用于的轴范围的最小值。

toPosition
Double

标签应用于的轴范围的最大值。

text
String

标签文本。

rowIndex
Int32

标签行索引。

markStyle
LabelMarkStyle

一个 LabelMarkStyle 枚举值,该值指定标签的标记样式。

gridTick
GridTickTypes

一个 GridTickTypes 枚举值,该值指定标签的网格刻度。

返回

新添加 CustomLabel 的对象。

适用于

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

将多个自定义标签添加到集合。 标签将是 DateTime 具有指定间隔类型的标签,将为由 min 参数 max 确定的轴范围生成标签。

public:
 void Add(double labelsStep, System::Windows::Forms::DataVisualization::Charting::DateTimeIntervalType intervalType, double min, double max, System::String ^ format, int rowIndex, System::Windows::Forms::DataVisualization::Charting::LabelMarkStyle markStyle);
public void Add(double labelsStep, System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType intervalType, double min, double max, string format, int rowIndex, System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle);
override this.Add : double * System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType * double * double * string * int * System.Windows.Forms.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 值,该值确定自定义标签的绘制频率。

intervalType
DateTimeIntervalType

一个 DateTimeIntervalType 枚举值,该值确定参数的 labelsStep 度量单位。

min
Double

轴范围的最小值。

max
Double

轴范围的最大值。

format
String

标签文本格式。

rowIndex
Int32

标签行索引。

markStyle
LabelMarkStyle

一个 LabelMarkStyle 枚举值,该值指定标签的标记样式。

适用于