What problem does this feature solve?
以svg渲染矩阵树图,当某条数据所占比例特别小的时候,这个时候该条数据的宽或者高就会比较小,就会造成文本不显示或者显示不美观,如果能拿到每条数据所在矩阵的宽高,就可以在label的formatter里面更加灵活的去以更加美观/完整的方式展示文本信息
What does the proposed API look like?
label: {
formatter: (params) => {
// params里面包含当前数据的矩阵宽高
}
}
3条答案
按热度按时间vngu2lb81#
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure thatyou have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.
If you are interested in the project, you may also subscribe our mailing list .
Have a nice day! 🍵
bprjcwpo2#
@ctrlands It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
treemap gets the width and height attributes of the matrix where the data is located
BODY
What problem does this feature solve?
Rendering matrix tree map with svg, when the proportion of a piece of data is particularly small, this time the width or height of the data will be relatively small, will cause the text does not show or display is not beautiful, if you can get the width of each data in the matrix, you can be more flexible in the label information to display text information in a more beautiful / complete way
What does the proposed API look like?
label: {
formatter: (params) => {
Params contains the matrix width and height of the current data
}
}
0ve6wy6x3#
@ctrlands echarts 5.0 开始可以在
labelLayout
配置中根据矩形高宽配置字体,参考这个例子 https://github.com/apache/echarts/blob/master/test/treemap-obama.html#L343