Skip to content

Commit

Permalink
add typing and docs for maxTicksLimit time scale
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee committed Jan 7, 2022
1 parent cb1fd3f commit 9a34c0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/axes/cartesian/time.md
Expand Up @@ -31,6 +31,7 @@ Namespace: `options.scales[scaleId]`
| `adapters.date` | `object` | `{}` | Options for adapter for external date library if that adapter needs or supports options
| `bounds` | `string` | `'data'` | Determines the scale bounds. [more...](./index.md#scale-bounds)
| `ticks.source` | `string` | `'auto'` | How ticks are generated. [more...](#ticks-source)
| `ticks.maxTicksLimit` | `number` | `11` | Maximum number of ticks and gridlines to show.
| `time.displayFormats` | `object` | | Sets how different time units are displayed. [more...](#display-formats)
| `time.isoWeekday` | `boolean`\|`number` | `false` | If `boolean` and true and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it will be Sunday. If `number`, the index of the first day of the week (0 - Sunday, 6 - Saturday)
| `time.parser` | `string`\|`function` | | Custom parser for dates. [more...](#parser)
Expand Down
6 changes: 6 additions & 0 deletions types/index.esm.d.ts
Expand Up @@ -3249,6 +3249,12 @@ export type TimeScaleOptions = CartesianScaleOptions & {
* @default 'auto'
*/
source: 'labels' | 'auto' | 'data';

/**
* Maximum number of ticks and gridlines to show.
* @default 11
*/
maxTicksLimit: number;
};
};

Expand Down

0 comments on commit 9a34c0d

Please sign in to comment.