dongyikuan919 opened a new pull request, #21889: URL: https://github.com/apache/echarts/pull/21889
## Brief Information - [x] bug fixing ### What does this PR do? Keeps the layout and SVG geometry finite for an all-zero theme river. ### Fixed issues Fixes #21888. ## Details ### Before With all values zero, the maximum layer total is zero. Dividing the layout height by that value makes the scale infinite, so both the zero baseline and zero thickness turn into `NaN` when multiplied by it. ### After Use a zero scale when the maximum is zero. The layers have zero height and valid coordinates. An SSR smoke test confirms mixed and ordinary input still produce the same layout as before. ## Document Info - [x] This PR doesn't relate to document changes ## Misc ### Related test cases - Added a regression in `test/ut/spec/series/themeRiverLayout.test.ts`. It failed before the fix when the layer coordinates were `NaN` and passes with finite geometry. - `npm test -- --runInBand --coverage=false` — 195 tests passed. - `npm run checktype` and ESLint on the two changed files passed. -- 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]
