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

dataZoom.startValue - Type 'string' is not assignable to type 'number' #14412

Closed
dileepyelleti opened this issue Mar 5, 2021 · 4 comments
Closed
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English typescript waiting-for: community
Milestone

Comments

@dileepyelleti
Copy link
Contributor

dileepyelleti commented Mar 5, 2021

Version

5.0.2

Steps to reproduce

Using datazoom option for line chart similar to https://echarts.apache.org/examples/en/editor.html?c=line-aqi inside angular.
import { EChartsOption } from 'echarts';
{
....
dataZoom: {
type: 'inside',
startValue: '2014-06-01'
}
....
}

What is expected?

As per documentation number, string, Date are allowed in dataZoom.startValue.

What is actually happening?

Type error is getting thrown Type 'string' is not assignable to type 'number'. node_modules/echarts/types/dist/echarts.d.ts:8213:5 startValue?: number;

@echarts-bot
Copy link

echarts-bot bot commented Mar 5, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Mar 5, 2021
@pissang pissang added typescript difficulty: easy Issues that can be fixed more easily than the average. and removed pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Mar 8, 2021
@echarts-bot
Copy link

echarts-bot bot commented Mar 8, 2021

This issue is labeled with difficulty: easy.
@dileepyelleti Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.

Please have a look at How to debug ECharts if you'd like to give a try. 🤓

@pissang pissang added this to the 5.x milestone Mar 8, 2021
@dileepyelleti
Copy link
Contributor Author

Hi @pissang
I tried to fix it and create PR. But it is not that easy of changing to number | string | Date. It has other dependancies and leading to option: Opt; // TODO Opt should only be object.
I shouldn't fix this TODO as it may cause some other problems.

@dileepyelleti
Copy link
Contributor Author

Hi @pissang
I have created PR for this issue. Please have a look #14775

pissang added a commit that referenced this issue May 12, 2021
fix(dataZoom): type fix for startValue and endValue. close #14412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English typescript waiting-for: community
Projects
None yet
Development

No branches or pull requests

2 participants