FieldObject
The FieldObject describes a field selected in the slice.
Properties
| Property/Type | Description |
|---|---|
nameString | optionalThe field's unique name. |
aggregationString | optionalThe name of the aggregation that will be applied to the value. Only for the flat table. |
showTotalBoolean | optionalDefines whether totals are shown or hidden for the field. When set to false, totals are hidden. The totalRowPosition option overrides showTotal.
If totalRowPosition is "none", totals are not displayed regardless of the showTotal value. Only for the flat table. |
Examples
- See how fields are configured for the pivot table:
slice: {
rows: [
{
name: "Country"
},
],
columns: [
{
name: "Category"
}
],
values: [
{
name: "Price",
aggregation: "average",
showTotal: false
}
]
}
- See how fields are configured for the flat table:
slice: {
fields: [
{
name: "Country",
aggregation: "sum"
},
{
name: "Price",
aggregation: "average",
showTotal: false
}
]
}