Skip to content

Commit b4fe607

Browse files
authored
Update category scale labels types to include string[][] (#7953)
1 parent 6dbb7e7 commit b4fe607

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/docs/axes/cartesian/category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ These options extend the [common configuration for all cartesian axes](index.md#
4545
| ---- | ---- | -----------
4646
| `min` | `string`\|`number` | | The minimum item to display. [more...](#min-max-configuration)
4747
| `max` | `string`\|`number` | | The maximum item to display. [more...](#min-max-configuration)
48-
| `labels` | `string[]` | - | An array of labels to display.
48+
| `labels` | `string[]|string[][]` | - | An array of labels to display. When an individual label is an array of strings, each item is rendered on a new line.
4949

5050
## Min Max Configuration
5151

types/scales/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export interface ICartesianScaleOptions extends ICoreScaleOptions {
183183
export type ICategoryScaleOptions = ICartesianScaleOptions & {
184184
min: string | number;
185185
max: string | number;
186-
labels: string[];
186+
labels: string[] | string[][];
187187
};
188188

189189
export interface CategoryScale<O extends ICategoryScaleOptions = ICategoryScaleOptions> extends Scale<O> {}

0 commit comments

Comments
 (0)