Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinearGradient not working for fill of custom dot for <Line /> #523

Closed
3 tasks done
PieterT2000 opened this issue Dec 17, 2024 · 5 comments
Closed
3 tasks done

LinearGradient not working for fill of custom dot for <Line /> #523

PieterT2000 opened this issue Dec 17, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed released

Comments

@PieterT2000
Copy link
Contributor

Describe the bug

fill attribute values that link to a linearGradient definition won't work correctly. Instead of the gradient, a transparent fill is shown. For context, this happened when I tried to apply a gradient background (fill) to a custom dot shape in the Recharts LineChart component.

Reproduction

StackBlitz minimal reproduction

Validations

@PieterT2000 PieterT2000 added the bug Something isn't working label Dec 17, 2024
@PieterT2000 PieterT2000 changed the title LinearGradient not working for fill of custom Dot LinearGradient not working for fill of custom dot for <Line /> Dec 17, 2024
@EvHaus EvHaus added the help wanted Extra attention is needed label Dec 18, 2024
@EvHaus
Copy link
Owner

EvHaus commented Dec 19, 2024

Looks like this is a bug with react-pdf itself. I've logged the ticket:

@PieterT2000
Copy link
Contributor Author

Thanks, @EvHaus! The gradient is still missing in the PDF, even when all stop opacities are set to 1.

@EvHaus
Copy link
Owner

EvHaus commented Dec 20, 2024

Looks like that another bug with react-pdf. 😔 I've logged a new ticket:

I think I might be able to work around this one by merging any <defs> I find into a single one. I'll give that a try when I have a chance and ship a new version if that works.

@PieterT2000
Copy link
Contributor Author

Thanks for the tip, @EvHaus; I've added a fix. Let me know your thoughts when you get time.

@EvHaus EvHaus closed this as completed in 0d959f4 Dec 23, 2024
Copy link

🎉 This issue has been resolved in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed released
Projects
None yet
2 participants