setFields

sets fields structure for Pivot

void setFields(object fields);

Parameters

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.

See also
Back to top