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

Better label positioning options for VictoryPie #1117

Closed
boygirl opened this issue Sep 18, 2018 · 1 comment
Closed

Better label positioning options for VictoryPie #1117

boygirl opened this issue Sep 18, 2018 · 1 comment
Labels
Type: Enhancement ✏️ An enhancement or feature proposal that will be addressed after the next release

Comments

@boygirl
Copy link
Contributor

boygirl commented Sep 18, 2018

Currently it requires some math to move labels to specific angles or offset by angle or radius.

There should be options for default label angle that correspond to the startAngle, centroid(current) and endAngle of the slice. This would fix issues like https://github.com/FormidableLabs/victory-native/issues/377

@boygirl boygirl added the Type: Enhancement ✏️ An enhancement or feature proposal that will be addressed after the next release label Sep 18, 2018
@sikolio
Copy link

sikolio commented Oct 1, 2018

I have made progress in this but there is a need to change the position by a % so the label ends inside the slice instead of just at the border.

By the linter I can't go ahead and put a 0.9 multiplier or something, so I will push this as it is.

sikolio pushed a commit to sikolio/victory that referenced this issue Oct 1, 2018
Added the option for "startAngle" and "endAngle" for the label to be
positioned.

The default is "centroid" which does not altere the original behavior.

As posted on the issue FormidableLabs#1117 it would be nice to position the label
inside the actual slice but as per one rule of no-magic-numbers I can't
multiply by 0.9 to do this equally for all labels. This could be left
for later.

Closes FormidableLabs#1117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement ✏️ An enhancement or feature proposal that will be addressed after the next release
Projects
None yet
Development

No branches or pull requests

2 participants