From ce9bf03b10d914d1e58144580da0a5e587ec97da Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Thu, 18 Feb 2021 01:59:24 +0100 Subject: [PATCH 1/3] add clarification about object data structure --- docs/docs/general/data-structures.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/general/data-structures.md b/docs/docs/general/data-structures.md index 113e7266089..25a85f0c2a5 100644 --- a/docs/docs/general/data-structures.md +++ b/docs/docs/general/data-structures.md @@ -32,6 +32,8 @@ data: [{x:'Sales', y:20}, {x:'Revenue', y: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. +In case you specify the index scale as a number as shown in the first example you will need a labels array. The number indicates the index of the element and does not replace the label as when you provide a string. + ## Object[] using custom properties ```javascript From 29f15b1bc9c5863bf9f65ea82106c3fecf242349 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Fri, 19 Feb 2021 13:08:34 +0100 Subject: [PATCH 2/3] improved description with feedback --- .eslintrc.yml | 2 +- docs/docs/general/data-structures.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 7c851c27b91..bec65311770 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -23,7 +23,7 @@ rules: no-empty-function: "off" no-use-before-define: ["error", { "functions": false }] # disable everything, except Rest/Spread Properties in ES2018 - es/no-async-iteration: "error" + es/no-async-iteration: "error"d es/no-malformed-template-literals: "error" es/no-regexp-lookbehind-assertions: "error" es/no-regexp-named-capture-groups: "error" diff --git a/docs/docs/general/data-structures.md b/docs/docs/general/data-structures.md index 25a85f0c2a5..17913bcbf0c 100644 --- a/docs/docs/general/data-structures.md +++ b/docs/docs/general/data-structures.md @@ -32,7 +32,7 @@ data: [{x:'Sales', y:20}, {x:'Revenue', y: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. -In case you specify the index scale as a number as shown in the first example you will need a labels array. The number indicates the index of the element and does not replace the label as when you provide a string. +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. ## Object[] using custom properties From 074c7f9614317a983ba9683bed65e75d8311fd35 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Fri, 19 Feb 2021 13:10:13 +0100 Subject: [PATCH 3/3] fix push of wrong file --- .eslintrc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index bec65311770..7c851c27b91 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -23,7 +23,7 @@ rules: no-empty-function: "off" no-use-before-define: ["error", { "functions": false }] # disable everything, except Rest/Spread Properties in ES2018 - es/no-async-iteration: "error"d + es/no-async-iteration: "error" es/no-malformed-template-literals: "error" es/no-regexp-lookbehind-assertions: "error" es/no-regexp-named-capture-groups: "error"