Skip to content

[Bug] Cannot read properties of undefined (reading 'dimensions') #18159

@hansott

Description

@hansott

Version

5.4.1

Link to Minimal Reproduction

https://codesandbox.io/s/new-hill-2jexmu

Steps to Reproduce

{
    "legend": {
        "show": false
    },
    "series": [
        {
            "name": "Api Key",
            "type": "pie",
            "radius": [
                "60%",
                "80%"
            ],
            "avoidLabelOverlap": false,
            "itemStyle": {
                "borderRadius": 0,
                "borderColor": "#fff",
                "borderWidth": 1
            },
            "emphasis": {
                "disabled": true
            },
            "cursor": "auto",
            "label": {
                "show": false
            },
            "markPoint": {
                "tooltip": {
                    "show": false
                },
                "label": {
                    "show": true,
                    "formatter": "{b}",
                    "color": "#102a43",
                    "fontSize": 14,
                    "fontWeight": "bold"
                },
                "data": [
                    {
                        "name": "0%",
                        "value": "-",
                        "symbol": "circle",
                        "itemStyle": {
                            "color": "transparent"
                        },
                        "x": "50%",
                        "y": "50%"
                    }
                ]
            },
            "data": [
                {
                    "name": "With value",
                    "value": 0,
                    "itemStyle": {
                        "color": "#48BB78"
                    }
                },
                {
                    "name": "Without value",
                    "value": 1,
                    "itemStyle": {
                        "color": "#9fb3c8"
                    }
                }
            ],
            "animationDuration": 0,
            "animationDurationUpdate": 0
        }
    ]
}

Current Behavior

TypeError: Cannot read properties of undefined (reading 'dimensions')
    at dataTransform (markerHelper.js:51:23)
    at eval (util.js:336:17)
    at Array.map (<anonymous>)
    at map (util.js:257:16)
    at createData (MarkPointView.js:138:44)
    at MarkPointView.renderSeries (MarkPointView.js:68:18)
    at eval (MarkerView.js:32:28)
    at GlobalModel.eval (Global.js:412:10)
    at Array.forEach (<anonymous>)
    at each (util.js:236:9)
    at GlobalModel.eachSeries (Global.js:410:33)
    at MarkerView.render (MarkerView.js:30:13)
    at eval (echarts.js:1337:23)
    at Array.forEach (<anonymous>)
    at each (util.js:236:9)
    at renderComponents (echarts.js:1334:35)
    at render (echarts.js:1322:7)
    at ECharts.update (echarts.js:1004:9)
    at ECharts.setOption (echarts.js:369:30)
    at $csb$eval (index.js? [sm]:6:7)
    at H (eval.js:31:28)
    at K.evaluate (transpiled-module.js:713:29)
    at ge.evaluateTranspiledModule (manager.js:340:33)
    at c (transpiled-module.js:695:31)
    at loadResources (index.html:3:2)
    at $csb$eval (index.html:9:3)
    at H (eval.js:31:28)
    at K.evaluate (transpiled-module.js:713:29)
    at ge.evaluateTranspiledModule (manager.js:340:33)
    at ge.evaluateModule (manager.js:311:34)
    at compile.ts:765:31
    at c (runtime.js:45:40)
    at Generator._invoke (runtime.js:274:22)
    at forEach.t.<computed> [as next] (runtime.js:97:21)
    at e (asyncToGenerator.js:3:20)
    at a (asyncToGenerator.js:25:9)

Expected Behavior

It doesn't crash

Environment

- OS: macOS Monterey
- Browser: Chrome 108.0.5359.124
- Framework: React

Any additional comments?

Updated from 5.4.0 to 5.4.1 and then the crash occurred

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions