DataPoint 类
定义
表示存储在 DataPointCollection 类中的数据点。Represents a data point that is stored in the DataPointCollection class.
public ref class DataPoint : System::Web::UI::DataVisualization::Charting::DataPointCustomProperties
[System.ComponentModel.TypeConverter("System.Web.UI.Design.DataVisualization.Charting.DataPointConverter, System.Web.DataVisualization.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
[System.Web.UI.Themeable(false)]
public class DataPoint : System.Web.UI.DataVisualization.Charting.DataPointCustomProperties
[<System.ComponentModel.TypeConverter("System.Web.UI.Design.DataVisualization.Charting.DataPointConverter, System.Web.DataVisualization.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")>]
[<System.Web.UI.Themeable(false)>]
type DataPoint = class
inherit DataPointCustomProperties
Public Class DataPoint
Inherits DataPointCustomProperties
- 继承
- 属性
注解
DataPoint类存储与数据关联的属性以及数据点值。The DataPoint class stores properties associated with data as well as data point values. 例如,数据点具有一个值,但是它还具有一个颜色属性、背景图像属性、背景渐变属性等。For example, a data point has a value, but it also has a color property, background image property, background gradient property, and so forth. 有关数据点属性的详细信息,请参阅 DataPointCustomProperties 类概述主题。For more information about data point properties, see the DataPointCustomProperties class overview topic.
每个数据点包含一个 X 值和一个或多个 Y 值。Each data point consists of an X-value and one or more Y-values. X 值可以是零,也可以进行显式设置。The X-value can be zero, or you can set this explicitly.
除气泡图、k 线图图和股价图外,所有图表类型仅需要一个 Y 值。Only one Y-value per point is required for all chart types except bubble, candlestick and stock charts. 由于一个数据点包含多个值,因此这些图表类型需要多个 Y 值。These chart types require more than one Y-value because one data point consists of multiple values. 例如,若要绘制一个股价图列,需要四个值:高、低、开盘和收盘值。For example, to plot one stock chart column, four values are required: high, low, open and close values.
可以在设计时或运行时添加数据;您还可以在运行时使用数据绑定。Data can be added at either design time or run time; you can also use data-binding at run time.
构造函数
| DataPoint() |
初始化 DataPoint 类的新实例。Initializes a new instance of the DataPoint class. |
| DataPoint(Double, Double) |
用指定的 X 和 Y 值初始化 DataPoint 类的新实例。Initializes a new instance of the DataPoint class with the specified X and Y-value. |
| DataPoint(Double, Double[]) |
用一个指定的 X 值和一个 Y 值数组初始化 DataPoint 类的新实例。Initializes a new instance of the DataPoint class with the specified X-value and an array of Y-values. |
| DataPoint(Double, String) |
用一个指定的 X 值和多个 Y 值初始化 DataPoint 类的新实例。Initializes a new instance of the DataPoint class with the specified X-value and Y-values. |
| DataPoint(Series) |
初始化 DataPoint 类的新实例,并设置该数据点所属的 Series。Initializes a new instance of the DataPoint class, and sets the Series that the data point belongs to. |
属性
| AxisLabel |
获取或设置数据点、序列或空点的 X 轴标签的文本。Gets or sets the text of the X-axis label for the data point, series or an empty point. 仅当尚未指定相关 Axis 对象的自定义标签时,才使用此属性。This property is only used if a custom label has not been specified for the relevant Axis object. (继承自 DataPointCustomProperties) |
| BackGradientStyle |
获取或设置背景渐变样式。Gets or sets the background gradient style. (继承自 DataPointCustomProperties) |
| BackHatchStyle |
获取或设置背景阴影样式。Gets or sets the background hatching style. (继承自 DataPointCustomProperties) |
| BackImage |
获取或设置数据点的背景图像。Gets or sets the background image of the data point. (继承自 DataPointCustomProperties) |
| BackImageAlignment |
获取或设置用于 Unscaled 绘制模式的背景图像对齐方式。Gets or sets the alignment of the background image, which is used with the Unscaled drawing mode. (继承自 DataPointCustomProperties) |
| BackImageTransparentColor |
获取或设置在绘制背景图像时,将替换为透明色的颜色。Gets or sets a color that will be replaced with a transparent color when the background image is drawn. (继承自 DataPointCustomProperties) |
| BackImageWrapMode |
获取或设置背景图像的绘制模式。Gets or sets the drawing mode of the background image. (继承自 DataPointCustomProperties) |
| BackSecondaryColor |
获取或设置辅助背景色。Gets or sets the secondary background color. (继承自 DataPointCustomProperties) |
| BorderColor |
获取或设置数据点的边框颜色。Gets or sets the border color of the data point. (继承自 DataPointCustomProperties) |
| BorderDashStyle |
获取或设置数据点的边框样式。Gets or sets the border style of the data point. (继承自 DataPointCustomProperties) |
| BorderWidth |
获取或设置数据点的边框宽度。Gets or sets the border width of the data point. (继承自 DataPointCustomProperties) |
| Color |
获取或设置数据点的颜色。Gets or sets the color of the data point. (继承自 DataPointCustomProperties) |
| CustomProperties |
获取或设置数据点的自定义属性。Gets or sets the custom properties of the data point. 可按以下格式指定自定义属性:特性名1=值1, 特性名2=值2, ...Custom properties can be specified in the following format: AttrName1=Value1, AttrName2=Value2, ... (继承自 DataPointCustomProperties) |
| CustomPropertiesExtended |
获取或设置数据点的扩展的自定义属性。Gets or sets the extended custom properties of the data point. (继承自 DataPointCustomProperties) |
| Font |
获取或设置数据点的字体。Gets or sets the font of the data point. (继承自 DataPointCustomProperties) |
| IsEmpty |
获取或设置一个指示数据点是否标记为空的标志。Gets or sets a flag that indicates whether a data point is marked as empty. |
| IsValueShownAsLabel |
获取或设置一个标志,该标志指示是否在标签上显示数据点的值。Gets or sets a flag that indicates whether to show the value of the data point on the label. (继承自 DataPointCustomProperties) |
| IsVisibleInLegend |
获取或设置一个标志,该标志指示是否在图例中显示项。Gets or sets a flag that indicates whether the item is shown in the legend. (继承自 DataPointCustomProperties) |
| Item[Int32] |
按 DataPointCustomProperties 对象在集合中的位置获取该对象。Gets the DataPointCustomProperties object by its position in the collection. (继承自 DataPointCustomProperties) |
| Item[String] |
按名称获取或设置 DataPointCustomProperties 对象。Gets or sets the DataPointCustomProperties object by name. (继承自 DataPointCustomProperties) |
| Label |
获取或设置数据点标签的文本。Gets or sets the text of the data point label. (继承自 DataPointCustomProperties) |
| LabelAngle |
获取或设置数据点标签的角度。Gets or sets the angle of the data point label. (继承自 DataPointCustomProperties) |
| LabelBackColor |
获取或设置数据点标签的背景色。Gets or sets the background color of the data point label. (继承自 DataPointCustomProperties) |
| LabelBorderColor |
获取或设置数据点标签的边框颜色。Gets or sets the border color of the data point label. (继承自 DataPointCustomProperties) |
| LabelBorderDashStyle |
获取或设置标签的边框样式。Gets or sets the border style of the label. (继承自 DataPointCustomProperties) |
| LabelBorderWidth |
获取或设置标签边框的宽度。Gets or sets the width of the label border. (继承自 DataPointCustomProperties) |
| LabelForeColor |
获取或设置标签的文本颜色。Gets or sets the text color of the label. (继承自 DataPointCustomProperties) |
| LabelFormat |
获取或设置数据点标签的格式。Gets or sets the format of the data point label. (继承自 DataPointCustomProperties) |
| LabelMapAreaAttributes |
获取或设置数据点标签的映射区特性。Gets or sets the map area attributes of the data point label. (继承自 DataPointCustomProperties) |
| LabelPostBackValue |
获取或设置在发生 Click 事件时,可以处理的回发值。Gets or sets the postback value which can be processed on a Click event. (继承自 DataPointCustomProperties) |
| LabelToolTip |
获取或设置数据点标签的工具提示。Gets or sets the tooltip for the data point label. (继承自 DataPointCustomProperties) |
| LabelUrl |
获取或设置数据点标签的 URL 目标。Gets or sets the URL target of the data point label. (继承自 DataPointCustomProperties) |
| LegendMapAreaAttributes |
获取或设置图例映射区的特性。Gets or sets the attributes of the legend map area. (继承自 DataPointCustomProperties) |
| LegendPostBackValue |
获取或设置在发生 Click 事件时,可以处理的回发值。Gets or sets the postback value which can be processed on a Click event. (继承自 DataPointCustomProperties) |
| LegendText |
获取或设置图例中项的文本。Gets or sets the text of the item in the legend. (继承自 DataPointCustomProperties) |
| LegendToolTip |
获取或设置图例中项的工具提示。Gets or sets the tooltip of the item in the legend. (继承自 DataPointCustomProperties) |
| LegendUrl |
获取或设置图例中项的 URL 目标。Gets or sets the URL target of the item in the legend. (继承自 DataPointCustomProperties) |
| MapAreaAttributes |
获取或设置数据点的映射区特性。Gets or sets the map area attributes of a data point. (继承自 DataPointCustomProperties) |
| MarkerBorderColor |
获取或设置标记的边框颜色。Gets or sets the border color of the marker. (继承自 DataPointCustomProperties) |
| MarkerBorderWidth |
获取或设置标记的边框宽度。Gets or sets the border width of the marker. (继承自 DataPointCustomProperties) |
| MarkerColor |
获取或设置标记颜色。Gets or sets the marker color. (继承自 DataPointCustomProperties) |
| MarkerImage |
获取或设置标记图像。Gets or sets the marker image. (继承自 DataPointCustomProperties) |
| MarkerImageTransparentColor |
获取或设置在绘制标记图像时,将替换为透明色的颜色。Gets or sets the color that will be replaced with a transparent color when the marker image is drawn. (继承自 DataPointCustomProperties) |
| MarkerSize |
获取或设置标记的大小。Gets or sets the size of the marker. (继承自 DataPointCustomProperties) |
| MarkerStyle |
获取或设置标记样式。Gets or sets the marker style. (继承自 DataPointCustomProperties) |
| Name |
获取或设置数据点的名称。Gets or sets the name of the data point. |
| PostBackValue |
获取或设置在发生 Click 事件时,可以处理的回发值。Gets or sets the postback value that can be processed on a Click event. (继承自 DataPointCustomProperties) |
| Tag |
获取或设置与此图表元素关联的对象。Gets or sets an object associated with this chart element. (继承自 ChartElement) |
| ToolTip |
获取或设置数据点的工具提示。Gets or sets the tooltip of the data point. (继承自 DataPointCustomProperties) |
| Url |
获取或设置区域的 URL 目标。Gets or sets the URL target of the area. (继承自 DataPointCustomProperties) |
| XValue |
获取或设置数据点的 X 值。Gets or sets the X-value of a data point. |
| YValues |
获取或设置数据点的 Y 值。Gets or sets the Y-value(s) of a data point. |
方法
| Clone() |
返回数据点的精确副本。Returns an exact copy of the data point. |
| DeleteCustomProperty(String) |
删除具有指定名称的数据点自定义属性。Deletes the data point custom property with the specified name. (继承自 DataPointCustomProperties) |
| Dispose() |
释放由 ChartElement 占用的资源。Releases the resources used by the ChartElement. (继承自 ChartElement) |
| Dispose(Boolean) |
释放由 ChartElement 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources. (继承自 ChartElement) |
| Equals(Object) |
确定指定的 Object 是否等同于当前的 ChartElement。Determines whether the specified Object is equal to the current ChartElement. (继承自 ChartElement) |
| GetCustomProperty(String) |
返回具有指定名称的数据点自定义属性。Returns the data point custom property with the specified name. (继承自 DataPointCustomProperties) |
| GetHashCode() |
返回特定类型的哈希算法。Returns a hash function for a particular type. (继承自 ChartElement) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| GetValueByName(String) |
返回按名称指定的数据点。Returns a data point that is specified by its name. 这是一个帮助器函数。This is a helper function. |
| IsCustomPropertySet(String) |
确定是否已设置具有指定名称的自定义属性。Determines whether a custom property with the specified name was set. (继承自 DataPointCustomProperties) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ResetIsValueShownAsLabel() |
将 IsValueShownAsLabel 属性重置为其默认值。Resets the IsValueShownAsLabel property to its default value. (继承自 DataPointCustomProperties) |
| ResetIsVisibleInLegend() |
将 IsVisibleInLegend 属性重置为其默认值。Resets the IsVisibleInLegend property to its default value. (继承自 DataPointCustomProperties) |
| SetCustomProperty(String, String) |
设置数据点的自定义属性。Sets a custom property of the data point. (继承自 DataPointCustomProperties) |
| SetDefault(Boolean) |
设置数据点的默认属性。Sets the default properties of the data point. 指示是否必须清除以前的属性值。Indicates whether the previous property values must be cleared. (继承自 DataPointCustomProperties) |
| SetValueXY(Object, Object[]) |
设置数据点的 X 值以及一个或多个 Y 值。Sets the X-value and one or more Y-values of the data point. |
| SetValueY(Object[]) |
设置单个数据点的 Y 值。Sets the Y-value(s) of a single data point. |
| ToString() |
返回表示当前 Object 的字符串。Returns a string that represents the current Object. (继承自 ChartElement) |