You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/legend.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ The doughnut, pie, and polar area charts override the legend defaults. To change
26
26
| `rtl` | `boolean` | | `true` for rendering the legends from right to left.
27
27
| `textDirection` | `string` | canvas' default | This will force the text direction `'rtl'` or `'ltr'` on the canvas for rendering the legend, regardless of the css specified on the canvas
28
28
| `title` | `object` | | See the [Legend Title Configuration](#legend-title-configuration) section below.
29
+
| `navigation` | `object` | | Handle large sets of legends with pagination. [more...](#legend-navigation-configuration)
29
30
30
31
:::tip Note
31
32
If you need more visual customizations, please use an [HTML legend](../samples/legend/html.md).
| `padding` | [`Padding`](../general/padding.md) | `0` | Padding around the title.
87
88
| `text` | `string` | | The string title.
88
89
90
+
## Legend Navigation Configuration
91
+
92
+
Namespace: `options.plugins.legend.navigation`
93
+
94
+
| Name | Type | Default | Description
95
+
| ---- | ---- | ------- | -----------
96
+
| `display` | `string`\|`boolean` | `false` | Show/hide legend navigation. If `auto` is used, the navigation will be shown only if the legend overflows.
97
+
| `color` | [`Color`](../general/colors.md) | `Chart.defaults.color` | Color of the navigation page count label.
98
+
| `activeColor` | [`Color`](../general/colors.md) | `Chart.defaults.color` | Color of active navigation arrows.
99
+
| `inactiveColor` | [`Color`](../general/colors.md) | 40% opacity of the active color | Color of inactive navigation arrows.
| `align` | `string` | `'start'` | Alignment of navigation buttons. Possible options are `start`, `center` and `end`.
105
+
| `grid` | `boolean`\|`object` | `true` | Align legends horizontally and vertically. Can be a `boolean` or an object containing `x` and `y` with boolean values indicating whether the axis should be aligned.
106
+
| `font` | `Font` | `{ weight: 'bold', size: 14 }` | Font style of the navigation page count label. See [Fonts](../general/fonts.md)
107
+
89
108
## Legend Item Interface
90
109
91
110
Items passed to the legend `onClick` function are the ones returned from `labels.generateLabels`. These items must implement the following interface.
0 commit comments