VChart
VChart copied to clipboard
【Improved configuration ease of use】The configuration of field sorting in the data attribute is confusing
背景
fields:{
value: {
sortIndex: 1,
sortReverse: true
}
sortIndex 属性在理解上有成本: 0 和 1 是什么?为什么要配置成 1?在大部分场景,用户只是想针对一个字段进行排序,其实期望直接配置一个类似 [field]: {sort: 'desc' | 'asc' } 就好了。