Title
How to automatically calculate and display the aggregate values of the VTable's pivot table?
Description
Why is the aggregate node data not displayed after the pivot table is set to display in tree structure?
Solution
Aggregation rules need to be configured so that data can be automatically aggregated during data analysis and the aggregated value can be used as the display value of the parent cell.
Code Example
dataConfig: {
totals: {
row: {
showSubTotals: true,
subTotalsDimensions: ['Category'],
subTotalLabel: 'subtotal'
}
}
},</br>
Results
Online effect reference:https://visactor.io/vtable/demo/table-type/pivot-analysis-table-tree
Related Documents
Tree Table Demo:https://visactor.io/vtable/demo/table-type/pivot-analysis-table-tree
Tutorial on pivot table data analysis:https://visactor.io/vtable/guide/data_analysis/pivot_table_dataAnalysis
Related api:https://visactor.io/vtable/option/PivotTable#dataConfig.totals
github:https://github.com/VisActor/VTable