rahul37wallst-sudo opened a new pull request, #21688: URL: https://github.com/apache/echarts/pull/21688
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? Make heatmap label truncation use the actual heatmap cell size as its overflow area. ### Fixed issues - #17644: Heatmap labels with `overflow: 'truncate'` required a fixed `label.width`, so truncation did not adapt when cell size changed. ## Details ### Before: What was the problem? Heatmap labels using `overflow: 'truncate'` had no dynamic overflow area tied to the rendered cell rectangle. Users had to set a fixed `series.label.width`, but that fixed width became incorrect when the chart or heatmap cell size changed. This could make labels truncate even when there was enough cell space, or fail to truncate appropriately when cells became smaller. ### After: How does it behave after the fixing? Heatmap cells now pass their rendered rectangle as the label overflow area via `autoOverflowArea` and `layoutRect`. This lets labels with `overflow: 'truncate'` adapt to the actual heatmap cell width/height without requiring a fixed `label.width`. A regression test was added to verify that heatmap label overflow bounds match the cell size and update after chart resize. ## Document Info One of the following should be checked. - [x] This PR doesn't relate to document changes - [ ] The document should be updated later - [ ] The document changes have been made in apache/echarts-doc#xxx ## Misc ### Security Checking - [ ] This PR uses security-sensitive Web APIs. <!-- PLEASE CHECK IT AGAINST: <https://github.com/apache/echarts/wiki/Security-Checklist-for-Code-Contributors> --> ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs `test/ut/spec/series/heatmap.test.ts` Validation run: ```sh npx jest --config test/ut/jest.config.cjs --coverage=false --runInBand --runTestsByPath test/ut/spec/series/heatmap.test.ts npx eslint src/chart/heatmap/HeatmapView.ts test/ut/spec/series/heatmap.test.ts npm run checktype git diff --check ``` Commit hook also passed: ```sh npm run lint npm run checktype ``` ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information N.A. -- 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]
