DataPoint.XValue 属性
定义
获取或设置数据点的 X 值。Gets or sets the X-value of a data point.
public:
property double XValue { double get(); void set(double value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.DataPointValueConverter))]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)]
public double XValue { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.DataPointValueConverter))>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)>]
member this.XValue : double with get, set
Public Property XValue As Double
属性值
一个 double,它表示数据点的 X 值。A double that represents the X-value of a data point.
- 属性
注解
所有图表类型都可以显示为散点图或非散点图,因为可以同时设置 X 值和 Y 值。All chart types can be displayed as either scatter plots or as non-scatter plots, because both X-values and Y-values can be set. 设置 X 值将导致散点图,而不设置此属性-这等效于将其设置为零,这将导致非散点图。Setting an X-value will result in a scatter plot, whereas not setting this property - which is equivalent to setting it to zero - will result in a non-scatter plot. 例如,若要绘制点图类型,请添加值为零的数据点。For example, to draw a point chart type, add data points that have X-values of zero. 若要显示传统散点图,请添加具有非零 X 值的数据点。To display a traditional scatter chart, add data points that have X-values other than zero.
不需要设置数据点的 X 值。The X-values of data points are not required to be set. 如果未设置这些值,则数据点将按顺序绘制,并使用其索引值 DataPointCollection 。If they are not set, data points are plotted sequentially, using their index values from the DataPointCollection.