Represents 2D Pivot Table view for multidimensional array (IPivotData).
Inheritance Hierarchy
NReco.PivotDataPivotTable
Namespace: NReco.PivotData
Assembly: NReco.PivotData (in NReco.PivotData.dll) Version: 1.4.1
Syntax
The PivotTable type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| PivotTable(String, String, IPivotData) |
Initializes a new instance of PivotTable instance by specified PivotData | |
| PivotTable(String, String, IPivotData, IComparerValueKey, IComparerValueKey) |
Initializes a new instance of PivotTable instance by specified PivotData |
Properties
| Name | Description | |
|---|---|---|
| ColumnKeys |
Dimension keys that represent columns of the pivot table
| |
| Columns |
Dimensions used for building columns of the pivot table
| |
| Item |
Gets aggregator for specified row and column indexes
| |
| PivotData |
Gets the IPivotData used for building pivot table.
| |
| PreserveGroupOrder |
Gets or sets flag that preserves grouping order when SortRowKeys(NullableInt32, ListSortDirection) or SortColumnKeys(NullableInt32, ListSortDirection) is called (false by default).
| |
| RowKeys |
Dimension keys that represent rows of the pivot table
| |
| Rows |
Dimensions used for building rows of the pivot table
| |
| TotalsCache |
Controls totals cache usage (true by default).
| |
| ValuesComparer |
This comparer is used when table is ordered by values. Null by default (in this case default comparer is used).
|
Methods
| Name | Description | |
|---|---|---|
| Equals | (Inherited from Object.) | |
| Finalize | (Inherited from Object.) | |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| GetValue |
Gets value for specified row and column keys.
| |
| MemberwiseClone | (Inherited from Object.) | |
| SortColumnKeys(NullableInt32, ListSortDirection) |
Sort columns by specified row values.
| |
| SortColumnKeys(NullableInt32, Int32, ListSortDirection) |
Sort columns by specified row values
| |
| SortColumnKeysByRowKey |
Sort columns by specified row key.
| |
| SortKeys |
Performs inital ordering of pivot table rows/columns keys
| |
| SortRowKeys(NullableInt32, ListSortDirection) |
Sort rows by specified column values.
| |
| SortRowKeys(NullableInt32, Int32, ListSortDirection) |
Sort rows by specified column values.
| |
| SortRowKeysByColumnKey |
Sort rows by specified column key.
| |
| ToString | (Inherited from Object.) |
Remarks
Examples
PivotData pvtData; var pvtTbl = new PivotTable( new [] {"country", "city" }, // rows are cities grouped by country new [] {"company"}, // columns are companines pvtData); for (var r=0; r<pvtTbl.RowKeys.Length; r++) { for (var c=0; c<pvtTbl.ColumnKeys.Length; c++) { Console.Write("{0}\t", pvtTbl[r,c].Value); } Console.WriteLine(); }
See Also