]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update doc file to indicate that category scale supports min/max attributes
authorEvert Timberg <evert.timberg+github@gmail.com>
Sun, 3 Apr 2016 03:07:41 +0000 (23:07 -0400)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 3 Apr 2016 03:07:41 +0000 (23:07 -0400)
docs/01-Scales.md

index 8d44784ef88d28f43a26585c95d3e6197cc32971..e7a84ddab956c4531ed0b1baef57c837a90f21e2 100644 (file)
@@ -60,7 +60,7 @@ afterUpdate | Function | undefined | Callback that runs at the end of the update
 *ticks*.display | Boolean | true | If true, show the ticks.
 *ticks*.suggestedMin | Number | - | User defined minimum number for the scale, overrides minimum value *except for if* it is higher than the minimum value.
 *ticks*.suggestedMax | Number | - | User defined maximum number for the scale, overrides maximum value *except for if* it is lower than the maximum value.
-*ticks*.min | Number | - | User defined minimum number for the scale, overrides minimum value
+*ticks*.min | Number | - | User defined minimum number for the scale, overrides minimum value
 *ticks*.max | Number | - | User defined minimum number for the scale, overrides maximum value
 *ticks*.autoSkip | Boolean | true | If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what
 *ticks*.callback | Function | `function(value) { return '' + value; } ` | Returns the string representation of the tick value as it should be displayed on the chart.
@@ -93,6 +93,8 @@ The category scale extends the core scale class with the following tick template
 }
 ```
 
+The `ticks.min` and `ticks.max` attributes may be used with the category scale. Unlike other scales, the value of these attributes must simply be something that can be found in the `labels` array of the data object.
+
 ### Linear Scale
 The linear scale can be used to display numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis.