You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assets/api/en/methods.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2324,3 +2324,35 @@ Usage:
2324
2324
// Collapse all column header tree nodes
2325
2325
tableInstance.collapseAllForColumnTree();
2326
2326
```
2327
+
2328
+
## updateCellContent(Function)
2329
+
2330
+
Update the content of a single cell. This interface only refreshes the content of the scenegraph node, not rendering. The render() interface will not actively update the content of the scenegraph node.
Update the content of a range of cells. This interface only refreshes the content of the scenegraph node, not rendering. The render() interface will not actively update the content of the scenegraph node.
Update the content of a range of cells. This interface only refreshes the content of the scenegraph node, not rendering. The render() interface will not actively update the content of the scenegraph node.
Copy file name to clipboardExpand all lines: docs/assets/guide/en/data_analysis/pivot_table_dataAnalysis.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,14 +84,16 @@ dataConfig: {
84
84
subTotalsDimensions: ['province'],
85
85
grandTotalLabel: 'row total',
86
86
subTotalLabel: 'Subtotal',
87
-
showGrandTotalsOnTop: true //totals show on top
87
+
showGrandTotalsOnTop: true, //totals show on top
88
+
showSubTotalsOnTreeNode: false // When subtotals are disabled in pivot tables, this option allows aggregated values to be displayed on collapsed tree nodes. Default value is false.
88
89
},
89
90
column: {
90
91
showGrandTotals: true,
91
92
showSubTotals: true,
92
93
subTotalsDimensions: ['quarter'],
93
94
grandTotalLabel: 'column total',
94
-
subTotalLabel: 'Subtotal'
95
+
subTotalLabel: 'Subtotal',
96
+
showSubTotalsOnTreeNode: false // When subtotals are disabled in pivot tables, this option allows aggregated values to be displayed on collapsed tree nodes. Default value is false.
95
97
}
96
98
}
97
99
},
@@ -250,9 +252,10 @@ dataConfig:{
250
252
}]
251
253
}
252
254
```
253
-
In this data record, the sales indicator is a non-numeric value. If the product requirement is to directly display `"NULL"` in the table cell, then the aggregation rule can be set to `VTable.TYPES.AggregationType.NONE`, so that VTable's internal will not perform aggregation calculations, but directly take the `sales` field value as the display value of the cell.
254
255
255
-
2. AggregationType.RECORD usage scenario is mainly used to match all data based on the user's input data record and use it as the display data of the cell. Usage scenarios include: needing to collect data sets for mini-chart displays, specific demo see: https://visactor.io/vtable/demo/cell-type/pivot-sparkline
256
+
In this data record, the sales indicator is a non-numeric value. If the product requirement is to directly display `"NULL"` in the table cell, then the aggregation rule can be set to `VTable.TYPES.AggregationType.NONE`, so that VTable's internal will not perform aggregation calculations, but directly take the `sales` field value as the display value of the cell.
257
+
258
+
2. AggregationType.RECORD usage scenario is mainly used to match all data based on the user's input data record and use it as the display data of the cell. Usage scenarios include: needing to collect data sets for mini-chart displays, specific demo see: https://visactor.io/vtable/demo/cell-type/pivot-sparkline
256
259
257
260
#### Custom Aggregation Type Introduction
258
261
@@ -313,7 +316,7 @@ const option={
313
316
{
314
317
indicatorKey: 'Average Product Price (Registered Aggregation Class)', //Indicator name
315
318
field: 'sales', //Indicator based field
316
-
aggregationType: 'avgPrice', //Registered aggregation type
319
+
aggregationType: 'avgPrice', //Registered aggregation type
317
320
}
318
321
]
319
322
}
@@ -323,6 +326,7 @@ const option={
323
326
VTable's internal aggregation rules code address: https://github.com/VisActor/VTable/blob/develop/packages/vtable/src/ts-types/dataset/aggregation.ts, can be referred to!
324
327
325
328
The methods that need to be implemented for the aggregation type are:
329
+
326
330
- constructor: The constructor function, used to initialize the aggregator.
327
331
- push: Add data records to the aggregator, used to calculate the aggregated value.
328
332
- deleteRecord: Delete records from the aggregator and update the aggregated value, called by VTable's delete interface deleteRecords.
@@ -591,4 +595,4 @@ Interface definition:
591
595
* @param isResetTree Whether to reset the table header tree structure. When true, the table header tree structure will be reset, when false, the table header tree structure will remain unchanged
0 commit comments