new CustomView(oTreeView)
The CustomView type enables a customized pivot view or an alternative data presentation, such as graphical charts. The Object property defines the object responsible for displaying the control's custom view.
Parameters:
Name | Type | Description |
---|---|---|
oTreeView |
object | Indicates the tree view the custom view is associated with (displayed by), of exontrol.Tree.TV type |
- Since:
- 4.4
Methods
GetCategories() → {number}
The GetCategories() method retrieves the number of leading columns in Data that represent categories. The total number of columns consists of Categories plus Series.
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns the number of leading columns in Data that represent categories.
- Type
- number
GetColumns() → {string}
The GetColumns() method retrieves the names of the columns, represented as a comma-separated list. The total number of columns consists of Categories plus Series.
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns the column names, presented as a comma-separated list
- Type
- string
GetData() → {array}
The GetData() method retrieves the current data for export and use by the custom view, in the form of a 2-dimensional array.
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns a 2-dimensional array containing the current data for export and use by the custom view.
- Type
- array
GetItems() → {number}
The GetItems() method retrieves the number of rows in Data
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns the number of rows in Data
- Type
- number
GetObject() → {object}
The GetObject() method specifies the object responsible for displaying the control's custom view.
Returns:
Returns the object that handles the control's custom view.
- Type
- object
GetOptions() → {object}
The GetOptions() method returns the options of the control's custom-view.
Returns:
An object of CustomViewOptions type that indicates the options of the control's custom-view.
- Type
- object
Example
The following statements are equivalents:
oPivot.CustomView.GetOptions(), gets the options of the control's custom-view
oPivot.CustomView.Options, gets the options of the control's custom-view
where oPivot is an object of Pivot type
GetOptions
GetSeries() → {number}
The GetSeries() method retrieves the number of trailing columns in Data that represent series. The total number of columns consists of Categories plus Series.
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns the number of trailing columns in Data that represent series
- Type
- number
GetStack() → {string}
The GetStack() method retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list. Columns generated from the same pivot column are grouped together in a stack and represented as a comma-separated list.
Once the onviewchange event occurs the following properties are updated:
- Data, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
- Columns, {string} retrieves the names of the columns, represented as a comma-separated list
- Categories, {number} retrieves the number of leading columns in Data that represent the categories
- Series, {number} defines the number of trailing columns in Data that represent the series
- Stack, {string} retrieves the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Items, {number} retrieves the number of rows in Data
Returns:
Returns the name of the stack for each exported column (columns generated from the same pivot-column are grouped together in a stack), represented as a comma-separated list.
- Type
- string
GetVisible() → {Pivot.CustomViewVisibleEnum}
The GetVisible() method returns the visibility status of the custom view. The pivot's custom view is visible only if the 'visible' option is true and the 'object' property is configured.
Returns:
Returns a CustomViewVisibleEnum expression indicating whether the custom view is hidden, fully visible, or displayed alongside the default view with a horizontal or vertical splitter.
GetVisible
SetObject(value)
The SetObject() method defines the object responsible for displaying the control's custom view.
Parameters:
Name | Type | Description |
---|---|---|
value |
object | The object responsible for displaying the control's custom view, such as exontrol.Graph |
Example
null {null} or undefined {undefined}, indicates no object is associated with the custom view (default)
new exontrol.Graph("cvsPivot") {exontrol.Graph}, specifies that the control's data is displayed using the exontrol.Graph component
SetObject
SetOptions(nOptions, bIncludeAllopt) → {boolean}
The SetOptions() method applies new options to the control's custom-view
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
nOptions |
object | Specifies an object of CustomViewOptions type that indicates the new options to apply | |
bIncludeAll |
boolean |
<optional> |
Indicates whether all fields of nOptions are included in the item's oOptions object |
Returns:
Returns true, if there were options applied to the item
- Type
- boolean
SetVisible(value)
The SetVisible() method shows or hides the custom-view. The pivot's custom view is visible only if the 'visible' option is set to true and the 'object' property is configured.
Parameters:
Name | Type | Description |
---|---|---|
value |
Pivot.CustomViewVisibleEnum | Indicates a CustomViewVisibleEnum expression that specifies whether the custom-view is visible or hidden |
Example
false {boolean} or exontrol.Pivot.CustomViewVisibleEnum.exHidden {CustomViewVisibleEnum}, hides the control's custom view
null {null} or true {boolean} or exontrol.Pivot.CustomViewVisibleEnum.exVisible {CustomViewVisibleEnum}, shows the control's custom view (default)
"hsplit" {string} or exontrol.Pivot.CustomViewVisibleEnum.exVSplit {exontrol.Pivot.CustomViewVisibleEnum}, both the control's custom view and default view are visible, separated by a horizontal splitter
SetVisible