]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Docs/multiline labels (#8201)
authorLeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com>
Sun, 20 Dec 2020 16:49:39 +0000 (17:49 +0100)
committerGitHub <noreply@github.com>
Sun, 20 Dec 2020 16:49:39 +0000 (11:49 -0500)
* Docs/multiline labels

Fixes #8172

* Update data-structures.md

Update with if the labels is used since it can be skipped by providing the datapoints as an object

docs/docs/general/data-structures.md

index 0e4db12bb5a4305a8890924bdd2928a4db3f6a68..113e726608953db7f687ca75406d01b4a4aaf28e 100644 (file)
@@ -4,6 +4,9 @@ title: Data structures
 
 The `data` property of a dataset can be passed in various formats. By default, that `data` is parsed using the associated chart type and scales.
 
+If the `labels` property of the main `data` property is used, it has to contain the same amount of elements as the dataset with the most values. These labels are used to label the index axis (default x axes). The values for the labels have to be provided in an array.
+The provides labels can be of the type string or number to be rendered correctly. In case you want multiline labels you can provide an array with each line as one entry in the array.
+
 ## Primitive[]
 
 ```javascript