-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Add elements.arc.angle in documentation #6491
Conversation
docs/configuration/elements.md
Outdated
@@ -82,6 +82,7 @@ Global arc options: `Chart.defaults.global.elements.arc`. | |||
|
|||
| Name | Type | Default | Description | |||
| ---- | ---- | ------- | ----------- | |||
| `angle` | `number` | `circumference / (arc count)` - for polar only | Arc angle to cover. |
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.
what does "for polar only" mean? That the option is available only for the polar chart or that default is circumference / (arc count)
only for the polar chart? If the latter, what is the default for other chart types?
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.
We have two types of chart using elements.arc :
- Polar area
- Pie/Doughnut
I tried to set elements.arc.angle
option in Pie/Doughnut chart. It doesn't override the natural angles computation.
So it seems that this option is available only for polar chart, and I think it's a good thing.
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.
Ok. I think it might be clearer to put "for polar only" next to the option name rather than the default value. How about:
angle
(polar area chart only)
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.
Rather than stating its for polar only, why not move it to
Lines 58 to 68 in f68b8ad
### Styling | |
The style of each arc can be controlled with the following properties: | |
| Name | Description | |
| ---- | ---- | |
| `backgroundColor` | arc background color. | |
| `borderColor` | arc border color. | |
| `borderWidth` | arc border width (in pixels). | |
All these values, if `undefined`, fallback to the associated [`elements.arc.*`](../configuration/elements.md#arc-configuration) options. |
Like weight
in pie/doughnut
Add elements.arc.angle in documentation
Using elements.arc.angle option can be a workaround for #4751 and make #6472 useless.
Demo here : https://jsfiddle.net/h1e78vbq/