Skip to content

[Bug] Type error in series line option, the scale option in emphasis #17384

@VamoBao

Description

@VamoBao

Version

5.3.2

Link to Minimal Reproduction

No response

Steps to Reproduce

create chart with echarts.init(),and setOption to set the option,here is the part of my option,and I assign a number for scale, the typescript report an error which is type 'number' is not assignable to type 'boolean',but the doc show number has been supported since v5.3.2

const option:EChartsOption = {
    series: [
      {
        name: mainTitle,
        type: 'line',
        yAxisIndex: 0,
        data: mainData,
       emphasis:{
          scale:1.5
        },
        areaStyle: {
          color: {
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [{
              offset: 0, color: 'rgba(0, 100, 255, .2)',
            }, {
              offset: 1, color: 'rgba(255, 255, 255, .2)',
            }],
          },
        },
      },
    ],
  };

Current Behavior

assign a number for scale, report an error

Expected Behavior

correct type detection

Environment

- OS:win10
- Browser: Chrome 103.0.5060.114
- Framework:React@17

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions