Xnadir opened a new pull request, #21866: URL: https://github.com/apache/echarts/pull/21866
## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? Draws a polar bar series with `large: true` normally instead of throwing, since large mode is only laid out for cartesian2d. ### Fixed issues - #21856: Bar series on polar crashes with `large: true` once data reaches `largeThreshold` (LargePath.buildPath) ## Details ### Before: What was the problem? `preparePipelineContext` sets `large` whenever `large: true` and the data count reaches `largeThreshold`. `BarSeries.getProgressive()` also enables progressive rendering when `large` is set. But the large layout (`largePoints`) is only built for cartesian2d. On a polar bar series, `BarView` took the large path, built a `LargePath` without points, and threw `TypeError: Cannot read properties of undefined (reading 'length')` in `LargePath.buildPath`. Nothing was drawn. ### After: How does it behave after the fixing? `BarSeries` checks `coordinateSystem === 'cartesian2d'` before entering large or progressive rendering. On polar, `__preparePipelineContext` turns `large` and `progressiveRender` off and `getProgressive()` returns `false`, so the series renders through the normal path. That is the fallback the issue expects. Cartesian2d is unchanged. Tests added to `test/ut/spec/series/bar.test.ts`: - a polar bar with `large: true`, `largeThreshold: 2` and three items must not throw, and every item must have a graphic element. It fails on `master` with the TypeError; - a cartesian2d bar with the same settings still has `pipelineContext.large === true`. Ran locally: - `npx jest --config test/ut/jest.config.cjs test/ut/spec` (all unit tests pass); - `eslint` on the changed files; - `tsc -p tsconfig.json --noEmit`. ## Document Info - [x] This PR doesn't relate to document changes ## Misc ### Security Checking - [ ] This PR uses security-sensitive Web APIs. ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs N.A. ### Merging options - [ ] Please squash the commits into a single one when merging. ### Other information This change was written with the help of Claude Code (AI). I reviewed it and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
