CustomView class (Pivot)

CustomView(oTreeView)

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. The Object property can be set to an instance of exontrol.Graph to display a chart in the custom view, or it can be set to any other object that provides a SetZoom method to synchronize the zoom level with the pivot control. By utilizing the CustomView type, you can create dynamic and visually appealing representations of your pivot data, enhancing the overall user experience and providing valuable insights through graphical visualization.
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

Members

(readonly) Categories :number

The Categories property retrieves the number of leading columns in Data that represent categories. Typically, the number of elements in the PivotRows property specifies the number of categories, based on ShowBranchRows property. For instance, if there are two PivotRows and ShowBranchRows is exBranchColumns, the Categories property will be 2 (indicating two leading columns for categories). Conversely, if ShowBranchRows is exBranchRows, the Categories property will be 1 (indicating one leading column for categories). The Columns property retrieves the names of the columns, represented as a comma-separated list. The total number of columns consists of Categories plus Series. The Series property defines the number of trailing columns in Data that represent series.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Similarly, the internal eXGraph control is updated automatically based on this information. (only if the Object property is "exontrol.graph").
Type:
  • number
Example
The following statements are equivalents:

 oPivot.CustomView.GetCategories(), gets the number of leading columns in Data that represent categories
 oPivot.CustomView.Categories, gets the number of leading columns in Data that represent categories

where oPivot is an object of Pivot type
Categories

(readonly) Columns :string

The Columns property retrieves the names of the columns, represented as a comma-separated list. The total number of columns consists of Categories plus Series. The Categories property retrieves the number of leading columns in Data that represent categories. For instance, if there are two PivotRows and ShowBranchRows is exBranchColumns, the Categories property will be 2 (indicating two leading columns for categories). Conversely, if ShowBranchRows is exBranchRows, the Categories property will be 1 (indicating one leading column for categories). The rest of the columns represent the series. Use the Categories and Columns properties you can determine how many columns represent categories and how many represent series in the exported Data. The Series property defines the number of trailing columns in Data that represent series.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Type:
  • string
Example
The following statements are equivalents:

 oPivot.CustomView.GetColumns(), gets the names of the columns, represented as a comma-separated list
 oPivot.CustomView.Columns, gets the names of the columns, represented as a comma-separated list

where oPivot is an object of Pivot type
Columns

(readonly) Data :array

The Data property retrieves the current data for export and use by the custom view, in the form of a 2-dimensional array. The data is structured such that the leading columns represent categories, while the trailing columns represent series. The Columns property provides the names of the columns as a comma-separated list. The Stack property indicates the grouping of columns generated from the same pivot-column. The Items property specifies the number of rows in the data array.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Type:
  • array
Example
The following statements are equivalents:

 oPivot.CustomView.GetData(), gets the current data for export and use by the custom view
 oPivot.CustomView.Data, gets the current data for export and use by the custom view

where oPivot is an object of Pivot type
Data

Items :number

The Items property retrieves the number of rows in Data. The Data property retrieves the data to be represented (the pivot-table) as a 2-dimensional array. The Columns property retrieves the names of the columns, represented as a comma-separated list. The Categories property retrieves the number of leading columns in Data that represent the categories. The Series property defines the number of trailing columns in Data that represent series.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Type:
  • number
Example
The following statements are equivalents:

 oPivot.CustomView.GetItems(), gets the number of rows in Data
 oPivot.CustomView.Items, gets the number of rows in Data

where oPivot is an object of Pivot type
Items

Object :object

The Object property defines the object responsible for displaying the control's custom view. The Object property uses the SetObject() and GetObject() methods to set or get the object responsible for displaying the control's custom view. The Visible property shows or hides the custom-view.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
By default, no object is associated with the custom view.
Type:
  • object
Example
null {null} or undefined {undefined}, indicates no object is associated with the custom view (default)
new exontrol.Graph("cvsPivot", {serieType: "area"}) {exontrol.Graph}, specifies that the control's data is displayed using the exontrol.Graph component, using an area-chart to represent the data. The "cvsPivot" is the identifier of the HTML canvas element that hosts the exontrol.Graph control, the same for eXPivot and eXGraph controls.
Object

Options :CustomViewOptions

The Options property gets or sets the options of the control's custom-view. The Options property uses the GetOptions() method to retrieve the options of the control's custom-view, and the SetOptions() method to apply new options to the control's custom-view. The pivot's custom view is visible only if the 'visible' option is true and the 'object' property is configured. In case the custom view is visible, it can be fully displayed or shown alongside the default view using a horizontal or vertical splitter. The Object property defines the object responsible for displaying the control's custom view. By default, the custom view is visible, all you need to do is to set the 'object' property to an instance of the desired custom-view object.
Type:
  • CustomViewOptions
Example
The following statements are equivalents:

 oPivot.CustomView.SetOptions( {...} ), applies new options to the control's custom-view
 oPivot.CustomView.Options = {...}, applies new options to the control's custom-view

where oPivot is an object of Pivot type
Options

(readonly) Series :number

The Series property retrieves the number of trailing columns in Data that represent series. The total number of columns consists of Categories plus Series. The Categories property retrieves the number of leading columns in Data that represent categories. The Columns property retrieves the names of the columns, represented as a comma-separated list.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Type:
  • number
Example
The following statements are equivalents:

 oPivot.CustomView.GetSeries(), gets the number of trailing columns in Data that represent series
 oPivot.CustomView.Series, gets the number of trailing columns in Data that represent

where oPivot is an object of Pivot type
Series

(readonly) Stack :string

The Stack property 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. The Columns property retrieves the names of the columns, represented as a comma-separated list. The total number of columns consists of Categories plus Series. The Categories property retrieves the number of leading columns in Data that represent categories. The Series property defines the number of trailing columns in Data that represent series.

Once the onviewchange event occurs the following properties are updated:

  • Data property, {array} retrieves the data to be represented (the pivot-table) as a 2-dimensional array
  • Columns property, {string} retrieves the names of the columns, represented as a comma-separated list
  • Categories property, {number} retrieves the number of leading columns in Data that represent the categories
  • Series property, {number} defines the number of trailing columns in Data that represent the series
  • Stack property, {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 property, {number} retrieves the number of rows in Data
Type:
  • string
Example
The following statements are equivalents:

 oPivot.CustomView.GetStack(), gets 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
 oPivot.CustomView.Stack, gets 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

where oPivot is an object of Pivot type
Stack

Visible :Pivot.CustomViewVisibleEnum

The Visible property 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. The custom view can be fully displayed or shown alongside the default view using a horizontal or vertical splitter. The Object property defines the object responsible for displaying the control's custom view. By default, the custom view is visible, all you need to do is to set the 'object' property to an instance of the desired custom-view object.
Type:
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
Visible

Methods