DataPointCollection 类

定义

表示 DataPoint 对象集合。Represents a collection of DataPoint objects.

public ref class DataPointCollection : System::Web::UI::DataVisualization::Charting::ChartElementCollection<System::Web::UI::DataVisualization::Charting::DataPoint ^>
[System.Web.UI.Themeable(false)]
public class DataPointCollection : System.Web.UI.DataVisualization.Charting.ChartElementCollection<System.Web.UI.DataVisualization.Charting.DataPoint>
type DataPointCollection = class
    inherit ChartElementCollection<DataPoint>
Public Class DataPointCollection
Inherits ChartElementCollection(Of DataPoint)
继承
属性

注解

类表示DataPoint对象的集合,这些对象又表示属于Series对象的数据点。 DataPointCollectionThe DataPointCollection class represents a collection of DataPoint objects, which in turn represent the data points that are part of a Series object.

此集合类作为Points Series对象的属性实现。This collection class is implemented as the Points property of a Series object.

DataPoint对象可以追加或插入到集合中,其 X 值和 Y 值已指定为参数。DataPoint objects can be appended or inserted into the collection with their X-value and Y-value(s) already specified as parameters. 请注意,当使用DataBindYDataBindXY方法将系列绑定到数据源时,也会自动添加它们。Note that they are also added automatically when a series is bound to a data source using either the DataBindY or DataBindXY method.

仅当集合所属IsXValueIndexed的序列的属性设置为true (默认值为false),或者所有数据点的所有 X 值都为零时,才会按其在此集合中出现的顺序绘制数据点。Data points are plotted in the order that they occur in this collection only if the series that the collection belongs to has its IsXValueIndexed property set to true (the default value is false), or if all X-values for all data points are zero. 否则,将使用其 X 值绘制数据点。Otherwise data points are plotted using their X-values.

可以分别使用重载FindMaxValue FindMinValue的或FindValue方法,查找数据点并根据最小值、最小值或指定的 X 或 Y 值进行操作。Data points can be located, and manipulated, based on maximum, minimum or specified X or Y-values using the overloaded FindMaxValue, FindMinValue or FindValue methods, respectively.

" DataPointCollection " 属性指示集合中的总项数,通常用于查找集合的上限。The DataPointCollection.Count property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection.

属性

Count

获取 Collection<T> 中实际包含的元素数。Gets the number of elements actually contained in the Collection<T>.

(继承自 Collection<T>)
Item[Int32]

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

(继承自 Collection<T>)
Items

获取 IList<T> 周围的 Collection<T> 包装。Gets a IList<T> wrapper around the Collection<T>.

(继承自 Collection<T>)

方法

Add(Double[])

向集合中添加一个新的 DataPoint 对象并设置其 Y 值。Adds a new DataPoint object to the collection and sets its Y value.

Add(T)

将对象添加到 Collection<T> 的结尾处。Adds an object to the end of the Collection<T>.

(继承自 Collection<T>)
AddXY(Double, Double)

向集合的末尾添加一个具有指定的 X 值和 Y 值的 DataPoint 对象。Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value.

AddXY(Object, Object[])

向集合的末尾添加一个具有指定的 X 值和 Y 值的 DataPoint 对象。Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value(s).

AddY(Double)

向集合的末尾添加一个具有指定 Y 值的 DataPoint 对象。Adds a DataPoint object to the end of the collection, with the specified Y-value.

AddY(Object[])

向集合的末尾添加一个具有指定 Y 值的 DataPoint 对象。Adds a DataPoint object to the end of the collection, with the specified Y-value(s).

Clear()

Collection<T> 中移除所有元素。Removes all elements from the Collection<T>.

(继承自 Collection<T>)
ClearItems()

Collection<T> 中移除所有元素。Removes all elements from the Collection<T>.

(继承自 ChartElementCollection<T>)
Contains(T)

确定某元素是否在 Collection<T> 中。Determines whether an element is in the Collection<T>.

(继承自 Collection<T>)
CopyTo(T[], Int32)

从目标数组的指定索引处开始将整个 Collection<T> 复制到兼容的一维 ArrayCopies the entire Collection<T> to a compatible one-dimensional Array, starting at the specified index of the target array.

(继承自 Collection<T>)
DataBind(IEnumerable, String, String, String)

将数据点的 X 值、Y 值和属性值(如 Tooltip 或 LabelStyle)绑定到数据源的数据。Data binds the X-value, Y-value(s) and property values of the data points, such as Tooltip or LabelStyle, to the data source.

DataBindXY(IEnumerable, IEnumerable[])

将集合数据点的 X 值和 Y 值绑定到指定数据源第一列的数据。Data binds the X-value and Y-values of the collection's data points to the first columns of the specified data source.

DataBindXY(IEnumerable, String, IEnumerable, String)

将集合中数据点的 X 值和 Y 值绑定到指定数据源的指定列的数据。Data binds the X-value and Y-values of the data points in the collection to the specified columns of the specified data sources.

DataBindY(IEnumerable, String)

将数据点的 Y 值绑定到指定数据源的指定列的数据。Data binds the Y-value(s) of the data points to the specified column(s) of the specified data source.

DataBindY(IEnumerable[])

将集合数据点的 Y 值绑定到指定数据源第一列的数据。Data binds the Y-value(s) of the collection's data points to the first column of the specified data source(s).

Dispose()

释放由 ChartElementCollection<T> 占用的资源。Releases the resources used by the ChartElementCollection<T>.

(继承自 ChartElementCollection<T>)
Dispose(Boolean)

