DataPoint 類別

定義

表示儲存在 DataPointCollection 類別中的資料點。

public ref class DataPoint : System::Windows::Forms::DataVisualization::Charting::DataPointCustomProperties
[System.ComponentModel.TypeConverter("System.Windows.Forms.Design.DataVisualization.Charting.DataPointConverter, System.Windows.Forms.DataVisualization.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
public class DataPoint : System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties
[<System.ComponentModel.TypeConverter("System.Windows.Forms.Design.DataVisualization.Charting.DataPointConverter, System.Windows.Forms.DataVisualization.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")>]
type DataPoint = class
    inherit DataPointCustomProperties
Public Class DataPoint
Inherits DataPointCustomProperties
繼承
屬性

備註

類別 DataPoint 會儲存與資料以及資料點值相關聯的屬性。 例如,資料點具有值,但它也有色彩屬性、背景影像屬性、背景漸層屬性等等。 如需資料點屬性的詳細資訊,請參閱 DataPointCustomProperties 類別概觀主題。

每個資料點都包含 X 值和一個或多個 Y 值。 X 值可以是零,或者您可以明確設定此值。

泡泡圖、走勢圖和股票圖以外的所有圖表類型只需要一個 Y 值。 這些圖表類型需要多個 Y 值,因為一個資料點是由多個值所組成。 例如,若要繪製一個股票圖表直條圖,需要四個值:高、低、開啟和關閉值。

資料可以在設計階段或執行時間新增;您也可以在執行時間使用資料系結。

建構函式

DataPoint()

初始化 DataPoint 類別的新執行個體。

DataPoint(Double, Double)

使用指定的 X 和 Y 值,初始化 DataPoint 類別的新執行個體。

DataPoint(Double, Double[])

使用指定的 X 值和 Y 值陣列,初始化 DataPoint 類別的新執行個體。

DataPoint(Double, String)

使用指定的 X 值和 Y 值,初始化 DataPoint 類別的新執行個體。

DataPoint(Series)

初始化 DataPoint 類別的新執行個體,並設定資料點所屬的 Series

屬性

AxisLabel

取得或設定資料點、數列或空點之 X 軸標籤的文字。 這個屬性只有在尚未針對相關的 Axis 物件指定自訂標籤時才能使用。

(繼承來源 DataPointCustomProperties)
BackGradientStyle

取得或設定背景漸層樣式。

(繼承來源 DataPointCustomProperties)
BackHatchStyle

取得或設定背景影線樣式。

(繼承來源 DataPointCustomProperties)
BackImage

取得或設定資料點的背景影像。

(繼承來源 DataPointCustomProperties)
BackImageAlignment

取得或設定搭配 Unscaled 繪製模式使用之背景影像的對齊方式。

(繼承來源 DataPointCustomProperties)
BackImageTransparentColor

取得或設定繪製背景影像時,會被透明色彩取代的色彩。

(繼承來源 DataPointCustomProperties)
BackImageWrapMode

取得或設定背景影像的繪製模式。

(繼承來源 DataPointCustomProperties)
BackSecondaryColor

取得或設定次要背景色彩。

(繼承來源 DataPointCustomProperties)
BorderColor

取得或設定資料點的框線色彩。

(繼承來源 DataPointCustomProperties)
BorderDashStyle

取得或設定資料點的框線樣式。

(繼承來源 DataPointCustomProperties)
BorderWidth

取得或設定資料點的框線寬度。

(繼承來源 DataPointCustomProperties)
Color

取得或設定資料點的色彩。

(繼承來源 DataPointCustomProperties)
CustomProperties

取得或設定資料點的自訂屬性。 您可使用下列格式來指定自訂屬性:AttrName1=Value1, AttrName2=Value2 ...

(繼承來源 DataPointCustomProperties)
CustomPropertiesExtended

取得或設定資料點的擴充自訂屬性。 您可以使用下列格式指定擴充自訂屬性:AttrName1=Value1, AttrName2=Value2…

(繼承來源 DataPointCustomProperties)
Font

取得或設定資料點的字型。

(繼承來源 DataPointCustomProperties)
IsEmpty

取得或設定旗標,這個旗標表示資料點是否標記為空白。

IsValueShownAsLabel

取得或設定旗標,這個旗標表示是否要在標籤上顯示資料點的值。

(繼承來源 DataPointCustomProperties)
IsVisibleInLegend

取得或設定旗標,這個旗標表示項目是否會顯示在圖例中。

(繼承來源 DataPointCustomProperties)
Item[Int32]

依據 DataPointCustomProperties 物件在索引中的位置取得這個物件。

(繼承來源 DataPointCustomProperties)
Item[String]

依名稱取得或設定 DataPointCustomProperties 物件。

(繼承來源 DataPointCustomProperties)
Label

取得或設定資料點標籤的文字。

(繼承來源 DataPointCustomProperties)
LabelAngle

取得或設定資料點標籤的角度。

(繼承來源 DataPointCustomProperties)
LabelBackColor

取得或設定資料點標籤的背景色彩。

(繼承來源 DataPointCustomProperties)
LabelBorderColor

取得或設定資料點標籤的框線色彩。

(繼承來源 DataPointCustomProperties)
LabelBorderDashStyle

取得或設定標籤的框線樣式。

(繼承來源 DataPointCustomProperties)
LabelBorderWidth

取得或設定標籤的框線寬度。

(繼承來源 DataPointCustomProperties)
LabelForeColor

取得或設定標籤的文字色彩。

(繼承來源 DataPointCustomProperties)
LabelFormat

取得或設定資料點標籤的格式。

(繼承來源 DataPointCustomProperties)
LabelToolTip

取得或設定資料點標籤的工具提示。

(繼承來源 DataPointCustomProperties)
LegendText

取得或設定圖例中項目的文字。

(繼承來源 DataPointCustomProperties)
LegendToolTip

取得或設定圖例中項目的工具提示。

(繼承來源 DataPointCustomProperties)
MarkerBorderColor

取得或設定標記的框線色彩。

(繼承來源 DataPointCustomProperties)
MarkerBorderWidth

取得或設定標記的框線寬度。

(繼承來源 DataPointCustomProperties)
MarkerColor

取得或設定標記色彩。

(繼承來源 DataPointCustomProperties)
MarkerImage

取得或設定標記影像。

(繼承來源 DataPointCustomProperties)
MarkerImageTransparentColor

取得或設定繪製標記影像時,會以透明色彩取代的色彩。

(繼承來源 DataPointCustomProperties)
MarkerSize

取得或設定標記的大小。

(繼承來源 DataPointCustomProperties)
MarkerStyle

取得或設定標記樣式。

(繼承來源 DataPointCustomProperties)
Name

取得或設定資料點的名稱。

Tag

取得或設定與這個圖表項目關聯的物件。

(繼承來源 ChartElement)
ToolTip

取得或設定工具提示。

(繼承來源 DataPointCustomProperties)
XValue

取得或設定資料點的 X 值。

YValues

取得或設定資料點的 Y 值。

方法

Clone()

傳回與資料點完全相同的新執行個體。

DeleteCustomProperty(String)

刪除具有指定名稱的資料點自訂屬性。

(繼承來源 DataPointCustomProperties)
Dispose()

釋放 ChartElement 使用的資源。

(繼承來源 ChartElement)
Dispose(Boolean)

釋放 ChartElement 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

(繼承來源 ChartElement)
Equals(Object)

判斷指定的 Object 是否等於目前的 ChartElement

(繼承來源 ChartElement)
GetCustomProperty(String)

傳回具有指定名稱的資料點自訂屬性。

(繼承來源 DataPointCustomProperties)
GetHashCode()

傳回特定型別的雜湊函式。

(繼承來源 ChartElement)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetValueByName(String)

傳回由其名稱所指定的資料點。 這是 Helper 函式。

IsCustomPropertySet(String)

判斷是否已設定具有指定名稱的資料點自訂屬性。

(繼承來源 DataPointCustomProperties)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ResetIsValueShownAsLabel()

將自訂屬性重設為其預設值。

(繼承來源 DataPointCustomProperties)
ResetIsVisibleInLegend()

將自訂屬性重設為其預設值。

(繼承來源 DataPointCustomProperties)
SetCustomProperty(String, String)

設定資料點的自訂屬性。

(繼承來源 DataPointCustomProperties)
SetDefault(Boolean)

設定資料點的預設屬性。 表示是否必須清除先前的屬性值。

(繼承來源 DataPointCustomProperties)
SetValueXY(Object, Object[])

設定資料點的 X 值和一個或多個 Y 值。

SetValueY(Object[])

設定單一資料點的 Y 值。

ToString()

傳回表示目前 Object 的字串。

(繼承來源 ChartElement)

適用於