CustomLabelsCollection.Add 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
新增一個 CustomLabel 物件到集合中。
多載
| 名稱 | Description |
|---|---|
| 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指定區間類型的標籤,並會根據由 and |
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)
參數
- intervalType
- DateTimeIntervalType
一個 DateTimeIntervalType 決定區間類型的枚舉值。
備註
此 Add 方法為軸的整個第一標籤列建立並初始 CustomLabel 化物件 DateTime ,標籤為指定類型的軸。
參數 labelsStep 決定自訂標籤繪製的頻率。
Note
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 的物品。
備註
在相關軸的第一列標籤列新增一個自訂標籤。 不使用標籤標記。
如果在第一列使用自訂標籤,該第一列不會自動產生標籤。
Note
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)
參數
- intervalType
- DateTimeIntervalType
一個 DateTimeIntervalType 列舉值,用以決定參數的度量 labelsStep 單位。
- format
- String
一個決定自訂標籤格式的值。
備註
此方法為軸的整個第一標籤列建立並初始 CustomLabel 化物件,並使用 DateTime 指定類型的標籤。
此步驟決定自訂標籤繪製的頻率,並可指定可選的標籤格式。
Note
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)
參數
- 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指定區間類型的標籤,並會根據由 and 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)
參數
- intervalType
- DateTimeIntervalType
一個 DateTimeIntervalType 列舉值,用以決定參數的度量 labelsStep 單位。
- min
- Double
軸距的最小值。
- max
- Double
軸域的最大值。
- format
- String
標籤文字格式。
- rowIndex
- Int32
標籤列索引。
- markStyle
- LabelMarkStyle
一個 LabelMarkStyle 列舉值,指定標籤的標記風格。