constructor(options?: any): PivotEngine
Initializes a new instance of the PivotEngine class.
JavaScript object containing initialization data for the field.
Gets or sets a value that determines whether users should be allowed to edit the properties of the PivotField objects owned by this PivotEngine.
If you set this property to false, the context menus shown by controls such as the **PivotGrid** and **PivotPanel** will not include an option for changing the field settings.
このプロパティのデフォルト値は**true**です。
ビューの更新を非同期に行うかどうかを決定する値を取得または設定します。
このプロパティはデフォルトではtrueに設定されます。これにより、大規模なデータセットの集約が非同期に実行され、UIスレッドの停止が防がれます。
このプロパティのデフォルト値は**true**です。
Gets or sets a value that determines whether the engine should generate fields automatically based on the itemsSource.
If you set this property to true, the engine will generate fields for each property of the items in the itemsSource. The binding property of the auto-generated fields is set to the property name, and their header property is set to a string obtained by capitalizing the first letter of the binding and adding spaces before each capital letter.
For example, a 'customerName' property will cause the engine create a field with binding set to 'customerName' and header set to 'Customer Name'.
When adding fields to one of the view lists using strings, you must specify the header, not the binding (unlike bindings, field headers must be unique).
このプロパティのデフォルト値は**true**です。
Gets the list of PivotField objects that define the fields shown as columns in the output table.
デフォルトのフィルタタイプを(値または条件に基づいて)取得または設定します。
The default value for this property is **null**, which causes the engine to use **FilterType.Both** on the client or **FilterType.Condition** on the server.
Gets or sets a value that determines whether the filter should include only values selected by the filterText property.
このプロパティのデフォルト値は**true**です。この動作はExcelと同じです。
この動作を無効にするには、このプロパティを**false**に設定します。 その場合、リストに表示される項目のみが検索され、 フィルタに含まれる項目が検索されません。
Gets the list of PivotField objects exposed by the data source.
This list is created automatically whenever the itemsSource property is set.
Pivot views are defined by copying fields from this list to the lists that define the view: valueFields, rowFields, columnFields, and filterFields.
For example, the code below assigns a data source to the PivotEngine and then defines a view by adding fields to the rowFields, columnFields, and valueFields lists.
```typescript import { PivotEngine } from '@grapecity/wijmo.olap'; // create pivot engine let pe = new PivotEngine();
// set data source (populates fields list) pe.itemsSource = this.getRawData();
// prevent updates while building Olap view pe.beginUpdate();
// show countries in rows pe.rowFields.push('Country');
// show categories and products in columns pe.columnFields.push('Category'); pe.columnFields.push('Product');
// show total sales in cells pe.valueFields.push('Sales');
// done defining the view pe.endUpdate(); ```
Gets the list of PivotField objects that define the fields used as filters.
Fields on this list do not appear in the output table, but are still used for filtering the input data.
Gets a value that indicates whether the viewDefinition have been changed but the changes have not benn applied yet (deferUpdate mode)
Gets a value that determines whether the engine is bound to a server itemsSource or is using local data.
ピボットビューが現在定義されているかどうかを判定する値を取得します。
A pivot view is defined if any of the valueFields, rowFields, or columnFields lists are not empty.
Gets or sets the array or ICollectionView that contains the raw data to be analyzed, an object describing an SSAS cube service, or a string containing the URL for a ComponentOne DataEngine service.
The first option (using an array or ICollectionView) is the simplest, but it limits the amount of raw data you can handle. Loading the raw data into an array can take a long time if the data set contains more than about 50,000 items or so.
To use this option, simply set the itemsSource property to any JavaScript array containing the raw data to be analyzed. For example:
```typescript import { PivotEngine } from '@grapecity/wijmo.olap'; let ng = PivotEngine({ itemsSource = getDataArray(1000); }); ```
The second option (direct connection to OLAP SSAS cubes) allows the PivotEngine to connect directly to OLAP cubes provided by SSAS servers. This option removes the size limitations mentioned above and allows you to analyze data sets with millions or billions of records.
To use this option, set the itemsSource property to an object that specifies how the component should access the service. For example:
```typescript import { PivotEngine } from '@grapecity/wijmo.olap'; let ng = PivotEngine({ itemsSource: { url: 'http://ssrs.componentone.com/OLAP/msmdpump.dll', cube: 'Adventure Works', catalog: 'AdventureWorksDW2012Multidimensional' } }); ```
The **catalog** property is optional, but **url** and **cube** are required.
The preceding example works with SSAS servers that allow anonymous access. For servers that require Basic Authentication, you should also include the appropriate **user** and **password** members as part of the itemsSource object.
When connecting directly to OLAP SSAS cubes, users will not be able to filter fields by value. They will still be able to filter by condition.
The third option, ComponentOne data engine services, allows you to analyze large datasets on a server without downloading the raw data to the client. You can use our high-performance FlexPivot services or interface with Microsoft's SQL Server Analysis Services OLAP Cubes.
To use ComponentOne data engine services, set the itemsSource property to a string containing the URL of the data service. For example:
```typescript import { PivotEngine } from '@grapecity/wijmo.olap'; let ng = new wijmo.olap.PivotEngine({ itemsSource: 'http://demos.componentone.com/ASPNET/c1webapi/4.5.20193.222/api/dataengine/cube' }); ```
The PivotEngine sends view definitions to the server, where summaries are calculated and returned to the client.
When connecting ComponentOne DataEngine data sources, users will not be able to filter fields by value. They will still be able to filter by condition.
For more information about the ComponentOne DataEngine services please refer to the online documentation.
Our OlapServerIntro sample shows all options working with a single PivotEngine.
Gets the list of PivotField objects that define the fields shown as rows in the output table.
Gets or sets the maximum number of records the getDetail method should retrieve from the server.
The default value for this property is **1,000**, which is a reasonable amount of detail in many scenarios. If you want to allow more detail records to be retrieved, increase the value of this property.
結果を取得中に進行状況のためにサーバーをポーリングする前にエンジンが待機する時間(ミリ秒単位)を取得または設定します。
The default value for this property is **500** milliseconds, which causes the engine to poll the server for a status update every half second.
エンジンが結果をサーバーから返すまで待機する最大時間(ミリ秒単位で)を取得または設定します。
The default value for this property is **60,000** milliseconds, or one minute. If you expect server operations to take longer than that, set the property to a higher value.
Gets or sets a value that determines whether the output pivotView should include columns containing subtotals or grand totals.
The default value for this property is **ShowTotals.GrandTotals**.
Gets or sets a value that determines whether the output pivotView should include rows containing subtotals or grand totals.
The default value for this property is **ShowTotals.GrandTotals**.
Gets or sets a value that determines whether the Olap output table should use zeros to indicate missing values.
このプロパティのデフォルト値は **false**です。
値フィールド(メジャー)をソートするときにエンジンが、グループをソートするか、または各グループ内でのみグループの順序とデータを保持する必要があるかどうかを決定する値を取得または設定します。
このプロパティのデフォルト値は**true**です。
サーバーから受信したサマリーデータがすでにソートされているかどうかを示す値を取得または設定します。
If this property is set to true, the PivotEngine will not sort the data it receives from the server.
This property should be used only in conjunction with custom servers that return the aggregated data properly sorted, typically using custom logic not available in the standard PivotEngine.
このプロパティのデフォルト値は **false**です。
通常のデータ行およびデータ列の前または後に行および列の合計を表示するかどうかを決定する値を取得または設定します。
この値がtrueに設定されている場合、データ行の上部に合計行が、通常のデータ列の左側に合計列が表示されます。
このプロパティのデフォルト値は **false**です。
Gets the list of PivotField objects that define the fields summarized in the output table.
現在のピボットビュー定義をJSON文字列として取得または設定します。
このプロパティは通常、現在のビューをアプリケーション設定として維持するために使用されます。
たとえば、次のコードは、ローカルストレージを使用してビュー定義を保存およびロードする2つの関数を実装します。
```typescript // save/load views function saveView() { localStorage.viewDefinition = pivotEngine.viewDefinition; } function loadView() { pivotEngine.viewDefinition = localStorage.viewDefinition; } ```
beginUpdate(): void
Suspends the refresh processes until next call to the endUpdate.
cancelPendingUpdates(): void
保留中の非同期のビュー更新をキャンセルします。
deferUpdate(fn: Function): void
beginUpdate/endUpdateブロック内で関数を実行します。
この関数の実行が完了するまでコントロールは更新されません。 このメソッドは、関数が例外を生成した場合でもendUpdate が呼び出されるようにします。
Function to be executed.
editField(field: PivotField): void
ユーザーがフィールドの設定を編集することができる設定ダイアログを表示します。
PivotField to be edited.
getDetail(item: any, binding: string): any[]
Gets an array containing the records summarized by a property in the pivotView list.
If the engine is connected to a PivotEngine server, the value returned is an ObservableArray that is populated asynchronously.
getDetailView(item: any, binding: string): ICollectionView
Gets an ICollectionView containing the records summarized by a property in the pivotView list.
getKeys(item: any, binding: string): any
Gets an object with information about a property in the pivotView list.
The object returned has two properties, 'rowKey' and 'colKey'. Each of these contains two arrays, 'fields' and 'values'. Together, this information uniquely identifies a value summarized by the PivotEngine.
For example, calling getKeys against a pivot view with two row fields 'Product' and 'Country', and a single column field 'Active' would return an object such as this one:
``` { rowKey: { fields: [ 'Product', 'Country'], values: [ 'Aoba', 'Japan' ] }, colKey: { fields: [ 'Active' ], values: [ true ] } } ```
The object identifies the subset of data used to obtain one summary value. In this case, this value represents all data items for product 'Aoba' sold in Japan with Active state set to true.
invalidate(): void
ビューを無効にして非同期リフレッシュを行います。
onError(e: RequestErrorEventArgs): boolean
Raises the error event.
RequestErrorEventArgs that contains information about the error.
onItemsSourceChanged(e?: EventArgs): void
itemsSourceChanged イベントを発生させます。
onUpdatedView(e?: EventArgs): void
updatedView イベントを発生させます。
onUpdatingView(e: ProgressEventArgs): void
updatingView イベントを発生させます。
ProgressEventArgs that provides the event data.
onViewDefinitionChanged(e?: EventArgs): void
viewDefinitionChanged イベントを発生させます。
refresh(force?: boolean): void
Summarizes the data and updates the output pivotView.
Refresh even while updating (see beginUpdate).
removeField(field: PivotField): void
現在のビューからフィールドを削除します。
PivotField to be removed.
通常のデータテーブルをOLAPピボットテーブルに対話的に変換するためのユーザーインタフェースを提供します。
Tabulates data in the itemsSource collection according to lists of fields and creates the pivotView collection containing the aggregated data.
Pivot tables group data into one or more dimensions. The dimensions are represented by rows and columns on a grid, and the data is stored in the grid cells.