echarts Error when manually controlling selected legends: Cannot read property 'getDisplayList' of null

ep6jt1vc  于 2022-11-05  发布在  Echarts
关注(0)|答案(3)|浏览(158)

Version

5.0.2

Steps to reproduce

Use a manually controlled legend state:
const selectedLegends = {}
legend: [{selected: selectedLegends}]

When you update selectedLegends based on the value in the legendselectchanged event, the library throws an error: "Cannot read property 'getDisplayList' of null"

What is expected?

I can manually control legends without getting an error.

What is actually happening?

I'm getting an error.

9vw9lbht

9vw9lbht1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure thatyou have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list .

Have a nice day! 🍵

cig3rfwq

cig3rfwq3#

The only possibility of this error I can think of is that you are using an instance that has been destroyed.

相关问题