Skip to content

[Bug] Fails to render a chart when dataset has a field called "length" #18050

@scottpaulin

Description

@scottpaulin

Version

5.4.0

Link to Minimal Reproduction

https://jsfiddle.net/pb25u3gh/

Steps to Reproduce

Create a chart with echarts or echarts-for-react

When a field of the input dataset is called "length" then echarts fails to render and does not output an error or warning.

The following options result in echarts failing to render a chart:

{
    "dataset": {
        "source": [
            {
                "length": 1,
                "elevation_above_sea_level": 4,
                "width": 4
            }
        ]
    },

    "xAxis": {
        "type": "value"
    },
    "yAxis": {
        "type": "value"
    },
    "series": [
        {
            "type": "line",
            "encode": {
                "x": "length",
                "y": "elevation_above_sea_level"
            }
        }
    ]
}`

echarts is able to render a chart with the following options
`{
    "dataset": {
        "source": [
            {
                "ln": 1,
                "elevation_above_sea_level": 4,
                "width": 4
            }
        ]
    },

    "xAxis": {
        "type": "value"
    },
    "yAxis": {
        "type": "value"
    },
    "series": [
        {
            "type": "line",
            "encode": {
                "x": "length",
                "y": "elevation_above_sea_level"
            }
        }
    ]
}

Current Behavior

When a dataset has a field called length then echarts does not render a chart or throw an error/warning

Expected Behavior

When a dataset has a field called "length" then echarts should either:

  • render the chart correctly, or
  • print an error or warning to the console

Environment

- OS:Ubuntu 22.10
- Browser:Chrome
- Framework: React (Nextjs)

Any additional comments?

ECharts is an amazing library. Thank you for all of your efforts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions