echarts icon indicating copy to clipboard operation
echarts copied to clipboard

The picture size of series.tree.symbol is wrong in svg render,but normal in canvas render.(svg渲染模式下树图节点图片尺寸被压缩)

Open hdy1023 opened this issue 1 year ago • 2 comments

Version

5.5.0

Link to Minimal Reproduction

none

Steps to Reproduce

1.Normal in canvas render. 1 2.The image is not full in svg render. 2 3.Found that setting preserveAspectRatio="none" solves the problem. 4

Current Behavior

none

Expected Behavior

The image is full in svg render.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

hdy1023 avatar Apr 25 '24 10:04 hdy1023

3.Found that setting preserveAspectRatio="none" solves the problem.

This is a property of HTML image component, I doubt it could be set in ECharts for a fix.

Demo shows the bug you found and two other oddities. Like a logo image displaying fine in SVG, but deformed in Canvas. Or another image ('rect_OK') that displays fine in both SVG and Canvas. Switch through button Render.

helgasoft avatar Apr 26 '24 20:04 helgasoft

3.Found that setting preserveAspectRatio="none" solves the problem.

This is a property of HTML image component, I doubt it could be set in ECharts for a fix.

Demo shows the bug you found and two other oddities. Like a logo image displaying fine in SVG, but deformed in Canvas. Or another image ('rect_OK') that displays fine in both SVG and Canvas. Switch through button Render.

1.Setting ‘preserveAspectRatio’ is not found in the ECharts documentation. 2.I think the render results should be the same regardless of which rendering mode is adopted under the same options

hdy1023 avatar Apr 28 '24 03:04 hdy1023