You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] In Line series chart, the series is not removed when using the legend for filter After applying the datazoom #18688
changed the title [-][Bug] In Line series chart, the series is not removed when using the lengen for filter After applying the datazoom[/-][+][Bug] In Line series chart, the series is not removed when using the legend for filter After applying the datazoom[/+]on May 31, 2023
I can reproduce it. Important is using the dataslider as described in the "steps to reproduce". Even if all series are hidden from the legend, there remain some lines on the screen.
with 10,000+ data points, 5 zooms and additional controls like moveOnMouseMove, moveOnMouseWheel, zoomOnMouseWheel - no wonder there are problems. This is not a Minimal Reproduction and chances of some volunteer debugging it are very slim.
Thanks for this minimal reproduction. Indeed weird behavior and definitely a bug imho.
I played around with the minimal a little bit and realized that the bug does not occure if the dataZoom.filterMode is not set to none. However, this should be a valid setting to avoid "empty" charts when zooming in and having the points of the zoom range.
I tried again by removing the dataZoom.filterMode but the problem still persist if the number of datapoints are more.
One possible solution would be to have option in the legend to have at least legend avaiable for selection as selecting all the legend would result in showing no series which i dont think is desirable.
Having option like selectedMode: custom and user can define how much selection they want to provide
I solved it with below solution
onLegendSelectChanged(event: any): void{constselectedLegendCount=Object.values(event.selected).filter((value)=>value,).length;// Prevent further legend selectionif(selectedLegendCount===0){// get the eChartInstanceeChartInstance.dispatchAction({type: 'legendSelect',// keep the legend selectionname: event.name,});}}
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
Activity
[-][Bug] In Line series chart, the series is not removed when using the lengen for filter After applying the datazoom[/-][+][Bug] In Line series chart, the series is not removed when using the legend for filter After applying the datazoom[/+]helgasoft commentedon May 31, 2023
could not reproduce in given codepen.io link
elnipa commentedon Jun 12, 2023
I can reproduce it. Important is using the dataslider as described in the "steps to reproduce". Even if all series are hidden from the legend, there remain some lines on the screen.
elnipa commentedon Sep 29, 2023
any progress on this bug?
helgasoft commentedon Sep 29, 2023
with 10,000+ data points, 5 zooms and additional controls like moveOnMouseMove, moveOnMouseWheel, zoomOnMouseWheel - no wonder there are problems. This is not a Minimal Reproduction and chances of some volunteer debugging it are very slim.
Suraj-Singhvi commentedon Jan 5, 2024
I have created a minimal reproduction sample here https://codepen.io/Suraj-Singhvi/pen/eYXJwXM
the weird part is it works fine when the datapoints for each series is around 1450 but fails for 1500+ points.
Try to tweak the numbers in the example shared
elnipa commentedon Jan 5, 2024
Thanks for this minimal reproduction. Indeed weird behavior and definitely a bug imho.
I played around with the minimal a little bit and realized that the bug does not occure if the
dataZoom.filterModeis not set tonone. However, this should be a valid setting to avoid "empty" charts when zooming in and having the points of the zoom range.Suraj-Singhvi commentedon Jan 19, 2024
I tried again by removing the
dataZoom.filterModebut the problem still persist if the number of datapoints are more.One possible solution would be to have option in the legend to have at least legend avaiable for selection as selecting all the legend would result in showing no series which i dont think is desirable.
Having option like
selectedMode: customand user can define how much selection they want to provideI solved it with below solution
github-actions commentedon Jan 18, 2026
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
github-actions commentedon Jan 25, 2026
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
fix: (1) Fix that ctx.save() and ctx.restore() do not properly paired…