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

Add elements.arc.angle in documentation #6491

Merged
merged 2 commits into from Sep 7, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/configuration/elements.md
Expand Up @@ -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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.angleoption 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.

Copy link
Contributor

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)

Copy link
Member

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

### 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

| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Arc fill color.
| `borderAlign` | `string` | `'center'` | Arc stroke alignment.
| `borderColor` | `Color` | `'#fff'` | Arc stroke color.
Expand Down