Skip to content

🐛透视表自定义列头后,行维度的外侧排序失效 #3204

@Ahui4518

Description

@Ahui4518

🏷 S2 Version / S2 版本

Package Version
@antv/s2 *
@antv/s2-react
@antv/s2-react-components

💻 Sheet Type / 表格类型

  • PivotSheet
  • TableSheet
  • PivotChartSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Describe the bug / 问题描述

当使用透视表的自定义列头的时候,行维度根据TOTAL_VALUE的排序失效

⌨️ Code Snapshots / 代码片段

{
fields: {
    "columns": [
        {
            "field": "所有量值[实际销售数量]",
            "title": "实际销售数量",
            "description": "实际销售数量",
            "express": {
                "measure": {
                    "property": "实际销售数量",
                    "expression": {
                        "string": {
                            "value": "所有量值"
                        }
                    }
                }
            }
        }
    ],
    "rows": [
        "商品大类",
        "品牌",
        "商品年份"
    ],
    "values": [
        "所有量值[实际销售数量]"
    ],
    "valueInCols": true
},
[
    {
        "sortFieldId": "商品大类",
        "sortByMeasure": "$$total$$",
        "sortMethod": "desc",
        "query": {
            "$$extra$$": "所有量值[实际销售数量]"
        }
    },
    {
        "sortFieldId": "品牌",
        "sortByMeasure": "$$total$$",
        "sortMethod": "desc",
        "query": {
            "$$extra$$": "所有量值[实际销售数量]"
        }
    },
    {
        "sortFieldId": "商品年份",
        "sortByMeasure": "$$total$$",
        "sortMethod": "desc",
        "query": {
            "$$extra$$": "所有量值[实际销售数量]"
        }
    }
]
}

这是字段配置和相关的排序设置

🔗 Reproduction link / 复现链接

No response

📋 Steps to Reproduce the Bug or Issue / 重现步骤

Image
只要是透视表自定义列头,外加行维度超过一个就能复现

😊 Expected Behavior / 期望行为

Image 预期是像图片所示,当行有多个维度时,外侧维度根据设置按汇总数据排序

😅 Current Behavior / 当前行为

No response

💻 OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

🌏 Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    💤 inactive不活跃的 Issue 或 PR, 30天没有回复

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions