echarts-bot[bot] commented on issue #18456:
URL: https://github.com/apache/echarts/issues/18456#issuecomment-1491759139
@AdrianDuan It seems you are not using English, I've helped translate the
content automatically. To make your issue understood by more people and get
helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Feature] When the data is empty, the label will not be displayed, and it is
hoped that the label can be displayed
**BODY**
### What problem does this feature solve?
I want to display a custom label when the data is empty, I want to ask if
there is a configuration item that allows displaying the label when the data is
empty?
The following configuration data is an example:
```
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 'No data'
}
return 'has data'
}
}
}
]
};
```
It is not possible to display empty labels when there is no data
### What does the proposed API look like?
Expect the label to have a configuration option to also call the formatter
display tag when the data is empty
</details>
--
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]