-
Notifications
You must be signed in to change notification settings - Fork 836
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
Include option for padAngle on RadialChart #920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice add! I like what you got going here. I have a few requests:
- Will you include a showcase example? That way it can be injected into the docs to demonstrate to what padAngle means?
- For consistancy will you add this to the sunburst as well?
- Will you include some pics so we know that these changes work?
src/plot/series/arc-series.js
Outdated
@@ -180,6 +182,7 @@ class ArcSeries extends AbstractSeries { | |||
endAngle: angle(row) | |||
}; | |||
const arcedData = arcBuilder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe make this a one liner arcBuilder().padAngle(padAngle)
src/radial-chart/index.js
Outdated
@@ -191,6 +191,7 @@ RadialChart.propTypes = { | |||
).isRequired, | |||
getAngle: PropTypes.func, | |||
getAngle0: PropTypes.func, | |||
padAngle: PropTypes.number, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set the default padAngle on here too?
It looks like the CLA is mad at you. I think you can get around this by squashing this whole branch into a single commit |
Updated email but can't get CLA to play nicely. Going to refork and create new PR... |
it also looks like lint is failing! |
Is showcase code rendered somewhere? Is this the place where I should add padAngle? @mcnuttandrew |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also include an example of using the padAngle as a function somewhere, like maybe on the Sunburst with tooltips showcase example?
docs/radial-chart.md
Outdated
@@ -67,6 +67,10 @@ SVG paths (which is what the arc series is made up of) have numerous manipulable | |||
Type: `string` | |||
The className to be added to an individual arc in the series. | |||
|
|||
#### padAngle (optional) | |||
Type: `number|function` | |||
The padding to be applied between arcs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think including some text here like, "see above donut chart for an example of a padded angle" would be fine
Alright looks good! Stamp stamp stamp!!!! |
* add padAngle functionality * remove trailing comma * include padAngle in sunburst * include padangle in sunburst docs * include padAngle in simple donut chart showcase * includ clarification text to radial-chart.md * include padAngle as function in sunburstWithTooltips
* add padAngle functionality * remove trailing comma * include padAngle in sunburst * include padangle in sunburst docs * include padAngle in simple donut chart showcase * includ clarification text to radial-chart.md * include padAngle as function in sunburstWithTooltips
Currently there are no means to add padding between arcs on a RadialChart. This PR seeks to enable such capability.