attrs for line arrows are taken from the parent line instead of the arrow object
- 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`:

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

Would you accept a PR from me to fix this?
---
Chrome 112.0.5615.137 (Official Build) (arm64)
macOS 13.3.1
Contributor 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