Skip to content
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

feat: matrix coordinate #19807

Open
wants to merge 20 commits into
base: next
Choose a base branch
from
Open

feat: matrix coordinate #19807

wants to merge 20 commits into from

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Apr 9, 2024

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

This PR introduces a new coordinate called "Matrix".

Multiple series like heatmap, pie, graph, custom can be used along with it.

FireShot Capture 002 -  - 127 0 0 1

More applications:

FireShot Capture 003 -  - 127 0 0 1

Fixed issues

Details

Before: What was the problem?

After: How does it behave after the fixing?

Document Info

One of the following should be checked.

Misc

ZRender Changes

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

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

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

Other information

Copy link

echarts-bot bot commented Apr 9, 2024

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.

⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.

@echarts-bot echarts-bot bot added the PR: awaiting doc Document changes is required for this PR. label Apr 11, 2024
Copy link

echarts-bot bot commented Apr 11, 2024

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.

Copy link
Contributor

github-actions bot commented Apr 18, 2024

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

@Ovilia Ovilia marked this pull request as ready for review May 9, 2024 07:41
@Ovilia Ovilia added this to the 6.0.0 milestone May 9, 2024
@Ovilia Ovilia changed the title feat: init matrix coordinate feat: matrix coordinate May 9, 2024
@Ovilia Ovilia linked an issue May 10, 2024 that may be closed by this pull request
Ovilia added a commit to apache/echarts-examples that referenced this pull request May 15, 2024
@Ovilia Ovilia changed the base branch from master to v6 May 15, 2024 07:31
@Ovilia Ovilia requested a review from plainheart May 16, 2024 02:12
Ovilia added a commit to apache/echarts-doc that referenced this pull request May 16, 2024
Ovilia added a commit to apache/echarts-doc that referenced this pull request May 16, 2024
@Ovilia Ovilia changed the base branch from v6 to next May 16, 2024 06:50
src/chart/heatmap/HeatmapView.ts Outdated Show resolved Hide resolved
src/component/matrix/MatrixView.ts Outdated Show resolved Hide resolved
src/coord/matrix/MatrixDim.ts Outdated Show resolved Hide resolved
src/coord/matrix/MatrixDim.ts Outdated Show resolved Hide resolved
src/coord/matrix/MatrixDim.ts Outdated Show resolved Hide resolved
src/component/matrix/MatrixView.ts Outdated Show resolved Hide resolved
src/component/matrix/MatrixView.ts Outdated Show resolved Hide resolved
}

// Outer border
const backgroundStyle = matrixModel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These borders may overlap and cause a darker border color. I'm not sure if we should provide a similar ability like the CSS table property border-collapse. It looks not easy to implement that feature.

And the chart seems rendering unexpectedly if I set the width of both the outer border and inner border to 0.

backgroundStyle: {
    borderWidth: 0
},
innerBackgroundStyle: {
    borderWidth: 0
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The border won't be darker unless the opacity of borderColors are not 1. I personally think providing a border-collapse like mechanism is over-kill because then, we should also implement other features like border widths and colors being different values at four sides. This should bring much work to implement it robustly. The reason why I choose to render rectangles with background and border is that it would be more difficult to think which option controls which border line.

The image you provided is as expected. You should add x.itemStyle.borderWidth: 0 and y.itemStyle.borderWidth: 0 if you want to remove those rest borders.

Copy link
Member

@plainheart plainheart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package.json may need to be updated as well. 🤔

"./lib/component/aria": "./lib/component/aria.js",

@echarts-bot echarts-bot bot added PR: doc ready and removed PR: awaiting doc Document changes is required for this PR. labels May 21, 2024
@apache apache deleted a comment from gooroodev May 26, 2024
@apache apache deleted a comment from admsev May 26, 2024
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] Matrix Coordinate
2 participants