CustomViewOptions class (Pivot)

Pivot.CustomViewOptions()

new CustomViewOptions()

The CustomViewOptions object defines the control's default custom-view options, hold by customView field of the Pivot.Options class. The custom view provides an alternative way to display the data, such as graphical charts. The control's custom view is visible only if the 'visible' option of the CustomViewOptions object is set to true and the 'object' property of the CustomViewOptions object is configured.

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

For instance, the "object" option:

customView: { object: new exontrol.Graph("cvsPivot", {autoFit: false}) }
adds graphical functionality to control, where "cvsPivot" is the identifier of the canvas element that hosts the pivot control
Since:
  • 4.4

Members

(static) object :object

The object field defines the object responsible for displaying the control's custom view, such as exontrol.Graph component, or any other custom object that supports displaying data. The pivot's custom view is visible only if the 'visible' option is set to true and the 'object' property is configured. By default, no object is associated with the custom view, so the control displays only the default pivot-table view. To display a custom view, you need to set the 'object' property to an instance of the desired custom-view object, such as exontrol.Graph. The pivot's custom view is visible only if the 'visible' option is set to true and the 'object' property is configured.
Type:
  • object
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
object

(static) visible :Pivot.CustomViewVisibleEnum

The visible field shows ot hides the control's custom-view. The pivot's custom view is visible only if the 'visible' option is set to true and the 'object' property is configured. 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.

The visible field is mapped to the CustomView.Visible property, which means that the following statements are equivalent:

oPivot.Options = {customView: { visible: exontrol.Pivot.CustomViewVisibleEnum.exHidden }}
oPivot.SetOptions({customView: { visible: exontrol.Pivot.CustomViewVisibleEnum.exHidden }})
oPivot.CustomView.Options = {visible: exontrol.Pivot.CustomViewVisibleEnum.exHidden}
oPivot.CustomView.SetOptions({visible: exontrol.Pivot.CustomViewVisibleEnum.exHidden}) oPivot.CustomView.Visible = exontrol.Pivot.CustomViewVisibleEnum.exHidden
oPivot.CustomView.SetVisible(exontrol.Pivot.CustomViewVisibleEnum.exHidden)
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