You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "A0nameless0man (via GitHub)" <gi...@apache.org> on 2024/11/06 01:31:21 UTC

[PR] feat(label): enforce labelLayout for all state [echarts]

A0nameless0man opened a new pull request, #20476:
URL: https://github.com/apache/echarts/pull/20476

   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   Make sure [`labelLayout`](https://echarts.apache.org/zh/option.html#series-sunburst.labelLayout) is enforced to all four state of label.
   
   
   
   ### Fixed issues
   
   `labelLayout` option ignored in blur state for sunburst chart.
   
   [Example](https://echarts.apache.org/examples/zh/editor.html?c=sunburst-drink&lang=ts&code=G4QwTgBAJiAuIQLwQNoCgIQN4cxAdiALYCmAXBAOQBiANgPZgiUA0umAlrCUQMqwBPWuWzs8AY3oMwFSgGIYABigA2AByUxAXzZ4I4gBYdaUMCXwV0ezDmt5CpWQCFaIcQGsIAFRLNddiFBaAFcRAEZ_Oy4efiERWwDMSWlZOQBOAHYAVhIVKE1ErTFMHWLRRIcRGmkQWlYyzm4-QWEKBMTkxlSSRQywtPECgNKOoxMzC1QGvHbEgmIqgGEDYnoiYxJ6ubwg0IoI6b1o5ri2w-tOmSo5ADM0tJIwwfOS85G52YqF2QAlegBnTaROa7cLAxLHWKtcrbCRSLrXEg3LIgDIaF4QIrbd6JT4BSqyABSIH-63wQIxoP24ICkJa8QxSXhV3kNwyNzCACN8hisXM-XYALplAUQYUlfyzAlUahgYJcARbPB004wvSXVIwMJQABMAGYhhKxIZjKZzJYynjMNLKE4SGAwIqaY0YvSztsNdcoFAACziLJhQ3WHEXMZmyZWD4Ym0uNzuTn2x1K7ZUiAHWEQFXQq0BT3yPU9PVhDJBwpvZ0zaPfKg_EkABwTDqdlNqezTFaOTShDIzTJSiJUOrSKjSpeG5fOOb0MZCJEbSY7O1bYIxWZ7vbzchUWRHnMUY7sosPi6n9mrlH4TAA7vPmxnU-nYWv3R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gZA6gg0BCvX7WyoQB1gAhcAcDeyyBVywCURhyTR1iIExVnUUB6iLiUTCCtwUA3C1CAjbXImGmYDLVgCrVfwbUQB6hXXToZV9VtWTHuxJqo0UAAAUdYAAlEgAAHwQA814jnlkDTB1gUXQ0_AkDiCwAUXnkQAi1EACDLAOYUVYprWGQ82C01wQA6gQAAD8EAatGtYAit2t9NBgetEAzKaYigigEA-wTtNIdeAyjZ9orgdYvlRgNwsAwFYkR13AFACVZQn1cNMt7NtActCtStKtZt6tKwltWtr8Ottt-thtJtVAwgAdlALtVA31v1NITZb8RutAliHAElsg6w3oE02g_Nrl7V1cNs0NLSfFYAk5aR9osgEF_d_dm6s6aAWgm5QAA)
   
   
   ## Details
   
   ### Before: What was the problem?
   
   Current impl of sunburst chart calculates label position in [SunburstPiece.ts](https://github.com/apache/echarts/blob/ca12fb489a83285040da20db4ea991ba90d4c685/src/chart/sunburst/SunburstPiece.ts#L185-L288), and apply it to all display state. However, this impl didn't take `labelLayout` into account and causes conflict as `labelLayout` is only applied to normal state for now.
   
   This inconsistency causes strange animation on mouse hover.
   
   
   
   ### After: How does it behave after the fixing?
   
   Now with this pr, `labelLayout` always takes priority.
   
   
   
   ## Document Info
   
   One of the following should be checked.
   
   - [x] 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
   
   ### 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
   
   As an inexperienced front-end developer, this PR may require more reviews to avoid breaking any existing use cases. Also, I am currently unable to add unit tests for this PR, which may require further processing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "A0nameless0man (via GitHub)" <gi...@apache.org>.
A0nameless0man commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-2461539828

   ## Unit test
   
   There is only one test ` label-layout` has diff except those ut i added. Not sure why.
   ![image](https://github.com/user-attachments/assets/0e06783b-12ad-433b-bf17-822caf08ea2a)
   
   Initial state is same.
   ![image](https://github.com/user-attachments/assets/9b99fe88-fe38-402d-970a-cdf0fb37cc81)
   
   And test `candlestick-large2` failed because of timeout, likely due to my weak computer and/or wsl overhead.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "A0nameless0man (via GitHub)" <gi...@apache.org>.
A0nameless0man commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-2458611181

   ## Future works
   
   Support `blur` and `emphasis` status for `labelLayout` .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "A0nameless0man (via GitHub)" <gi...@apache.org>.
A0nameless0man commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-2458610138

   ## Before
   
   ![image](https://github.com/user-attachments/assets/e30cdb9a-e131-48a3-9401-0b5fe973eb60)
   
   ![image](https://github.com/user-attachments/assets/bcaa9500-e925-4f11-8e7f-0e2a00775460)
   
   ## After
   
   ![image](https://github.com/user-attachments/assets/9245b760-b3df-4144-8d86-f9d5c04a3a39)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-2458522928

   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-2458873470

   The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20476@931326a
   <!-- ECHARTS_PR_PREVIEW -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [PR] feat(label): enforce labelLayout for all state [echarts]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@echarts.apache.org>.
github-actions[bot] commented on PR #20476:
URL: https://github.com/apache/echarts/pull/20476#issuecomment-6713020817

   This PR has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR. We are sorry for this but 2 years is a long time and the code base has been changed a lot. Thanks for your contribution anyway.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org