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

[Feature] Can't get the height and width of the rectangle when using series->type:treemap->label:formatter function #19808

Closed
dannishushu opened this issue Apr 9, 2024 · 1 comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@dannishushu
Copy link

dannishushu commented Apr 9, 2024

What problem does this feature solve?

When using series->type:treemap, the height and width of the rectangle can only be obtained in the labelLayout function. After practice, it is speculated that the execution order of the label formatter in the underlying code implementation of echarts takes precedence over the execution order of the labelLayout function, so it is implemented in the label:formatter function. There is no functional logic such as "determining the text size or the number of display lines through the height and width of the rectangle".

What does the proposed API look like?

It is expected that the length and width data of the rectangle can also be obtained in the label formatter function.

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Apr 9, 2024
@echarts-bot echarts-bot bot changed the title [Feature]如何在series->type:treemap->label:formatter中获得矩形的高宽? [Feature] 如何在series->type:treemap->label:formatter中获得矩形的高宽? Apr 9, 2024
Copy link

echarts-bot bot commented Apr 9, 2024

@dannishushu It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

BODY

What problem does this feature solve?

When using series->type:treemap, the height and width of the rectangle can only be obtained in the labelLayout function. After practice, it is speculated that the execution order of the label formatter in the underlying code implementation of echarts takes precedence over the execution order of the labelLayout function, so it is implemented in the label:formatter function. There is no functional logic such as "determining the text size or the number of display lines through the height and width of the rectangle".

What does the proposed API look like?

It is expected that the length and width data of the rectangle can also be obtained in the label formatter function.

@dannishushu dannishushu changed the title [Feature] 如何在series->type:treemap->label:formatter中获得矩形的高宽? [Feature] How can I get the rectangular when I use series->type:treemap->label:formatter function? Apr 10, 2024
@dannishushu dannishushu changed the title [Feature] How can I get the rectangular when I use series->type:treemap->label:formatter function? [Feature] How can I get the height and width of the rectangle when I use series->type:treemap->label:formatter function? Apr 10, 2024
@dannishushu dannishushu changed the title [Feature] How can I get the height and width of the rectangle when I use series->type:treemap->label:formatter function? [Feature] How to get the height and width of the rectangle when I use series->type:treemap->label:formatter function? Apr 12, 2024
@dannishushu dannishushu changed the title [Feature] How to get the height and width of the rectangle when I use series->type:treemap->label:formatter function? [Bug] Can't get the height and width of the rectangle when using series->type:treemap->label:formatter function Apr 12, 2024
@dannishushu dannishushu changed the title [Bug] Can't get the height and width of the rectangle when using series->type:treemap->label:formatter function [Feature] Can't get the height and width of the rectangle when using series->type:treemap->label:formatter function Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

1 participant