Series 构造函数

定义

初始化 Series 类的新实例。Initializes a new instance of the Series class.

重载

Series()

初始化 Series 类的新实例。Initializes a new instance of the Series class.

Series(String)

使用指定的系列名称初始化 Series 类的新实例。Initializes a new instance of the Series class with the specified series name.

Series(String, Int32)

使用指定的名称和最大数目的 Y 值初始化 Series 类的新实例。Initializes a new instance of the Series class with the specified name and maximum number of Y values.

Series()

初始化 Series 类的新实例。Initializes a new instance of the Series class.

public:
 Series();
public Series ();
Public Sub New ()

Series(String)

使用指定的系列名称初始化 Series 类的新实例。Initializes a new instance of the Series class with the specified series name.

public:
 Series(System::String ^ name);
public Series (string name);
new System.Web.UI.DataVisualization.Charting.Series : string -> System.Web.UI.DataVisualization.Charting.Series
Public Sub New (name As String)

参数

name
String

将创建的 Series 对象的名称。The name of the Series object that will be created. 该名称必须为唯一名称,否则将引发异常。This must be a unique name, otherwise an exception will be thrown.

注解

此构造函数可用于创建Series类的新实例。This constructor can be used to create a new instance of the Series class.

备注

此序列仅能存储DataPoint具有一个 Y 值的对象。This series is only capable of storing DataPoint objects that have one Y-value. 如果将具有多个 Y 值的数据点添加到此序列, 则会引发异常。If a data point that has multiple Y-values is added to this series, an exception will be thrown.

若要在运行时创建一个序列, 请Add使用方法。To create a series at run time, use the Add method.

Series(String, Int32)

使用指定的名称和最大数目的 Y 值初始化 Series 类的新实例。Initializes a new instance of the Series class with the specified name and maximum number of Y values.

public:
 Series(System::String ^ name, int yValues);
public Series (string name, int yValues);
new System.Web.UI.DataVisualization.Charting.Series : string * int -> System.Web.UI.DataVisualization.Charting.Series
Public Sub New (name As String, yValues As Integer)

参数

name
String

将创建的 Series 对象的名称。The name of the Series object that will be created.

yValues
Int32

属于此系列的 DataPoint 对象最多可拥有的 Y 值数。The maximum number of Y-values allowed for the DataPoint objects that belong to this series.

注解

使用此构造函数创建并初始化Series类的新实例。Use this constructor to create and initialize a new instance of the Series class.

重要

此序列将只能存储DataPointyValues参数设置的最大值更多的对象。This series will only be able to store DataPoint objects that do not have more Y-values than the maximum set by the yValues parameter. 如果添加的数据点的 Y 值超过设置的最大值, 则会引发异常。If you add a data point that has more Y-values than the set maximum, an exception will be thrown.

若要在Series运行时创建对象, 还Add可以Insert使用序列集合属性的和方法。To create a Series object at run time, the Add and Insert methods of the Series collection property can also be used.

适用于