echarts 现在是每个矩形可以填充图片了,但是图片怎么正好铺满整个矩形而且图片不变形,就像background-size: 'cover'一样

e0uiprwp  于 2022-11-05  发布在  Echarts
关注(0)|答案(3)|浏览(274)

What problem does this feature solve?

解决矩形图填充背景图的功能

What does the proposed API look like?

data 里

itemStyle: {
 color: {
  image: "",
  size: 'cover'
}
}
35g0bw71

35g0bw711#

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.

  • A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

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! 🍵

suzh9iv8

suzh9iv82#

@dingpeiyang001 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

Now each rectangle can fill the picture, but how can the picture just fill the entire rectangle and the picture is not deformed, just like background-size:'cover'

BODY

What problem does this feature solve?

Solve the function of rectangle chart filling background image

What does the proposed API look like?

itemStyle: {
color: {
image: "",
size:'cover'
}
}

7ivaypg9

7ivaypg93#

请使用自定义系列实现该需求 https://echarts.apache.org/zh/option.html#series-custom

相关问题