Pivot API

Constructor

var myPivot = new dhx.Pivot("container", {
    fields: {
        // initial pivot structure
    },
    fieldList: [        
        // the full list of fields
    ]
 });

Parameters:

  • an HTML container (or the ID of an HTML container)
  • a configuration object with the initial Pivot structure, fields, data and other properties (see them below)
Objects
Methods
addFilter adds a new filter for the data
addMathMethod adds a custom operation
addSubField adds a custom date field option for grouping data by dates
clearFiltersValues removes all filters applied to Pivot fields
export exports Pivot data to an Excel file
getConfig gets the Pivot configuration object
getFields returns the current fields object of Pivot
getFilter returns a filtering function
getFilterValue returns the value of a specified filter
getFiltersValues returns all filters applied to Pivot fields
load loads data into Pivot from an external file
paint repaints the pivot
removeFilter removes a filter and refreshes Pivot
setData populates Pivot with inline data after initialization
setFields sets fields structure for Pivot
setFilterValue sets a filter for a particular field
setFiltersValues sets filters for the specified fields
setGlobalFilter sets a global filter for Pivot
Properties
customFormat redefines the default formatting of cells values and sets a custom format
data a JS array with data for Pivot
fieldList defines an array of fields from the dataset that will be used in Pivot
fields specifies the initial Pivot structure and fields, and sets the scheme for data analysis
layout sets an object with properties that define the appearance and behavior of the Pivot layout
mark defines the styling of cells via a predefined or custom function
types defines the types of data operations that can be applied to columns
Back to top