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

Positioning of overlapping labels in pie-chart #91

Open
mous-myndr opened this issue Oct 18, 2024 · 3 comments
Open

Positioning of overlapping labels in pie-chart #91

mous-myndr opened this issue Oct 18, 2024 · 3 comments
Assignees

Comments

@mous-myndr
Copy link

mous-myndr commented Oct 18, 2024

I like the Graph library very much, just wanted the labels to be placed a bit better on small slices. See attached images the before/after screenshots: The before has the labels through each other, the second has that fixed. What I do, is I added an option 'label_position_delta_for_small_slices' => .1. I added some code in dataLabelPosition that looks at the degrees of a slice and the neighbour slices and adds or subtracts the amount given by the option if applicable.
Before:
Screenshot 2024-10-09 at 15 12 17
After:
Screenshot 2024-10-09 at 15 11 36
I have a clone of the repo with a pull request. I'm just not sure how to submit that here as a pull request...
See mous-myndr/SVGGraph#1

@goat1000 goat1000 self-assigned this Oct 21, 2024
@goat1000
Copy link
Owner

Thanks Paul - I did get your email, but this is the first chance I have had to look at it.

I think you have created a branch in your fork, and the pull request you made is into your own master - so you would have to merge it into your master branch and do the pull request from there. Or at least I think so.

Or if you prefer I can create a patch from your code and add it in from this end.

@mous-myndr
Copy link
Author

mous-myndr commented Oct 21, 2024 via email

@goat1000
Copy link
Owner

The pull request happens from the master branch of your repository - you automatically become a contributor when the changes from the pull request are merged in.

If you go to your master branch you should see a "Contribute" button where you can open a new pull request.

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