Editar

Compartilhar via


CustomLabelsCollection.Add Method

Definition

Adds a CustomLabel object to the collection.

Overloads

Add(Double, DateTimeIntervalType)

Adds multiple CustomLabel objects of type DateTime to the collection. Populates the entire first row of an axis with labels.

Add(Double, Double, String)

Adds a CustomLabel object to the collection, using the given axis range and text.

Add(Double, DateTimeIntervalType, String)

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. 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. 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)

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::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)

Parameters

labelsStep
Double

A Double value that determines how often the custom labels will be drawn.

intervalType
DateTimeIntervalType

A DateTimeIntervalType enumeration value that determines the interval type.

Remarks

The Add method creates and initializes CustomLabel objects for the entire first label row of an axis with DateTime labels of the specified type.

The labelsStep parameter determines how often the custom labels will be drawn.

Note

The RecalculateAxesScale method must be called prior to calling this particular method definition.

Applies to

Add(Double, Double, String)

Adds a CustomLabel object to the collection, using the given axis range and text.

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

Parameters

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.

Returns

The newly added CustomLabel object.

Remarks

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.

Note

The RecalculateAxesScale method must be called prior to calling this particular method definition.

Applies to

Add(Double, DateTimeIntervalType, String)

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::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)

Parameters

labelsStep
Double

A Double value that determines how often custom labels will be drawn.

intervalType
DateTimeIntervalType

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.

Remarks

This 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.

Note

The RecalculateAxesScale method must be called prior to calling this particular method definition.

Applies to

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::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

Parameters

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

A LabelMarkStyle enumeration value that specifies mark style for the label.

Returns

The newly added CustomLabel object.

Applies to

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

Adds multiple custom labels to the collection. The labels will be DateTime labels with the specified interval type, text format, row index and marking style.

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)

Parameters

labelsStep
Double

A Double value that determines how often custom labels will be drawn.

intervalType
DateTimeIntervalType

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

A LabelMarkStyle enumeration value that specifies mark style for the label.

Applies to

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::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

Parameters

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

A LabelMarkStyle enumeration value that specifies mark style for the label.

gridTick
GridTickTypes

A GridTickTypes enumeration value that specifies the grid tick for the label.

Returns

The newly added CustomLabel object.

Applies to

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

Adds multiple custom labels to the collection. 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::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)

Parameters

labelsStep
Double

A Double value that determines how often custom labels will be drawn.

intervalType
DateTimeIntervalType

A DateTimeIntervalType enumeration value that determines the unit of measure for the labelsStep parameter.

min
Double

The minimum value for the axis range.

max
Double

The maximum value for the axis range.

format
String

The label text format.

rowIndex
Int32

The label row index.

markStyle
LabelMarkStyle

A LabelMarkStyle enumeration value that specifies mark style for the label.

Applies to