Skip to content

Conversation

susiwen8
Copy link
Contributor

@susiwen8 susiwen8 commented Apr 18, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

View center option support string

Fixed issues

Details

Before: What was the problem?

Kapture 2022-04-18 at 22 48 32

After: How is it fixed in this PR?

Kapture 2022-04-18 at 23 08 03

Misc

  • The API has been changed (apache/echarts-doc#xxx).
  • 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

@echarts-bot
Copy link

echarts-bot bot commented Apr 18, 2022

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.

@susiwen8 susiwen8 requested a review from plainheart April 20, 2022 13:34
@susiwen8 susiwen8 changed the title fix(graph): roam center don't support string feat(View): View center suuport string Apr 20, 2022
@susiwen8 susiwen8 requested a review from pissang April 21, 2022 13:56
@plainheart plainheart changed the title feat(View): View center suuport string feat(View): View center supports string Apr 21, 2022
@susiwen8 susiwen8 requested a review from pissang April 24, 2022 09:03
@pissang pissang added this to the 5.3.3 milestone Apr 28, 2022
@susiwen8 susiwen8 requested a review from pissang April 28, 2022 14:07
Copy link
Contributor

@pissang pissang left a comment

Choose a reason for hiding this comment

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

LGTM @plainheart any more suggestions?

@susiwen8 susiwen8 merged commit bc64125 into apache:master May 1, 2022
@echarts-bot
Copy link

echarts-bot bot commented May 1, 2022

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

@susiwen8 susiwen8 deleted the graphe-roam branch May 1, 2022 10:00
@Ovilia Ovilia added PR: doc ready PR: awaiting doc Document changes is required for this PR. and removed PR: doc ready labels Jun 13, 2022
Ovilia added a commit to apache/echarts-doc that referenced this pull request Jun 13, 2022
@Ovilia Ovilia added PR: doc ready and removed PR: awaiting doc Document changes is required for this PR. labels Jun 13, 2022
100pah added a commit that referenced this pull request Jun 15, 2025
…But it was based on canvas width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if the `View['_rect']` is not calculated based on the current canvas rect. Therefore the percentage value is changed to based on `View['_rect'].width/height` since v6. Under this definition, users can use '0%' to map the top-left of `View['_rect']` to the center of `View['_viewRect']`.
100pah added a commit that referenced this pull request Jun 15, 2025
…ectVerticalAlign` for series.map/geo/series.graph in box layout (lay out by left/right/top/bottom/width/height).

(2) Support `clip` on geo/series.map
(3) Support `roamTigger: 'global' | 'selfRect'` to switch roam area to global on only self bounding rect.
(4) Support cursor style change when hovering the roaming enabled area to hint users.
(5) Fix that center and zoom option does not work in series.sankey, and no relevant test case. (the roam is introduced in impl in #20321, due v6).
(6) Fix the percent base of `center` (such as `center: ['40%', '50%']`) for all View coord sys based components/series (geo/series.map/series.graph/series.tree/series.sankey). #16904 introcuded percentage string here, such as '33%'. But it was based on canvas width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if the `View['_rect']` is not calculated based on the current canvas rect. Therefore the percentage value is changed to based on `View['_rect'].width/height` since v6. Under this definition, users can use '0%' to map the top-left of `View['_rect']` to the center of `View['_viewRect']`.
(7) Enhance the behavior for roaming area overlapping - the upper one has higher precedence.
(8) Fix some `scaleLimit` missing.
(9) Some refactor and clarification of `RoamController` and `roamHelper`.
@100pah 100pah mentioned this pull request Jun 15, 2025
8 tasks
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.

type graph roam nodes disapper!
4 participants