echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] SVG shadow width with lineStyle

Open Ovilia opened this issue 1 year ago • 3 comments

Version

5.5.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-smooth&version=5.5.1&renderer=svg&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmuqemAJ4gCmRA5AMYCGY1A5sAE4V0A0JAX37oKOfEVRlKNegDcmAGwCu1PoOGw81ThGqFYAbRLpJZWABMWTIgYCMvWPccOnrgHQAGL7YC6GqVS0sHQKENCq_qR4ABbAAO4AyhQAtgBGwApEAGaKWpHooeEJlApBpmZmcRDmYNFEACz5FbDMIPScwErQ5mrNZjFM5vEAwhlc9ADEWV69fVHRg_EAQsqcRACsTRUDQ3EA8llZWmAAGkS2Hlv9C7sHR9RgAJrnl8ZmQm8CJD4oAgDcQA

Steps to Reproduce

  1. Create a line series with data that's almost the same
  2. Set lineStyle.width to be 4
  3. Use SVG renderer to see the width of the line is not correct

Current Behavior

Line width is thinner than 4px when renderer is SVG but 4px when with Canvas.

Expected Behavior

Line width should be 4px, which is the same as canvas.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Ovilia avatar Oct 14 '24 08:10 Ovilia

It seems that SVG don't render any shadow on elements with zero height and clips shadows with tiny height. So it may not easy to fix this problem.

Ovilia avatar Oct 14 '24 09:10 Ovilia

Link to ecomfe/zrender#792

plainheart avatar Oct 14 '24 09:10 plainheart

Link to ecomfe/zrender#792

Did this PR fix this problem? Can we merge it?

Ovilia avatar Oct 15 '24 05:10 Ovilia