Skip to content

fix(visualMap): retain string type for raw categories to avoid precision loss (#21714) - #21715

Open
Raman-Katiyar wants to merge 1 commit into
apache:masterfrom
Raman-Katiyar:fix/visualmap-large-string-precision
Open

fix(visualMap): retain string type for raw categories to avoid precision loss (#21714)#21715
Raman-Katiyar wants to merge 1 commit into
apache:masterfrom
Raman-Katiyar:fix/visualmap-large-string-precision

Conversation

@Raman-Katiyar

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Retains string type for raw categories in visualMap during evaluation to prevent precision loss on large integer strings.

Fixed issues

Details

Before: What was the problem?

When large integer strings (e.g., '6053822903760037657') are passed as categories in visualMap, converting them to numbers causes precision loss, causing visual mapping and rendering to fail.

After: How does it behave after the fixing?

The raw string type is preserved during visualMap evaluation in applyVisual, maintaining exact category matching and rendering the chart items correctly.

Document Info

One of the following should be checked.

  • 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.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

test/test_bug21714.html

Merging options

  • Please squash the commits into a single one when merging.

Other information

@echarts-bot

echarts-bot Bot commented Aug 8, 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.

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