Check documentation for the latest version of DHTMLX Pivot setFields Pivot Docs

setFields

sets fields structure for Pivot

void setFields(object fields);
fieldsobjectthe fields object

Example

// defining fields object
var fields = {
    rows: ["form", "name"],
    columns: ["year"],
    values: [
        { id: "oil", method: "max" }, 
        { id: "oil", method: "sum" }
    ]
}
 
// setting the fields object for Pivot
myPivot.setFields(fields);

Details

Read more about the fields object attributes in the related section.

Related sample:  Set fields

See also
Back to top