We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
透视表组内排序数据不一定全是数字,如果数据不是数字格式的,例如百分比,进行组内排序时会按照字符串的规则进行排序,字符串的排序规则对于百分比的排序显然会出现错误,如果想让百分比也按照数字的排序规则进行排序应该如何处理呢?
我尝试过使用sortFunc,但是调用sortFunc方法返回的params参数里的data不是按照分组返回的,我对data里的数据进行排序处理返回后,所有的分组都会依照我返回的顺序进行排序。这样也会出现问题(不同分组的内部数据可能会出现重复,但是它们的顺序不一定是一样的)
百分比排序问题示例:https://codesandbox.io/p/sandbox/blissful-cori-x96vz9?file=%2Fsrc%2Findex.js%3A84%2C13 sortFunc方法排序问题示例:https://codesandbox.io/p/sandbox/interesting-ride-r3sw4q?file=%2Fsrc%2Findex.js%3A76%2C14
希望类似百分比等存在数字含义的数据能按照数字的排序规则进行排序
不符合数字格式的数据都会默认按照字符串的排序规则进行排序
The text was updated successfully, but these errors were encountered:
Demo 链接打不开
Sorry, something went wrong.
我刚刚点击试了,可以打开的呀
No branches or pull requests
🏷 Version
Sheet Type
🖋 Description
透视表组内排序数据不一定全是数字,如果数据不是数字格式的,例如百分比,进行组内排序时会按照字符串的规则进行排序,字符串的排序规则对于百分比的排序显然会出现错误,如果想让百分比也按照数字的排序规则进行排序应该如何处理呢?
我尝试过使用sortFunc,但是调用sortFunc方法返回的params参数里的data不是按照分组返回的,我对data里的数据进行排序处理返回后,所有的分组都会依照我返回的顺序进行排序。这样也会出现问题(不同分组的内部数据可能会出现重复,但是它们的顺序不一定是一样的)
🔗 Reproduce Link
百分比排序问题示例:https://codesandbox.io/p/sandbox/blissful-cori-x96vz9?file=%2Fsrc%2Findex.js%3A84%2C13
sortFunc方法排序问题示例:https://codesandbox.io/p/sandbox/interesting-ride-r3sw4q?file=%2Fsrc%2Findex.js%3A76%2C14
😊 Expected Behavior
希望类似百分比等存在数字含义的数据能按照数字的排序规则进行排序
😅 Current Behavior
不符合数字格式的数据都会默认按照字符串的排序规则进行排序
The text was updated successfully, but these errors were encountered: