antvis / antvis/G

attrs for line arrows are taken from the parent line instead of the arrow object

Open
#1,335 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
230
PR merge metrics
No merged PRs in 30d

Description

I tried using the form at https://antv-issue-helper.surge.sh but it was not working.

This issue is in @antv/g-svg 0.5.6. I know this is an old version, but I would like to open a PR to fix it. If I do so, would it be possible to release a version 0.5.7? This bug is affecting `@antv/g6`, which currently depends on `"@antv/g-svg": "^0.5.1",` (in the `@antv/g6-pc` package.) If we can release a 0.5.7 to fix this, I would then open a PR to upgrade `@antv/g6` to use 0.5.7.

Here is an example of the issue:
https://codesandbox.io/s/wild-rain-mhgy08?file=/src/index.js:0-431

The arrow should have a blue fill and green stroke, but instead it uses the stroke and fill from the parent line shape.

Result when using `@antv/g-svg`:

![Screenshot 2023-05-05 at 16 33 36](https://user-images.githubusercontent.com/29077863/236502773-fb7903c0-6b76-414d-a07e-6bf6c4b6de0a.png)

Expected result (this is using `@antv/g-canvas`, although I had to edit the `path` of the arrow slightly to get the same shape):

![Screenshot 2023-05-05 at 16 33 41](https://user-images.githubusercontent.com/29077863/236502918-081ba19d-54ff-4c24-87d7-ce8493c953bb.png)

Would you accept a PR from me to fix this?

---
Chrome 112.0.5615.137 (Official Build) (arm64)
macOS 13.3.1

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the linked CodeSandbox with @antv/g-svg 0.5.6, then trace the arrow rendering behavior in the G repository. Done means line arrows use their own blue fill and green stroke rather than inheriting the parent line's attributes, while preserving the reported shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.