Skip to content

Commit 00b8563

Browse files
authored
Merge pull request #4936 from VisActor/release/1.22.11
[Auto release] release 1.22.11
2 parents 8a54701 + 654dc01 commit 00b8563

44 files changed

Lines changed: 804 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ $ rush update
181181

182182
## 🔗 Related Links
183183

184-
- [Official website](https://visactor.io/vtable)
184+
- [Official website](https://visactor.com/vtable)
185185
- [Usage Trend](https://npm-compare.com/@visactor/vtable)
186186

187187
# 💫 Ecosystem
@@ -192,16 +192,17 @@ $ rush update
192192

193193
# ⭐️ Star History
194194

195-
## Star History
196195

197-
<a href="https://gitdata.xuanhun520.com/#visactor/vtable&Date">
196+
<a href="https://gitdata.xuanhun520.com/?repos=visactor/vtable&type=Date">
198197
<picture >
199-
198+
<source media="(prefers-color-scheme: dark) and (max-width: 800px)" srcset="https://gitdata.xuanhun520.com/api/starimg?repos=visactor/vtable&type=Date&theme=dark" />
199+
<source media="(prefers-color-scheme: light) and (max-width: 800px)" srcset="https://gitdata.xuanhun520.com/api/starimg?repos=visactor/vtable&type=Date&theme=light" />
200200
<img style="width: 800px; height: 533px;" alt="Star History Chart" src="https://gitdata.xuanhun520.com/api/starimg?repos=visactor/vtable&type=Date&theme=dark" />
201201
</picture>
202202
</a>
203203

204204

205+
205206
# 🤝 Contribution
206207

207208
If you would like to contribute, please read the [Code of Conduct ](./CODE_OF_CONDUCT.md) and [ Guide](./CONTRIBUTING.md) first。
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.22.10","mainProject":"@visactor/vtable","nextBump":"patch"}]
1+
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.22.11","mainProject":"@visactor/vtable","nextBump":"patch"}]

docs/assets/api/en/methods.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,3 +2324,35 @@ Usage:
23242324
// Collapse all column header tree nodes
23252325
tableInstance.collapseAllForColumnTree();
23262326
```
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.
2331+
2332+
```ts
2333+
/**
2334+
* Update the content of a single cell
2335+
*/
2336+
updateCellContent: (col: number, row: number) => void;
2337+
```
2338+
## updateCellContentRange(Function)
2339+
2340+
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.
2341+
2342+
```ts
2343+
/**
2344+
* Update the content of a range of cells
2345+
*/
2346+
updateCellContentRange: (startCol: number, startRow: number, endCol: number, endRow: number) => void;
2347+
```
2348+
2349+
## updateCellContentRanges(Function)
2350+
2351+
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.
2352+
2353+
```ts
2354+
/**
2355+
* Update the content of a range of cells
2356+
*/
2357+
updateCellContentRanges: (ranges: CellRange[]) => void;
2358+
```

docs/assets/api/zh/methods.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,3 +2326,35 @@ tableInstance.expandAllForColumnTree();
23262326
// 折叠列表头树的所有节点
23272327
tableInstance.collapseAllForColumnTree();
23282328
```
2329+
## updateCellContent(Function)
2330+
2331+
更新某个单元格内容. 这个接口仅是刷新场景树节点内容而非渲染。重新渲染接口render()不会主动更新场景树节点内容。
2332+
2333+
```ts
2334+
/**
2335+
* 更新某个单元格内容
2336+
*/
2337+
updateCellContent: (col: number, row: number) => void;
2338+
```
2339+
2340+
## updateCellContentRange(Function)
2341+
2342+
更新某个区域单元格内容. 这个接口仅是刷新场景树节点内容而非渲染。重新渲染接口render()不会主动更新场景树节点内容。
2343+
2344+
```ts
2345+
/**
2346+
* 更新某个区域单元格内容
2347+
*/
2348+
updateCellContentRange: (startCol: number, startRow: number, endCol: number, endRow: number) => void;
2349+
```
2350+
2351+
## updateCellContentRanges(Function)
2352+
2353+
更新某个区域单元格内容. 这个接口仅是刷新场景树节点内容而非渲染。重新渲染接口render()不会主动更新场景树节点内容。
2354+
2355+
```ts
2356+
/**
2357+
* 更新某个区域单元格内容
2358+
*/
2359+
updateCellContentRanges: (ranges: CellRange[]) => void;
2360+
```

docs/assets/changelog/en/release.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# v1.22.10
2+
3+
2026-01-05
4+
5+
6+
**🐛 Bug fix**
7+
8+
- **@visactor/vtable**: fix prepareEdit logic occor some bug
9+
- **@visactor/vtable-plugins**: fix delete and backbase key cann't delete cells
10+
- **@visactor/vtable**: rose pivotchart show indicator title problem
11+
12+
13+
**🆕 New feature**
14+
15+
- **@visactor/vtable-gantt**: feat: support distanceToTaskBar config
16+
17+
18+
19+
[more detail about v1.22.10](https://github.com/VisActor/VTable/releases/tag/v1.22.10)
20+
121
# v1.22.9
222

323
2025-12-28

docs/assets/changelog/zh/release.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# v1.22.10
2+
3+
2026-01-05
4+
5+
6+
**🐛 功能修复**
7+
8+
- **@visactor/vtable**: 修复 prepareEdit 逻辑造成的一些问题
9+
- **@visactor/vtable-plugins**: 修复del和backspace键不能删除单元格的问题
10+
- **@visactor/vtable**: 修复透视图非笛卡尔坐标系的图表类型中显示指标标题问题
11+
12+
13+
**🆕 新增功能**
14+
15+
- **@visactor/vtable-gantt**: 甘特图依赖性支持自定义拐点距离taskbar的长度
16+
17+
18+
19+
[更多详情请查看 v1.22.10](https://github.com/VisActor/VTable/releases/tag/v1.22.10)
20+
121
# v1.22.9
222

323
2025-12-28

docs/assets/guide/en/data_analysis/pivot_table_dataAnalysis.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,16 @@ dataConfig: {
8484
subTotalsDimensions: ['province'],
8585
grandTotalLabel: 'row total',
8686
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.
8889
},
8990
column: {
9091
showGrandTotals: true,
9192
showSubTotals: true,
9293
subTotalsDimensions: ['quarter'],
9394
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.
9597
}
9698
}
9799
},
@@ -250,9 +252,10 @@ dataConfig:{
250252
}]
251253
}
252254
```
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.
254255

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
256259

257260
#### Custom Aggregation Type Introduction
258261

@@ -313,7 +316,7 @@ const option={
313316
{
314317
indicatorKey: 'Average Product Price (Registered Aggregation Class)', //Indicator name
315318
field: 'sales', //Indicator based field
316-
aggregationType: 'avgPrice', //Registered aggregation type
319+
aggregationType: 'avgPrice', //Registered aggregation type
317320
}
318321
]
319322
}
@@ -323,6 +326,7 @@ const option={
323326
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!
324327

325328
The methods that need to be implemented for the aggregation type are:
329+
326330
- constructor: The constructor function, used to initialize the aggregator.
327331
- push: Add data records to the aggregator, used to calculate the aggregated value.
328332
- deleteRecord: Delete records from the aggregator and update the aggregated value, called by VTable's delete interface deleteRecords.
@@ -591,4 +595,4 @@ Interface definition:
591595
* @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
592596
*/
593597
updateFilterRules(filterRules: FilterRules, isResetTree: boolean = false) => void
594-
```
598+
```

docs/assets/guide/zh/data_analysis/pivot_table_dataAnalysis.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,16 @@ dataConfig: {
8484
subTotalsDimensions: ['province'],
8585
grandTotalLabel: '行总计',
8686
subTotalLabel: '小计',
87-
showGrandTotalsOnTop: true //汇总值显示在上
87+
showGrandTotalsOnTop: true, //汇总值显示在上
88+
showSubTotalsOnTreeNode: false // 当在透视表中禁用小计时,此选项允许在折叠的树节点上显示聚合值。默认值为 false
8889
},
8990
column: {
9091
showGrandTotals: true,
9192
showSubTotals: true,
9293
subTotalsDimensions: ['quarter'],
9394
grandTotalLabel: '列总计',
94-
subTotalLabel: '小计'
95+
subTotalLabel: '小计',
96+
showSubTotalsOnTreeNode: false // 当在透视表中禁用小计时,此选项允许在折叠的树节点上显示聚合值。默认值为 false
9597
}
9698
}
9799
},
@@ -163,7 +165,7 @@ dataConfig: {
163165

164166
通常情况下指标应该是 `number` 类型,这样内部才能进行计算。
165167

166-
如果指标是字符串型或者 `null`,且需要在单元格中进行展示,可以配置 `aggregationType``VTable.TYPES.AggregationType.NONE` 来显示数据源字段的原始值; 或者在指标format函数中结合接口`getCellOriginRecord`获取到单元格对应的数据源条目,然后进行特殊处理。
168+
如果指标是字符串型或者 `null`,且需要在单元格中进行展示,可以配置 `aggregationType``VTable.TYPES.AggregationType.NONE` 来显示数据源字段的原始值; 或者在指标 format 函数中结合接口`getCellOriginRecord`获取到单元格对应的数据源条目,然后进行特殊处理。
167169

168170
如果用到了自定义渲染 `customLayout`,在 `customLayout` 函数中想获取单元格对应的所有数据 `records`,可以配置 `aggregationType``VTable.TYPES.AggregationType.RECORD`
169171

@@ -218,7 +220,7 @@ dataConfig: {
218220
{
219221
indicatorKey: '商品均价(注册聚合类)', //指标名称
220222
field: 'sales', //指标依据字段
221-
aggregationType: 'avgPrice', //自己注册的聚合类型
223+
aggregationType: 'avgPrice', //自己注册的聚合类型
222224
}
223225
]
224226
}
@@ -252,7 +254,7 @@ dataConfig:{
252254
}
253255
```
254256

255-
其中该条数据 record 中 sales 指标是个非数值型的值,如果产品需求要将`"NULL"`直接显示到表格单元格中,那么可以设置聚合规则为`VTable.TYPES.AggregationType.NONE`,这样 VTable 的内部不会进行聚合计算,而是直接取`sales`字段值作为单元格展示值。
257+
其中该条数据 record 中 sales 指标是个非数值型的值,如果产品需求要将`"NULL"`直接显示到表格单元格中,那么可以设置聚合规则为`VTable.TYPES.AggregationType.NONE`,这样 VTable 的内部不会进行聚合计算,而是直接取`sales`字段值作为单元格展示值。
256258

257259
2. AggregationType.RECORD 使用场景主要用于根据用户传入数据 record 匹配到所有数据,将其作为单元格的展示数据,用法场景如:需要搜集数据集作为迷你图展示,具体 demo 见:https://visactor.io/vtable/demo/cell-type/pivot-sparkline
258260

@@ -315,20 +317,21 @@ const option={
315317
{
316318
indicatorKey: '商品均价(注册聚合类)', //指标名称
317319
field: 'sales', //指标依据字段
318-
aggregationType: 'avgPrice', //自己注册的聚合类型
320+
aggregationType: 'avgPrice', //自己注册的聚合类型
319321
}
320322
]
321323
}
322324
}
323325
```
324326

325-
VTable内部的几种聚合规则代码地址https://github.com/VisActor/VTable/blob/develop/packages/vtable/src/ts-types/dataset/aggregation.ts,可予以参考!
327+
VTable 内部的几种聚合规则代码地址https://github.com/VisActor/VTable/blob/develop/packages/vtable/src/ts-types/dataset/aggregation.ts,可予以参考!
326328

327329
其中聚合类型需要实现的几个方法分别为:
330+
328331
- constructor:构造函数,用于初始化聚合器。
329332
- push:将数据记录添加到聚合器中,用于计算聚合值。
330-
- deleteRecord:从聚合器中删除记录,并更新聚合值,调用vtable的删除接口deleteRecords会调用该接口
331-
- updateRecord:更新数据记录,并更新聚合值,调用接口updateRecords会调用该接口
333+
- deleteRecord:从聚合器中删除记录,并更新聚合值,调用 vtable 的删除接口 deleteRecords 会调用该接口
334+
- updateRecord:更新数据记录,并更新聚合值,调用接口 updateRecords 会调用该接口
332335
- recalculate:重新计算聚合值,目前复制粘贴单元格值会调用该方法。
333336
- value:获取聚合值。
334337
- reset:重置聚合器。
@@ -593,4 +596,4 @@ VTable 官网示例:https://visactor.io/vtable/demo/table-type/pivot-table.
593596
* @param isResetTree 是否重置表头树结构。 当为true时,会重置表头树结构,当为false时,表头树结构维持不变
594597
*/
595598
updateFilterRules(filterRules: FilterRules, isResetTree: boolean = false) => void
596-
```
599+
```

docs/assets/option/en/table/pivotTable.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ export interface Total {
229229
grandTotalLabel?: string;
230230
//Default 'Subtotal'
231231
subTotalLabel?: string;
232+
// When subtotals are disabled in pivot tables, this option allows aggregated values to be displayed on collapsed tree nodes. Default value is false.
233+
showSubTotalsOnTreeNode?: boolean;
232234
}
233235
```
234236

