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

Improvement/victory pie radius #1177

Merged
merged 13 commits into from
Nov 11, 2018
Merged

Improvement/victory pie radius #1177

merged 13 commits into from
Nov 11, 2018

Conversation

boygirl
Copy link
Contributor

@boygirl boygirl commented Nov 9, 2018

This PR adds support for controlling radius, innerRadius, cornerRadius, padAngle, sliceStartAngle and sliceEndAngle for each individual slice of a pie:

Details:
The Slice primitive used by VictoryPie now takes radius, cornerRadius, innerRadius, padAngle, sliceStartAngle and sliceEndAngle props. Each of these props may be given as number or a function of datum and active. padAngle, radius, cornerRadius and innerRadius will be passed down from props on VictoryBar, but sliceStartAngle and sliceEndAngle must be defined directly on the Slice instance, These values should be given in degrees. To make these values easier to use as functional props, startAngle, endAngle, and padAngle (in degrees) are added to each datum passed into Slice. (If your data already has these properties they will not be overridden)

Breaking Changes
The Slice primitive will still take a pathFunction prop, but this prop will no longer be provided by VictoryPie. This will not be a breaking change for most users. This will only affect users who were wrapping the Slice component and making use of the pathFunction prop provided by VictoryPie Users who were providing their own pathFunction prop to Slice should not be effected.

closes #1136

@boygirl boygirl merged commit 7a27761 into master Nov 11, 2018
@boygirl boygirl deleted the improvement/victory-pie-radius branch November 11, 2018 00:50
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

Successfully merging this pull request may close these issues.

Refactor VictoryPie and Slice so that slices can be more granularly controlled
1 participant