释放由 ChartElementCollection<T> 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the ChartElementCollection<T> and optionally releases the managed resources.

(继承自 ChartElementCollection<T>)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
FindAllByValue(Double)

查找等于指定值的所有数据点。Find all the data points that are equal to the specified value.

FindAllByValue(Double, String)

查找等于指定值的所有数据点。Finds all the data points that are equal to the specified value.

FindAllByValue(Double, String, Int32)

从指定索引位置查找等于指定值的所有数据点。Finds all the data points that are equal to the specified value, starting from the specified index location.

FindByValue(Double)

查找等于指定值的第一个数据点。Finds the first data point that is equal to the specified value.

FindByValue(Double, String)

查找等于指定值的第一个数据点。Finds the first data point that is equal to the specified value.

FindByValue(Double, String, Int32)

从指定索引位置查找等于指定值的第一个数据点。Finds the first data point that is equal to the specified value, starting from the specified index location.

FindMaxByValue()

查找具有最大值的数据点。Finds the data point with the maximum value.

FindMaxByValue(String)

查找具有最大值的数据点值。Finds the data point value with the maximum value.

FindMaxByValue(String, Int32)

从指定索引位置查找具有最大值的数据点。Finds the data point with the maximum value, starting from the specified index location.

FindMinByValue()

查找具有最小值的数据点。Finds the data point with the minimum value.

FindMinByValue(String)

查找具有最小值的数据点。Finds the data point with the minimum value.

FindMinByValue(String, Int32)

从指定索引位置查找具有最小值的数据点。Finds the data point with the minimum value, starting from the specified index location.

GetEnumerator()

返回循环访问 Collection<T> 的枚举器。Returns an enumerator that iterates through the Collection<T>.

(继承自 Collection<T>)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(T)

搜索指定的对象,并返回整个 Collection<T> 中第一个匹配项的从零开始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<T>.

(继承自 Collection<T>)
Insert(Int32, T)

将元素插入 Collection<T> 的指定索引处。Inserts an element into the Collection<T> at the specified index.

(继承自 Collection<T>)
InsertItem(Int32, T)

将元素插入 Collection<T> 的指定索引位置。Inserts an element into the Collection<T> at the specified index location.

(继承自 ChartElementCollection<T>)
InsertXY(Int32, Object, Object[])

插入具有指定 X 值和一个或多个指定 Y 值的数据点。Inserts a data point with the specified X value and one or more specified Y values.

InsertY(Int32, Object[])

插入具有一个或多个指定 Y 值的数据点。Inserts a data point with one or more specified Y values.

Invalidate()

强制使父图表元素无效。Forces the invalidation of the parent chart element.

(继承自 ChartElementCollection<T>)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(T)

Collection<T> 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the Collection<T>.

(继承自 Collection<T>)
RemoveAt(Int32)

移除 Collection<T> 的指定索引处的元素。Removes the element at the specified index of the Collection<T>.

(继承自 Collection<T>)
RemoveItem(Int32)

移除 Collection<T> 中位于指定索引位置的元素。Removes the element at the specified index location of the Collection<T>.

(继承自 ChartElementCollection<T>)
ResumeUpdates()

使集合中的图表元素继续无效。Resumes the invalidation of a chart element in the collection.

(继承自 ChartElementCollection<T>)
SetItem(Int32, T)

替换指定索引位置的元素。Replaces the element at the specified index location.

(继承自 ChartElementCollection<T>)
SuspendUpdates()

挂起集合中图表元素的无效处理。Suspends the invalidation of a chart element in the collection.

(继承自 ChartElementCollection<T>)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

从特定的 ICollection 索引处开始,将 Array的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index.

(继承自 Collection<T>)
ICollection.IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(继承自 Collection<T>)
ICollection.SyncRoot

获取可用于同步对 ICollection 的访问的对象。Gets an object that can be used to synchronize access to the ICollection.

(继承自 Collection<T>)
ICollection<T>.IsReadOnly

获取一个值,用于指示 ICollection<T> 是否为只读。Gets a value indicating whether the ICollection<T> is read-only.

(继承自 Collection<T>)
IEnumerable.GetEnumerator()

返回循环访问集合的枚举器。Returns an enumerator that iterates through a collection.

(继承自 Collection<T>)
IList.Add(Object)

将某项添加到 IList 中。Adds an item to the IList.

(继承自 Collection<T>)
IList.Contains(Object)

确定 IList 是否包含特定值。Determines whether the IList contains a specific value.

(继承自 Collection<T>)
IList.IndexOf(Object)

确定 IList 中特定项的索引。Determines the index of a specific item in the IList.

(继承自 Collection<T>)
IList.Insert(Int32, Object)

将某项插入 IList 中指定的索引处。Inserts an item into the IList at the specified index.

(继承自 Collection<T>)
IList.IsFixedSize

获取一个值,该值指示 IList 是否具有固定大小。Gets a value indicating whether the IList has a fixed size.

(继承自 Collection<T>)
IList.IsReadOnly

获取一个值,用于指示 IList 是否为只读。Gets a value indicating whether the IList is read-only.

(继承自 Collection<T>)
IList.Item[Int32]

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

(继承自 Collection<T>)
IList.Remove(Object)

IList 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the IList.

(继承自 Collection<T>)

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 DataTableDataRow 的输入 IEnumerable<T> 对象的情况下,返回包含 T 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 DataRowDataTable 的输入 IEnumerable<T> 对象的情况下,将 T 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 DataRowDataTable 的输入 IEnumerable<T> 对象的情况下,将 T 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于