jesco-absolut opened a new pull request, #21674: URL: https://github.com/apache/echarts/pull/21674
<!-- 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? Makes `markLine` labels follow the same item `z2` ordering as their corresponding markLine graphic. ### Fixed issues - #21650: `markLine.data[].z2` affected the line but not the label, so labels could render above higher-`z2` markLines. ## Details ### Before: What was the problem? `markLine` item `z2` was applied to the line path, but the attached label received the default text-content z2 lift from `traverseUpdateZ`. That meant a lower-`z2` markLine label could still be rendered above a higher-`z2` markLine. In the reported case, two markLines with different `z2` values ordered their lines correctly, but their labels did not follow the same ordering. ### After: How does it behave after the fixing? `traverseUpdateZ` now supports a configurable label z2 lift while preserving the existing default behavior. `MarkerView` uses a zero label lift for `markLine`, so the label keeps the same z2 ordering as the markLine item. `markPoint` and `markArea` keep the previous default label lift behavior. A visual case was added to `test/marker-z-z2.html` where two overlapping markLines use `z2: 1` and `z2: 2`; the blue `z2: 2` line and label should render above the red `z2: 1` label. ## 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/marker-z-z2.html` ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information Validation run locally: - `npm run checktype` - `npm run build` - `npx eslint src/util/graphic.ts src/component/marker/MarkerView.ts` - `git diff --check` No `dist/` files are included in this PR. -- 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]
