Skip to content

[Bug] ECharts.resize() ERROR! Cannot read properties of undefined (reading 'type') #16642

@masx200

Description

@masx200

Version

5.3.1

Link to Minimal Reproduction

https://ant-colony-algorithm-function-test-3w5nc58v4-masx200.vercel.app/

Steps to Reproduce

ECharts.resize() 

https://github.com/masx200/ant-colony-algorithm-function-test/blob/7a8371201a35e66da1e9aa18da63857fe03521d6/src/appcom.ts
https://github.com/masx200/ant-colony-algorithm-function-test/blob/0ae8b2ddb0c8777c8a703aa67d57742391587fed/functions/echarts-line.ts
https://github.com/masx200/ant-colony-algorithm-function-test/blob/3276347cea90ac2c9535410e3c7a82328005c1a9/src/createchartofcontainer.ts
https://github.com/masx200/ant-colony-algorithm-function-test/blob/3276347cea90ac2c9535410e3c7a82328005c1a9/functions/createmychart.ts
https://github.com/masx200/ant-colony-algorithm-function-test/blob/3276347cea90ac2c9535410e3c7a82328005c1a9/functions/drawlinechart.ts
https://github.com/masx200/ant-colony-algorithm-function-test/blob/3276347cea90ac2c9535410e3c7a82328005c1a9/src/showanddrawrandomgreedyoftsp.ts#L10

Current Behavior

node_modules/echarts/lib/processor/dataSample.js

  if (count > 10 && coordSys.type === 'cartesian2d' && sampling) {
echarts.js:976 
        
       Uncaught TypeError: Cannot read properties of undefined (reading 'type')
    at Object.reset (dataSample.js:112:34)
    at Task2.seriesTaskReset [as _reset] (Scheduler.js:485:70)
    at Task2._doReset (task.js:202:23)
    at Task2.perform (task.js:117:33)
    at Scheduler.js:272:20
    at HashMap2.each (util.js:447:20)
    at Scheduler.js:255:23
    at Array.forEach (<anonymous>)
    at each (util.js:205:13)
    at Scheduler2._performStageTasks (Scheduler.js:221:5)

Expected Behavior

no errors.

Environment

- OS:Microsoft Windows [版本 10.0.19044.1566]
- Browser:Microsoft Edge
版本 99.0.1150.30 (官方内部版本) (64 位)
- Framework:vue 3.2.31

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishsupport

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions