From bf0a48807f7b9ecba3ac14fddd89460fc185260f Mon Sep 17 00:00:00 2001 From: sogono Date: Tue, 3 Oct 2023 17:46:46 -0700 Subject: [PATCH 1/2] updated radar doc to reflect expected format --- docs/charts/radar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/charts/radar.md b/docs/charts/radar.md index 745cf968b50..3d2cbee17fd 100644 --- a/docs/charts/radar.md +++ b/docs/charts/radar.md @@ -206,4 +206,4 @@ data: { ## Internal data format -`{x, y}` +`{x, r}` From 41edf9a41187f8a61043044f0457bf8ec3d9dfff Mon Sep 17 00:00:00 2001 From: sogono Date: Tue, 3 Oct 2023 18:04:36 -0700 Subject: [PATCH 2/2] added radar example to data structures doc --- docs/general/data-structures.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/general/data-structures.md b/docs/general/data-structures.md index 5c95e560ca6..a882fd17485 100644 --- a/docs/general/data-structures.md +++ b/docs/general/data-structures.md @@ -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.