@@ -268,6 +270,7 @@ export interface CalculatedFieldRule {
268270
calculateFun?: (dependFieldsValue: any) => any;
269271
}
270272
```
273+
271274
### updateAggregationOnEditCell (boolean)
272275

273276
Whether to update total and subtotal after editing cell value. Default value is false.
@@ -460,4 +463,5 @@ columnWidthConfigForRowHeader": [
460463
}
461464
]
462465
```
463-
Matching key is the key of the row dimension: dimensionKey。
466+
467+
Matching key is the key of the row dimension: dimensionKey。

docs/assets/option/zh/table/pivotTable.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ export interface Total {
233233
grandTotalLabel?: string;
234234
// 默认'小计'
235235
subTotalLabel?: string;
236+
// 当在透视表中禁用小计时,此选项允许在折叠的树节点上显示聚合值。默认值为 false
237+
showSubTotalsOnTreeNode?: boolean;
236238
}
237239
```
238240

@@ -272,9 +274,10 @@ export interface CalculateddFieldRule {
272274
calculateFun?: (dependFieldsValue: any) => any;
273275
}
274276
```
277+
275278
### updateAggregationOnEditCell (boolean)
276279

277-
是否在修改单元格后更新小计和总计。默认值为false.
280+
是否在修改单元格后更新小计和总计。默认值为 false.
278281

279282
具体情况请参考[demo](../demo/data-analysis/pivot-analysis-updateTotalData)
280283

@@ -450,6 +453,7 @@ export interface IIndicatorHeaderNode {
450453
## columnWidthConfigForRowHeader(Array)
451454

452455
依据行维度信息设置行表头列宽, 设置示例:
456+
453457
```
454458
columnWidthConfigForRowHeader": [
455459
{
@@ -463,5 +467,5 @@ columnWidthConfigForRowHeader": [
463467
}
464468
]
465469
```
466-
匹配关键是行维度的key:dimensionKey。
467470

471+
匹配关键是行维度的 key:dimensionKey。

0 commit comments

Comments
 (0)