-
Notifications
You must be signed in to change notification settings - Fork 635
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
Multiline legend items #173
base: master
Are you sure you want to change the base?
Conversation
…y the width of '<number of the item>. ' string part).
Thanks for the PR. It's a busy week for us (Cyber Week/Black Friday), so realistically I can take a look at this earliest next week. |
@bocytko sure, no problem. |
Hi @bocytko, don't forget about this MR. Thanks 🙏 |
Hi @bocytko , did you have time to review the PR? Thanks again 🙏 |
@chicio I will take a look at the PR by Jan, 6th. Thanks for your patience. |
Hi,
as discussed in #169,I tried to add multiline support for legend items with long names. I used
tspan
as discussed and some dynamic height calculations (based on the bounding box (getBBox
) +getComputedTextLength
).It works as expected. The items lines are aligned after the legend number.
There is still room for improvement, because we should be able to calculate the entire structure of the legends dynamically. Anyway for now, if a legend list of items is too long we should play with the parameters I added the previous PRs to fix the offset (in particular the legends offsets).
Attached you can find some example:
I tested it carefully, but please do all the checks that you want/need on your side, and let me know if this PR makes sense and can be useful (like the previous one).
lastminute-tech-radar-example-video-720.mov
lastminute-tech-radar-example-code.zip