-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Description
🏷 S2 Version / S2 版本
Package | Version |
---|---|
@antv/s2 | 2.4.6 |
@antv/s2-react | |
@antv/s2-react-components |
💻 Sheet Type / 表格类型
- PivotSheet
- TableSheet
- PivotChartSheet
- GridAnalysisSheet
- StrategySheet
- EditableSheet
🖋 Describe the bug / 问题描述
customValueOrder=0时,多个数值列的总计表头被合并到一起了。


⌨️ Code Snapshots / 代码片段
import { PivotSheet, S2DataConfig, S2Options } from '@antv/s2';
const container = document.getElementById('container');
const s2DataConfig: S2DataConfig = {
fields: {
rows: ['province', 'city'],
columns: ['type', 'sub_type'],
values: ['number', 'price'],
valueInCols: true,
// 自定义指标属性层级顺序, 即 fields.values 的顺序 (从 0 开始)
customValueOrder: 0,
},
data: [
{
"number": 7789,
"province": "浙江省",
"city": "杭州市",
"type": "家具",
"sub_type": "桌子",
"price": 1899
},
],
meta: [
{
field: 'number',
name: '数量',
},
{
field: "price",
name: "价格",
},
{
field: 'province',
name: '省份',
},
{
field: 'city',
name: '城市',
},
{
field: 'type',
name: '类别',
},
{
field: 'sub_type',
name: '子类别',
},
],
};
const s2Options: S2Options = {
width: 600,
height: 480,
cornerExtraFieldText: "度量",
totals: {
col: {
showGrandTotals: true,
showSubTotals: true,
reverseGrandTotalsLayout: true,
reverseSubTotalsLayout: true,
},
row: {
reverseGrandTotalsLayout: true,
reverseSubTotalsLayout: true,
showGrandTotals: true,
showSubTotals: true,
subTotalsDimensions: ['price'],
}
}
};
const s2 = new PivotSheet(container, s2DataConfig, s2Options);
s2.render();
🔗 Reproduction link / 复现链接
https://s2.antv.antgroup.com/examples/custom/custom-layout/#custom-value-order
📋 Steps to Reproduce the Bug or Issue / 重现步骤
将上面代码粘贴到链接到demo里,调整customValueOrder值为0
😊 Expected Behavior / 期望行为

😅 Current Behavior / 当前行为
No response
💻 OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
🌏 Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他
Metadata
Metadata
Assignees
Labels
No labels