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

Responsive labels within arc? #27

Open
J7mbo opened this issue Sep 15, 2023 · 2 comments
Open

Responsive labels within arc? #27

J7mbo opened this issue Sep 15, 2023 · 2 comments

Comments

@J7mbo
Copy link

J7mbo commented Sep 15, 2023

Is it possible to make the labels within the arc responsive? Or is this too complicated? This is unfortunately something I can't contribute as the maths looks too complicated for me, but if it's actually complex, I'd be willing to pay for it :)

@J7mbo
Copy link
Author

J7mbo commented Sep 15, 2023

Right now I'm using a combination of textMargin within plugins.labels, and fontSize, and I've attempting the following for textMargin:

textMargin: function (){
    // This is how far away from the edge of the circle the text is.
    return window.innerWidth / 40;
}(),

This doesn't work well though :/ Both the font size, and the margin (when using position: 'outside'), need to be adjusted as the window is resized.

@DavideViolante
Copy link
Owner

Right now I'm pretty busy with a job, so I'm unable to look into this. I'll try to find some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants