[Bug] pie tooltip.formatter lable.formatter params[0].dimensionNames value is empty when use enode option since v5.2.0, v5.1.2 is ok
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
since 5.2
### Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsAmBDMWDOApmAFywDaa6ylVsewArgE4DGBpFttZA5ALJZoDLABtYAdWBMA1jwA0sAIwAWBTwDEAMW0B2AAx75sAKwBdOTS68AktDwgCLSDCOLja9ToAiegMxeAQSNlc0tufiwIaDACaEE2V18PbQA2AGEDYNMw2FCuTAgAW1i8KDsOHPQeLCcIADcIMABPAH0mAnwYFpYcAgBzKVa44vlK2Grahua2jvpobt6BplaIDFH8qprIKdb2zvmemKXWlmARRiZ1jZ4MZhwynhzs2gBfSjy6AiYIAjwK2lQ-WaDlIPBAPyutCYWAwEAYf3IPGUegApEYePo0R9aLFThh2NQNrBGgRCgA5LDFUFbeqNXazLqHfqDFrDAiQrh1UQMAk3O7OaCPfIvCxA4BnSAgUiAjYAMykhRwMSYAAoCABKQlE2CnOxnAgAOnOfTV6rGb2Foq4JMKAGVmiICTL8qdzkxSCqAB6a-AAPmQsHaYGYcE9BuwuDIACZTABuWAWriJ9CJj6OvqxDDSkWwMDikSS7MoF6xoA&version=5.3.0
### Steps to Reproduce
```javascript
option = {
dataset: [
{
source: [
['Manual Work', 14, '#FFF700', 5],
['Inspection', 15, '#7D03DA', 4],
['Maintenance', 13, '#FF6C00', 4]
],
dimensions: [
'activity_reason_category_name',
'activity_reason_category_id',
'activity_reason_category_colour',
'duration'
]
}
],
series: [
{
type: 'pie',
radius: ['40%', '70%'],
encode: {
itemName: 'activity_reason_category_name',
value: 'duration'
},
tooltip: {
formatter(e) {
console.log(e)
}
},
itemStyle: {
color: (x) => { return x.data[2]; }
}
}
],
legend: {}, tooltip: {}
};
```
### Current Behavior
```json
{
"componentType": "series",
"componentSubType": "pie",
"componentIndex": 0,
"seriesType": "pie",
"seriesIndex": 0,
"seriesId": "\u0000series\u00000\u00000",
"seriesName": "series\u00000",
"name": "Maintenance",
"dataIndex": 2,
"data": [
"Maintenance",
13,
"#FF6C00",
4
],
"value": [
"Maintenance",
13,
"#FF6C00",
4
],
"color": "#FF6C00",
"dimensionNames": [], // this is empty
"encode": {
"value": [
3
]
},
"$vars": [
"seriesName",
"name",
"value",
"percent"
],
"percent": 30.77,
"marker": ""
}
```
### Expected Behavior
```json
{
"componentType": "series",
"componentSubType": "pie",
"componentIndex": 0,
"seriesType": "pie",
"seriesIndex": 0,
"seriesId": "\u0000series\u00000\u00000",
"seriesName": "series\u00000",
"name": "Maintenance",
"dataIndex": 2,
"data": [
"Maintenance",
13,
"#FF6C00",
4
],
"value": [
"Maintenance",
13,
"#FF6C00",
4
],
"color": "#FF6C00",
"dimensionNames": [], // expect ['activity_reason_category_name', 'activity_reason_category_id', 'activity_reason_category_colour', 'duration']
"encode": {
"value": [
3
]
},
"$vars": [
"seriesName",
"name",
"value",
"percent"
],
"percent": 30.77,
"marker": ""
}
```
### Environment
```markdown
- OS: any
- Browser: any
- Framework: any
```
### Any additional comments?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.