AdrianDuan opened a new issue, #18456:
URL: https://github.com/apache/echarts/issues/18456
### What problem does this feature solve?
在数据为空时,label不会展示,我想在数据为空时,展示自定义的标签,想问一下是否有配置项允许在数据为空时展示label呢?
以下方配置数据为例:
```
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, '-', 218, 135, 147, 260],
type: 'line',
label: {
show: true,
formatter: (params) => {
if(!params.data) {
return '暂无数据'
}
return '有数据'
}
}
}
]
};
```
无法做到在没有数据的时候展示空标签
### What does the proposed API look like?
希望label有配置选项,允许数据为空时也会调用formatter展示标签
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]