Version
4.9.0
Steps to reproduce
1.官网可以验证:设置该属性--visualMap-piecewise.textStyle. width
2.具体设置值:
visualMap: {
type: "piecewise",
splitNumber: 8,
min: 0,
max: 100,
calculable: true,
realtime: false,
inRange: {
color: ["#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf", "#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"]
},
textStyle: {
width: 4,
overflow: "break"
}
},
What is expected?
希望设置了文字宽度后,能实现文字换行
What is actually happening?
设置了width以及overflow属性依然无效
分段型视觉Map组件在应用时有可能文字过长,希望能换行好看点
4条答案
按热度按时间ig9co6j11#
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 that it containsa minimum reproducible demoand necessaryimagesto illustrate. Otherwise, our committers will ask you to do so.
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 to our mailing list .
Have a nice day! 🍵
iaqfqrcu2#
@cj11032 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
VisualMap setting text width is invalid
BODY
Version
4.9.0
Steps to reproduce
visualMap: {
type: "piecewise",
splitNumber: 8,
min: 0,
max: 100,
calculable: true,
realtime: false,
inRange: {
color: ["#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf", "#fee090", "#fdae61", "#f46d43", "# d73027", "#a50026"]
},
textStyle: {
width: 4,
overflow: "break"
}
},
What is expected?
I hope that after setting the text width, the text can be wrapped
What is actually happening?
Setting the width and overflow properties is still invalid
The segmented visual mapping component may be too long in the application, I hope it can be changed to look better
20jt8wwn3#
@cj11032 Please provide a minimum reproducible demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM , https://www.makeapie.com/editor.html or https://codesandbox.io/s/mystifying-bash-2uthz .
ttygqcqt4#
5.0 开始才支持设置 width 和 overflow 换行