We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.2.2
No response
I want to toggle the "smooth" property of my chart series.
Currently, I have to use this if statement:
inside the foreach statement, set is of type SeriesOption$1 Inside the if statement, set is of type LineSeriesOption$1
SeriesOption$1
LineSeriesOption$1
option.value.series.forEach((set) => { if (set.type === "line") { set.smooth = !set.smooth; } });
I would like the filter to return LineSeriesOption$1, so I can use the following code:
option.value.series.filter((set) => set.type === "line").forEach((set) => { set.smooth = !set.smooth; });
- OS: macOS Monterey M1 2020 - Browser: Chrome - Framework: Vue 3 + vue-echarts library
Just a note, not high priority for me.
The text was updated successfully, but these errors were encountered:
Seems it's the limitation of TypeScript. There is no type narrowing for the filter method. See microsoft/TypeScript#20812 (comment)
TypeScript
filter
Sorry, something went wrong.
No branches or pull requests
Version
5.2.2
Link to Minimal Reproduction
No response
Steps to Reproduce
Current Behavior
I want to toggle the "smooth" property of my chart series.
Currently, I have to use this if statement:
inside the foreach statement, set is of type
SeriesOption$1
Inside the if statement, set is of type
LineSeriesOption$1
Expected Behavior
I would like the filter to return
LineSeriesOption$1
, so I can use the following code:Environment
Any additional comments?
Just a note, not high priority for me.
The text was updated successfully, but these errors were encountered: