Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
VamoBao opened this issue Jul 15, 2022 · 1 comment · Fixed by #17390
Closed

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

VamoBao opened this issue Jul 15, 2022 · 1 comment · Fixed by #17390
Labels
bug en This issue is in English typescript

Comments

@VamoBao
Copy link

VamoBao commented Jul 15, 2022

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

@VamoBao VamoBao added the bug label Jul 15, 2022
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jul 15, 2022
@plainheart
Copy link
Member

Similar to #17072 (comment). This feature was introduced in #16688 but the type definition was ignored. You are welcome to open a PR to fix it.

@plainheart plainheart added typescript and removed pending We are not sure about whether this is a bug/new feature. labels Jul 15, 2022
@plainheart plainheart modified the milestone: 5.4 Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants