Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types/ type suggestedMin and suggestedMax for time scale #9986

Merged
merged 2 commits into from Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/axes/cartesian/time.md
Expand Up @@ -24,8 +24,10 @@ Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| `min` | `string`\|`number` | | The minimum item to display. [more...](#min-max-configuration)
| `max` | `string`\|`number` | | The maximum item to display. [more...](#min-max-configuration)
| `min` | `number`\|`string` | | The minimum item to display. [more...](#min-max-configuration)
| `max` | `number`\|`string` | | The maximum item to display. [more...](#min-max-configuration)
| `suggestedMin` | `number`\|`string` | | The minimum item to display if there is no datapoint before it. [more...](../index.md#axis-range-settings)
| `suggestedMax` | `number`\|`string` | | The maximum item to display if there is no datapoint behind it. [more...](../index.md#axis-range-settings)
| `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)
Expand Down
3 changes: 3 additions & 0 deletions types/index.esm.d.ts
Expand Up @@ -3176,6 +3176,9 @@ export const LogarithmicScale: ChartComponent & {
export type TimeScaleOptions = CartesianScaleOptions & {
min: string | number;
max: string | number;

suggestedMin: string | number;
suggestedMax: string | number;
/**
* Scale boundary strategy (bypassed by min/max time options)
* - `data`: make sure data are fully visible, ticks outside are removed
Expand Down