This document is archived and information here might be outdated.  Recommended version.


IDataStatistics Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IDataStatistics Interface

Provides access to members to generate statistics on a field.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Description
Read-only property Cancelled Indicates if the operation has been cancelled.
Read-only property Continue Indicates if the cursor contains more records than the current sample.
Write-only property Cursor The cursor which will generate the statistics.
Read/write property Field The field for which to gather statistics.
Read/write property SampleRate The maximum number of records to sample at a time (-1 means pull all records).
Read/write property SimpleStats Indicates whether only simple statistics are generated.
Read-only property Statistics The statistics for the current field over the current cursor.
Read-only property UniqueValueCount The number of unique values for the current sample.
Read-only property UniqueValues The unique values for the current field over the current cursor.

CoClasses that implement IDataStatistics

CoClasses and Classes Description
DataStatistics Esri Data Statistics object.

Remarks

The IDataStatistics object is the lone interface on the DataStatistics object and provides access to statistical information and unique values for the specified field.  The data to perform the analysis on is provided via an ICursor object attached to the DataStatistics object through the IDataStatistics::Cursor property.

Cursors can only be traversed once, which needs to be kept in mind when accessing statistical information and unique values.  For instance, it is necessary to re-execute the original query and set the Cursor property to the new cursor between accessing the Statistics and UniqueValues properties.

The UniqueValueCount property will return zero until you have retrieved the set of unique values from the UniqueValues property.

When accessing the Statistics property, the Field property should be set to the name of a numeric field. Attempting to retrieve Statistics for a non-numeric field will raise an error.

See Also

DataStatistics Class

.NET Samples

Retrieve a color ramp from the SymbologyControl (Code Files: SymbolForm)