From: LeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com> Date: Fri, 19 Feb 2021 15:20:40 +0000 (+0100) Subject: add clarification about object data structure (#8447) X-Git-Tag: v3.0.0-beta.11~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0770e8096649b89e17ea02b58ac87d477239234f;p=thirdparty%2FChart.js.git add clarification about object data structure (#8447) * add clarification about object data structure * improved description with feedback * fix push of wrong file --- diff --git a/docs/docs/general/data-structures.md b/docs/docs/general/data-structures.md index 113e72660..17913bcbf 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. +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 ```javascript