[Bug] series endLabel failed if no point on chart
Version
5.4.1
Link to Minimal Reproduction
https://codesandbox.io/s/cdy362?file=/index.js
Steps to Reproduce
Create echart without option
option = {
xAxis: {
type: 'time',
},
yAxis: {
type: 'value'
},
series: [
{
data: [
[new Date('1973-11-25:00:00'), null],
[new Date('1973-11-25:01:00'), null],
[new Date('1973-11-25:02:00'), null],
[new Date('1973-11-25:03:00'), null],
[new Date('1973-11-25:04:00'), null],
[new Date('1973-11-25:05:00'), null],
[new Date('1973-11-25:06:00'), 5]],
type: 'line',
endLabel: {show: true}
}
]
};
Works...
option = {
xAxis: {
type: 'time',
},
yAxis: {
type: 'value'
},
series: [
{
data: [
[new Date('1973-11-25:00:00'), null],
[new Date('1973-11-25:01:00'), null],
[new Date('1973-11-25:02:00'), null],
[new Date('1973-11-25:03:00'), null],
[new Date('1973-11-25:04:00'), null],
[new Date('1973-11-25:05:00'), null],
[new Date('1973-11-25:06:00'), null]],
type: 'line',
endLabel: {show: true}
}
]
};
Fail...
failed to run code TypeError: uc(...).setLabelText is not a function
at e._endLabelOnDuring (echarts.min.js:45:347602)
at RS.l (echarts.min.js:45:339639)
at RS (echarts.min.js:45:339942)
at e.render (echarts.min.js:45:342029)
at t.progress (echarts.min.js:45:166701)
at t._doProgress (echarts.min.js:45:135208)
at t.perform (echarts.min.js:45:134780)
at echarts.min.js:45:215513
at e.
Current Behavior
if no only value === null in area/chart
failed to run code TypeError: uc(...).setLabelText is not a function
at e._endLabelOnDuring (echarts.min.js:45:347602)
at RS.l (echarts.min.js:45:339639)
at RS (echarts.min.js:45:339942)
at e.render (echarts.min.js:45:342029)
at t.progress (echarts.min.js:45:166701)
at t._doProgress (echarts.min.js:45:135208)
at t.perform (echarts.min.js:45:134780)
at echarts.min.js:45:215513
at e.
Expected Behavior
no error
Environment
- OS: Windows 11
- Browser: Edge
- Framework: angular
Any additional comments?
No response
maybe it will work with some decent dates...
no, just change the last value 5 or null and that's work or not No choice I have to disabled this feature in my graph
yes for sure, but doesnt have to raise an error in jsconsole
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!