This guide explains:
When multiple fields are placed in rows or columns, all nodes are collapsed by default. As a result, only summarized data is shown until you expand the nodes. Learn how to expand the data and see more details.
If you want to preset expanded members in your report, we recommend the following approach:
Your report will now contain the info about expanded fields in the slice.expands property. If needed, you can edit this configuration programmatically.
You can expand a specific node using the expandCell() API call:
pivot.expandCell("rows", ["Accessories", "Canada"]);To collapse a specific node, use the collapseCell() API call.
Expand all nodes of the specified field using the expandData() API call:
pivot.expandData("Country");To collapse all nodes of the specified files, use the collapseData() API call.
Note expandData() and collapseData() works only for the CSV and JSON data sources.
Expand or collapse a member’s inner field values by clicking the arrow icon to the left of the member's name:
You can expand data only in rows or columns using the slice.expands.expandAllRows or slice.expands.expandAllColumns property, respectively:
slice: {
expands: {
expandAllRows: true
},
// Other slice configs
}
To expand data only in rows or columns, call the expandAllData() with the specified type parameter:
pivot.expandAllData("rows");To expand all data nodes at once, set the slice.expands.expandAll property to true:
slice: {
expands: {
expandAll: true
},
// Other slice configs
}
To expand all data nodes at once, use the expandAllData() API call:
pivot.expandAllData();
Note If your slice has a lot of nested levels, expandAllData() can lead to excessive memory consumption and instability.
To collapse all data nodes at once, use the collapseAllData() API call.
If you have the multilevel hierarchies configured, only the first level is visible on the screen by default. Learn how to drill the data and see more details.
If you want to preset drills in your report, we recommend the following approach:
Your report will now contain the info about the drilled fields in the slice.drills property. If needed, you can edit this configuration programmatically.
You can drill down the cell using the drillDownCell() API call:
pivot.drillDownCell("columns", [], null, "2021");To drill up the cell, use the drillUpCell() API call.
Drill up and down multilevel hierarchies by clicking a link next to the member name:
You can drill down multilevel hierarchies only in rows or columns using the slice.drills.drillAllRows or slice.drills.drillAllColumns property, respectively. These properties work only when the slice.expands.expandAll property is to true:
slice: {
expands: {
expandAll: true,
},
drills: {
drillAllColumns: true,
},
// Other slice configs
}To drill down all multilevel hierarchies at once, set the slice.drills.drillAll to true. This property works only when the slice.expands.expandAll property is to true:
slice: {
expands: {
expandAll: true,
},
drills: {
drillAll: true,
},
// Other slice configs
}