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

Update documentation around radar chart data notation #11525

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/charts/radar.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ data: {

## Internal data format

`{x, y}`
`{x, r}`
11 changes: 11 additions & 0 deletions docs/general/data-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ const cfg = {
}
```

```javascript
const cfg = {
type: 'radar',
data: {
datasets: [{
data: [{x: 'Sales', r: 20}, {x: 'Revenue', r: 10}, {x: 'Expenses', r: 10}]
}]
}
}
```

This is also the internal format used for parsed data. In this mode, parsing can be disabled by specifying `parsing: false` at chart options or dataset. If parsing is disabled, data must be sorted and in the formats the associated chart type and scales use internally.

The values provided must be parsable by the associated scales or in the internal format of the associated scales. A common mistake would be to provide integers for the `category` scale, which uses integers as an internal format, where each integer represents an index in the labels array. `null` can be used for skipped values.
Expand Down