Skip to content

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

Merged
plainheart merged 1 commit intomasterfrom
feat/matrix-tweak
Oct 24, 2025
Merged

feat(matrix): support matrix.x/y.length for conveniently creating a headless matrix without composing an array#21191
plainheart merged 1 commit intomasterfrom
feat/matrix-tweak

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.

@github-actions
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
@plainheart plainheart changed the title feat(matrix): Support matrix.x/y.length for conveniently create a headless matrix without composing an array. feat(matrix): support matrix.x/y.length for conveniently creating a headless matrix without composing an array Oct 24, 2025
@echarts-bot
Copy link

echarts-bot bot commented Oct 24, 2025

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.

@plainheart plainheart merged commit 2a09845 into master Oct 24, 2025
2 checks passed
@echarts-bot
Copy link

echarts-bot bot commented Oct 24, 2025

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@plainheart plainheart deleted the feat/matrix-tweak branch October 24, 2025 09:10
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