susiwen8 opened a new pull request, #21601: URL: https://github.com/apache/echarts/pull/21601
## Summary Fixes apache/echarts#21512 by making line sampling calculate its sampling rate from the current base-axis visible extent instead of only the post-filter `SeriesData` count. With `dataZoom.filterMode: 'none'` or `'empty'`, ECharts intentionally keeps the full data list. The old sampling code therefore kept using the full dataset size after zooming in, so narrow windows could remain downsampled and lose detail. This change keeps `filter` behavior intact while allowing `none` and `empty` to reveal raw detail when the visible window is small enough. ## Changes - Count data points inside the current base-axis extent before computing the line sampling rate. - Skip the sampling processor for `sampling: 'none'` to avoid an unnecessary pass over default no-op sampling. - Add an HTML regression case comparing `filter`, `none + lttb`, `empty + lttb`, and `none + no sampling` around a narrow zoom window. ## Verification - `npm run checktype -- --pretty false` - `npm run lint -- --quiet src/processor/dataSample.ts` - `git diff --check -- src/processor/dataSample.ts test/line-sampling-dataZoom-filterMode.html` - `test/line-sampling-dataZoom-filterMode.html` in Chrome with the local fixed bundle: PASS; `none` and `empty` processed counts match raw data count in the zoomed window scenario. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
