-
Notifications
You must be signed in to change notification settings - Fork 12k
Documentation - Added type number[] to radius #11663
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
base: master
Are you sure you want to change the base?
Conversation
@@ -18,7 +18,7 @@ Namespace: `options.elements.point`, global point options: `Chart.defaults.eleme | |||
|
|||
| Name | Type | Default | Description | |||
| ---- | ---- | ------- | ----------- | |||
| `radius` | `number` | `3` | Point radius. | |||
| `radius` | `number`\|`number[]` | `3` | Point radius. |
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.
All the properties are indexable so you can also add this to the other props
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.
@LeeLenaleee Can you clarify what this means? I would be saddened if a documentation update held up the 4.5.0 release
@LeeLenaleee let's move this to Milestone 5.0 ? |
No this is not breaking, so it will be moved to the next non breaking version |
Based on the test file
This would help users who are looking to customize individual points in their charts, as reported in #11642. Here's an example from the test file showing these properties being used as arrays in a radar chart configuration: // test/types/controllers/radar_dataset_indexable_options.ts
const chart = new Chart('test', {
type: 'radar',
data: {
labels: ['a', 'b', 'c'],
datasets: [{
data: [1, 2, 3],
hoverRadius: [1, 2, 3],
pointBackgroundColor: ['red', 'green', 'blue'],
pointBorderColor: ['red', 'green', 'blue'],
pointBorderWidth: [1, 2, 3],
pointHitRadius: [1, 2, 3],
pointHoverBackgroundColor: ['red', 'green', 'blue'],
pointHoverBorderColor: ['red', 'green', 'blue'],
pointHoverBorderWidth: [1, 2, 3],
pointHoverRadius: [1, 2, 3],
pointRadius: [1, 2, 3],
pointRotation: [1, 2, 3],
pointStyle: ['circle', 'cross', 'crossRot'],
radius: [1, 2, 3],
}]
},
}); |
I updated the documentation regarding the type of
radius
.As mentiond #11642 here
radius
can benumber
but alsonumber[]
.