Skip to content

fix(visualMap): prevent overlapping controller gradients - #21825

Draft
diysimon wants to merge 1 commit into
apache:masterfrom
diysimon:fix-21438-visualmap-gradient
Draft

diysimon wants to merge 1 commit into
apache:masterfrom
diysimon:fix-21438-visualmap-gradient

Conversation

@diysimon

@diysimon diysimon commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Brief Information

  • bug fixing
  • new feature
  • others

What does this PR do?

Prevent the out-of-range gradient from blending into translucent selected colors in a continuous visualMap controller.

Fixed issues

Details

Before

The out-of-range polygon spans the entire controller, so it is visible through translucent in-range colors.

After

Clip the out-of-range polygon to exclude the selected polygon while preserving its original geometry and gradient, including the visible side when controller symbol sizes differ. The clipping polygon is updated as the range changes.

Document Info

  • This PR doesn't relate to document changes

Misc

Tests

  • Jest: 27 suites, 197 tests passed, including new range update and crossing geometry tests.
  • npm run checktype, npm run lint:nocache, and npm run build passed.
  • Chrome Canvas and SVG: translucent selected midpoint rendered as expected gray on white. Previous local tests covered orientations, inverse, partial/full/collapsed ranges, symbol-size variants, and dragging; the crossing geometry case used an injected size mapping.
  • Full visual comparison suite, TypeScript version matrix, Firefox/Safari and real touch devices were not run.

AI assistance

OpenAI Codex (GPT-6) generated and tested the implementation, tests, and PR text. The commit includes a Generated-by trailer.

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes.

@echarts-bot

echarts-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant