Skip to content

feat(matrix): Support matrix.x/y.length for conveniently create a headless matrix without composing an array. #21191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

100pah
Copy link
Member

@100pah 100pah commented Aug 8, 2025

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

A tiny update:

Support matrix.x/y.length for conveniently create matrix without composing an array when header is not needed.

Before:

matrix: {
    x: {data: Array(5).fill(null)},
    y: {data: Array(3).fill(null)},
}

After:

// Support this way, more straightforward.
matrix: {
    x: {length: 5},
    y: {length: 3},
}

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

TODO Doc: Need to clarify that:
If neither matrix.x.data nor matrix.x.length exists, it collect values from series.data or dataset.source.

Copy link
Contributor

github-actions bot commented Aug 8, 2025

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21191@5e54f9d

@plainheart plainheart added this to the 6.0.1 milestone Aug 11, 2025
@plainheart plainheart added PR: author is committer PR: awaiting doc Document changes is required for this PR. labels Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: author is committer PR: awaiting doc Document changes is required for this PR. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants