Skip to content

feat(scatter): add jitterRng / jitterSeed option to configure a custom random number generator or a random seed for deterministic jitter layout - #21765

Open
plainheart wants to merge 1 commit into
masterfrom
jitter-rng
Open

plainheart wants to merge 1 commit into
masterfrom
jitter-rng

Conversation

@plainheart

@plainheart plainheart commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Introduce two new options for deterministic jitter layout; that is, the layout is fixed when data remains unchanged.

  • jitterSeed - The seed for the random number generator. Defaults to 'echarts-jitter'. Internally, it uses a simple RNG based on the Mulberry32 algorithm.
  • jitterRng - A fully custom random number generator for advanced usage.

Fixed issues

Resolves #21753

Details

Before: What was the problem?

The jitter layout always changes even if the data remains unchanged.

After: How does it behave after the fixing?

The jitter layout remains fixed when the data remains unchanged.

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

TODO

Merging options

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

Other information

…ustom random number generator or a random seed for deterministic jitter layout
@echarts-bot

echarts-bot Bot commented Sep 28, 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.

The pull request is marked to be PR: author is committer because you are a committer of this project.

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

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.

[Feature] After jitter is set for the scatter points, the scatter points are displayed with fixed coordinates.

1 participant