mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
add typing and docs for maxTicksLimit all scales (#10057)
* add typing and docs for maxTicksLimit time scale * change maxTicksLimit to base instead of each scale seperatly since its done in the core.scale
This commit is contained in:
parent
cb1fd3fca7
commit
4d918f5afa
@ -15,3 +15,4 @@ Namespace: `options.scales[scaleId].ticks`
|
|||||||
| `minRotation` | `number` | `0` | Minimum rotation for tick labels. *Note: Only applicable to horizontal scales.*
|
| `minRotation` | `number` | `0` | Minimum rotation for tick labels. *Note: Only applicable to horizontal scales.*
|
||||||
| `mirror` | `boolean` | `false` | Flips tick labels around axis, displaying the labels inside the chart instead of outside. *Note: Only applicable to vertical scales.*
|
| `mirror` | `boolean` | `false` | Flips tick labels around axis, displaying the labels inside the chart instead of outside. *Note: Only applicable to vertical scales.*
|
||||||
| `padding` | `number` | `0` | Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.
|
| `padding` | `number` | `0` | Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.
|
||||||
|
| `maxTicksLimit` | `number` | `11` | Maximum number of ticks and gridlines to show.
|
||||||
|
@ -27,7 +27,6 @@ Namespace: `options.scales[scaleId].ticks`
|
|||||||
| ---- | ---- | ------- | ------- | -----------
|
| ---- | ---- | ------- | ------- | -----------
|
||||||
| `count` | `number` | Yes | `undefined` | The number of ticks to generate. If specified, this overrides the automatic generation.
|
| `count` | `number` | Yes | `undefined` | The number of ticks to generate. If specified, this overrides the automatic generation.
|
||||||
| `format` | `object` | Yes | | The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) options used by the default label formatter
|
| `format` | `object` | Yes | | The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) options used by the default label formatter
|
||||||
| `maxTicksLimit` | `number` | Yes | `11` | Maximum number of ticks and gridlines to show.
|
|
||||||
| `precision` | `number` | Yes | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
|
| `precision` | `number` | Yes | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
|
||||||
| `stepSize` | `number` | Yes | | User-defined fixed step size for the scale. [more...](#step-size)
|
| `stepSize` | `number` | Yes | | User-defined fixed step size for the scale. [more...](#step-size)
|
||||||
|
|
||||||
|
10
types/index.esm.d.ts
vendored
10
types/index.esm.d.ts
vendored
@ -3078,6 +3078,11 @@ export interface CartesianScaleOptions extends CoreScaleOptions {
|
|||||||
* @default 0
|
* @default 0
|
||||||
*/
|
*/
|
||||||
padding: number;
|
padding: number;
|
||||||
|
/**
|
||||||
|
* Maximum number of ticks and gridlines to show.
|
||||||
|
* @default 11
|
||||||
|
*/
|
||||||
|
maxTicksLimit: number;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3120,11 +3125,6 @@ export type LinearScaleOptions = CartesianScaleOptions & {
|
|||||||
*/
|
*/
|
||||||
format: Intl.NumberFormatOptions;
|
format: Intl.NumberFormatOptions;
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum number of ticks and gridlines to show.
|
|
||||||
* @default 11
|
|
||||||
*/
|
|
||||||
maxTicksLimit: number;
|
|
||||||
/**
|
/**
|
||||||
* if defined and stepSize is not specified, the step size will be rounded to this many decimal places.
|
* if defined and stepSize is not specified, the step size will be rounded to this many decimal places.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user