@nanahoshi/mona-ui 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chart/README.md +2 -2
- package/docs/chart-bar.md +714 -0
- package/docs/chart-financial.md +567 -0
- package/docs/chart-funnel.md +546 -0
- package/docs/chart-heatmap.md +535 -0
- package/docs/chart-line-area.md +462 -0
- package/docs/chart-pie.md +645 -0
- package/docs/chart-radar.md +518 -0
- package/docs/chart-radial.md +658 -0
- package/docs/chart-scatter.md +479 -0
- package/docs/chart-treemap.md +651 -0
- package/docs/chart.md +263 -1856
- package/fesm2022/nanahoshi-mona-ui-button.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +126 -66
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +5 -8
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +7 -2
- package/llms.txt +11 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-chart.d.ts +50 -20
- package/types/nanahoshi-mona-ui-internal.d.ts +6 -2
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
# Radial
|
|
2
|
+
|
|
3
|
+
> Radial bar, rose and gauge series that draw values as arcs around a center.
|
|
4
|
+
|
|
5
|
+
Entry point: `@nanahoshi/mona-ui/chart`
|
|
6
|
+
|
|
7
|
+
**Selectors:** `mona-radial-bar-series`, `mona-rose-series`, `mona-gauge-series`
|
|
8
|
+
|
|
9
|
+
Radial bar, rose and gauge series draw values as arcs around a center. A radial bar draws each value as a ring that fills part of a circle, a rose gives each category an equal slice whose length shows its value, and a gauge shows one value on a dial between a minimum and a maximum. Each goes alone inside a `mona-chart`, and only the rose uses axes.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Pick the series by what the reader should take away.
|
|
14
|
+
|
|
15
|
+
| Series | Use it for | Reads |
|
|
16
|
+
| :--- | :--- | :--- |
|
|
17
|
+
| `mona-radial-bar-series` | Progress of a few items towards a goal, such as completion rates or quotas. | `categoryField`, `field` |
|
|
18
|
+
| `mona-rose-series` | A value for each of a set of cyclical categories, such as compass directions, months or hours of the day. | `categoryField`, `field` |
|
|
19
|
+
| `mona-gauge-series` | One value on a known scale, such as a load, a score or a level. | `value`, or `field` |
|
|
20
|
+
|
|
21
|
+
**Use something else when:**
|
|
22
|
+
|
|
23
|
+
- Readers must compare the values precisely. Arcs of different radii are hard to compare, and a bar chart reads better, see [Bar & Waterfall](chart-bar.md).
|
|
24
|
+
- The values are parts of one whole. Use a pie or donut, see [Pie & Donut](chart-pie.md).
|
|
25
|
+
- Several series share the same categories. A chart holds only one radial series, so use a radar, see [Radar & Polar](chart-radar.md).
|
|
26
|
+
|
|
27
|
+
The chart, legend, tooltip and accessibility parts these series sit in are described on [Chart Overview](chart.md).
|
|
28
|
+
|
|
29
|
+
## Import & Quick Start
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import {
|
|
33
|
+
ChartComponent,
|
|
34
|
+
ChartLegendComponent,
|
|
35
|
+
ChartTooltipComponent,
|
|
36
|
+
RadialBarSeriesComponent
|
|
37
|
+
} from "@nanahoshi/mona-ui/chart";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<mona-chart aria-label="Goal progress" class="h-72 w-full" [data]="goals">
|
|
42
|
+
<mona-radial-bar-series categoryField="team" field="progress" name="Progress" [max]="100" />
|
|
43
|
+
<mona-chart-legend />
|
|
44
|
+
<mona-chart-tooltip />
|
|
45
|
+
</mona-chart>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Give the chart a height. It fills its host, and a host without a height has none.
|
|
49
|
+
|
|
50
|
+
## Anatomy
|
|
51
|
+
|
|
52
|
+
A radial bar and a rose read their rows from the chart's `data`, unless they have their own `data`. Each row gives a category, from `categoryField`, and a value, from `field`. A field is a property name or an accessor, `(row, index) => value`. A gauge shows one value: its `value` input when set, or else the first row whose `field` is a number.
|
|
53
|
+
|
|
54
|
+
| Input | Radial bar | Rose | Gauge |
|
|
55
|
+
| :--- | :---: | :---: | :---: |
|
|
56
|
+
| `field`, `data`, `keyField`, `valueFormatter` | ✓ | ✓ | ✓ |
|
|
57
|
+
| `categoryField`, `categoryFormatter`, `colorField`, `colors` | ✓ | ✓ | |
|
|
58
|
+
| `startAngle`, `endAngle`, `innerRadiusRatio`, `outerRadiusRatio`, `cornerRadius` | ✓ | ✓ | ✓ |
|
|
59
|
+
| `fillMode`, `fillOpacity` | ✓ | ✓ | ✓ |
|
|
60
|
+
| `strokeColor`, `strokeWidth` | ✓ | ✓ | |
|
|
61
|
+
| `trackColor`, `trackOpacity` | ✓ | | ✓ |
|
|
62
|
+
| `min`, `max` | ✓ | | ✓ |
|
|
63
|
+
| `barGap`, `barThickness`, `showTrack` | ✓ | | |
|
|
64
|
+
| `padAngle`, `scaleMode` | | ✓ | |
|
|
65
|
+
| `value`, `indicator`, `needleColor`, `needleLengthRatio`, `needleWidth`, `hubRadius`, `showValue`, `color` | | | ✓ |
|
|
66
|
+
| `[(hiddenItemIds)]`, `(datumVisibilityChange)` | ✓ | ✓ | |
|
|
67
|
+
|
|
68
|
+
### Axes
|
|
69
|
+
|
|
70
|
+
Only the rose uses axes. A `mona-chart-angular-axis` labels each category around the edge, and a `mona-chart-radial-axis` draws value rings and sets the petals' scale with `min`, `max`, `nice` and `tickCount`. Their inputs are described on [Radar & Polar](chart-radar.md). With a rose:
|
|
71
|
+
|
|
72
|
+
- The angular axis `rotation` turns the petals as well as the labels, and its `tickCount` has no effect. Past 36 categories, only some labels are shown.
|
|
73
|
+
- The radial axis grid is always circular. `gridShape="polygon"` falls back to circles, with a development warning.
|
|
74
|
+
|
|
75
|
+
A radial bar or a gauge ignores both axes, and every radial series ignores the X and Y axes. Each logs a development warning when they're there.
|
|
76
|
+
|
|
77
|
+
### Templates
|
|
78
|
+
|
|
79
|
+
- `ng-template[monaChartGaugeCenterTemplate]`, inside a gauge, replaces the value in its middle. The context is a `ChartGaugeCenterTemplateContext`, with `formattedValue`, `value`, `formattedMin`, `formattedMax`, `ratio` (from `0` to `1`), `isClamped`, `seriesName` and `seriesId`. It's shown even when `showValue` is `false`.
|
|
80
|
+
- `ng-template[monaChartAxisLabelTemplate]`, inside a rose's angular or radial axis, replaces each label. The context's `$implicit` is the category or the value.
|
|
81
|
+
- The chart, legend and tooltip templates are described on [Chart Overview](chart.md).
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
|
|
85
|
+
### Progress rings
|
|
86
|
+
|
|
87
|
+
A radial bar with `max` set to `100` shows each team's progress as a share of its goal, and `endAngle` stops the rings at three quarters of a turn. The legend toggles a team, and `[(hiddenItemIds)]` and `(datumVisibilityChange)` report it.
|
|
88
|
+
|
|
89
|
+
`goal-rings-example.component.ts`
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { Component, computed, signal } from "@angular/core";
|
|
93
|
+
import {
|
|
94
|
+
ChartComponent,
|
|
95
|
+
ChartLegendComponent,
|
|
96
|
+
ChartTooltipComponent,
|
|
97
|
+
RadialBarSeriesComponent
|
|
98
|
+
} from "@nanahoshi/mona-ui/chart";
|
|
99
|
+
import type { ChartRadialDatumVisibilityEvent, ChartValueFormatter } from "@nanahoshi/mona-ui/chart";
|
|
100
|
+
|
|
101
|
+
@Component({
|
|
102
|
+
selector: "app-chart-radial-goal-rings-example",
|
|
103
|
+
imports: [ChartComponent, ChartLegendComponent, ChartTooltipComponent, RadialBarSeriesComponent],
|
|
104
|
+
templateUrl: "./goal-rings-example.component.html"
|
|
105
|
+
})
|
|
106
|
+
export class ChartRadialGoalRingsExampleComponent {
|
|
107
|
+
protected readonly goals = [
|
|
108
|
+
{ progress: 82, team: "Sales" },
|
|
109
|
+
{ progress: 64, team: "Support" },
|
|
110
|
+
{ progress: 91, team: "Product" },
|
|
111
|
+
{ progress: 47, team: "Marketing" }
|
|
112
|
+
];
|
|
113
|
+
protected readonly hiddenSummary = computed(() => {
|
|
114
|
+
const ids = this.hiddenTeams();
|
|
115
|
+
return ids.length > 0 ? ids.join(", ") : "none";
|
|
116
|
+
});
|
|
117
|
+
protected readonly hiddenTeams = signal<readonly string[]>([]);
|
|
118
|
+
protected readonly lastToggle = signal("Toggle a team in the legend.");
|
|
119
|
+
|
|
120
|
+
protected onDatumVisibilityChange(event: ChartRadialDatumVisibilityEvent): void {
|
|
121
|
+
this.lastToggle.set(`${String(event.category)} is now ${event.visible ? "shown" : "hidden"}.`);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
protected readonly percent: ChartValueFormatter = value => `${String(value)}%`;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`goal-rings-example.component.html`
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<div class="flex w-full flex-col gap-3">
|
|
132
|
+
<mona-chart aria-label="Progress towards quarterly goals" class="h-80 w-full" [data]="goals">
|
|
133
|
+
<mona-radial-bar-series
|
|
134
|
+
categoryField="team"
|
|
135
|
+
field="progress"
|
|
136
|
+
name="Goal progress"
|
|
137
|
+
[endAngle]="270"
|
|
138
|
+
[max]="100"
|
|
139
|
+
[valueFormatter]="percent"
|
|
140
|
+
[(hiddenItemIds)]="hiddenTeams"
|
|
141
|
+
(datumVisibilityChange)="onDatumVisibilityChange($event)" />
|
|
142
|
+
<mona-chart-legend position="end" />
|
|
143
|
+
<mona-chart-tooltip />
|
|
144
|
+
</mona-chart>
|
|
145
|
+
<p class="text-sm">
|
|
146
|
+
{{ lastToggle() }} Hidden item ids: <code>{{ hiddenSummary() }}</code>
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Wind rose
|
|
152
|
+
|
|
153
|
+
A rose gives each direction an equal slice. The angular axis is turned by half a slice so that north points up, and the radial axis labels the value rings. Switch between scaling the petals by area and by radius to see how much larger values look by radius.
|
|
154
|
+
|
|
155
|
+
`wind-rose-example.component.ts`
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
import { Component, signal } from "@angular/core";
|
|
159
|
+
import {
|
|
160
|
+
ChartAngularAxisComponent,
|
|
161
|
+
ChartComponent,
|
|
162
|
+
ChartRadialAxisComponent,
|
|
163
|
+
ChartTooltipComponent,
|
|
164
|
+
RoseSeriesComponent
|
|
165
|
+
} from "@nanahoshi/mona-ui/chart";
|
|
166
|
+
import type { ChartAxisFormatter, ChartRoseScaleMode, ChartValueFormatter } from "@nanahoshi/mona-ui/chart";
|
|
167
|
+
import { SegmentedComponent } from "@nanahoshi/mona-ui/segmented";
|
|
168
|
+
import type { SegmentedOption } from "@nanahoshi/mona-ui/segmented";
|
|
169
|
+
|
|
170
|
+
@Component({
|
|
171
|
+
selector: "app-chart-radial-wind-rose-example",
|
|
172
|
+
imports: [
|
|
173
|
+
ChartAngularAxisComponent,
|
|
174
|
+
ChartComponent,
|
|
175
|
+
ChartRadialAxisComponent,
|
|
176
|
+
ChartTooltipComponent,
|
|
177
|
+
RoseSeriesComponent,
|
|
178
|
+
SegmentedComponent
|
|
179
|
+
],
|
|
180
|
+
templateUrl: "./wind-rose-example.component.html"
|
|
181
|
+
})
|
|
182
|
+
export class ChartRadialWindRoseExampleComponent {
|
|
183
|
+
protected readonly scaleMode = signal<ChartRoseScaleMode>("area");
|
|
184
|
+
protected readonly scaleModes: readonly SegmentedOption<ChartRoseScaleMode>[] = [
|
|
185
|
+
{ label: "By area", value: "area" },
|
|
186
|
+
{ label: "By radius", value: "radius" }
|
|
187
|
+
];
|
|
188
|
+
protected readonly wind = [
|
|
189
|
+
{ direction: "N", hours: 42 },
|
|
190
|
+
{ direction: "NE", hours: 31 },
|
|
191
|
+
{ direction: "E", hours: 18 },
|
|
192
|
+
{ direction: "SE", hours: 12 },
|
|
193
|
+
{ direction: "S", hours: 26 },
|
|
194
|
+
{ direction: "SW", hours: 48 },
|
|
195
|
+
{ direction: "W", hours: 57 },
|
|
196
|
+
{ direction: "NW", hours: 39 }
|
|
197
|
+
];
|
|
198
|
+
|
|
199
|
+
protected readonly hourTicks: ChartAxisFormatter = value => `${String(value)} h`;
|
|
200
|
+
|
|
201
|
+
protected readonly hours: ChartValueFormatter = value => `${String(value)} hours`;
|
|
202
|
+
|
|
203
|
+
protected onScaleModeChange(mode: ChartRoseScaleMode | null): void {
|
|
204
|
+
if (mode) {
|
|
205
|
+
this.scaleMode.set(mode);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
`wind-rose-example.component.html`
|
|
212
|
+
|
|
213
|
+
```html
|
|
214
|
+
<div class="flex w-full flex-col gap-3">
|
|
215
|
+
<mona-segmented
|
|
216
|
+
aria-label="Petal scale"
|
|
217
|
+
size="small"
|
|
218
|
+
[options]="scaleModes"
|
|
219
|
+
[value]="scaleMode()"
|
|
220
|
+
(valueChange)="onScaleModeChange($event)"></mona-segmented>
|
|
221
|
+
<mona-chart aria-label="Hours of wind by direction in March" class="h-80 w-full" [data]="wind">
|
|
222
|
+
<mona-rose-series
|
|
223
|
+
categoryField="direction"
|
|
224
|
+
field="hours"
|
|
225
|
+
name="Wind"
|
|
226
|
+
[scaleMode]="scaleMode()"
|
|
227
|
+
[valueFormatter]="hours" />
|
|
228
|
+
<mona-chart-angular-axis [rotation]="-22.5" />
|
|
229
|
+
<mona-chart-radial-axis [formatter]="hourTicks" [labelAngle]="22.5" />
|
|
230
|
+
<mona-chart-tooltip />
|
|
231
|
+
</mona-chart>
|
|
232
|
+
</div>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Half gauge
|
|
236
|
+
|
|
237
|
+
A gauge from `-90` to `90` degrees draws a half circle, and `value` sets its reading directly. The center template adds a note when the reading is beyond `max`, where the arc stops.
|
|
238
|
+
|
|
239
|
+
`server-gauge-example.component.ts`
|
|
240
|
+
|
|
241
|
+
```typescript
|
|
242
|
+
import { Component, signal } from "@angular/core";
|
|
243
|
+
import {
|
|
244
|
+
ChartComponent,
|
|
245
|
+
ChartGaugeCenterTemplateDirective,
|
|
246
|
+
ChartTooltipComponent,
|
|
247
|
+
GaugeSeriesComponent
|
|
248
|
+
} from "@nanahoshi/mona-ui/chart";
|
|
249
|
+
import type { ChartValueFormatter } from "@nanahoshi/mona-ui/chart";
|
|
250
|
+
import { SegmentedComponent } from "@nanahoshi/mona-ui/segmented";
|
|
251
|
+
import type { SegmentedOption } from "@nanahoshi/mona-ui/segmented";
|
|
252
|
+
|
|
253
|
+
@Component({
|
|
254
|
+
selector: "app-chart-radial-server-gauge-example",
|
|
255
|
+
imports: [
|
|
256
|
+
ChartComponent,
|
|
257
|
+
ChartGaugeCenterTemplateDirective,
|
|
258
|
+
ChartTooltipComponent,
|
|
259
|
+
GaugeSeriesComponent,
|
|
260
|
+
SegmentedComponent
|
|
261
|
+
],
|
|
262
|
+
templateUrl: "./server-gauge-example.component.html"
|
|
263
|
+
})
|
|
264
|
+
export class ChartRadialServerGaugeExampleComponent {
|
|
265
|
+
protected readonly load = signal(34);
|
|
266
|
+
protected readonly loads: readonly SegmentedOption<number>[] = [
|
|
267
|
+
{ label: "Quiet", value: 34 },
|
|
268
|
+
{ label: "Busy", value: 78 },
|
|
269
|
+
{ label: "Overloaded", value: 112 }
|
|
270
|
+
];
|
|
271
|
+
|
|
272
|
+
protected onLoadChange(load: number | null): void {
|
|
273
|
+
if (load !== null) {
|
|
274
|
+
this.load.set(load);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
protected readonly percent: ChartValueFormatter = value => `${String(value)}%`;
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
`server-gauge-example.component.html`
|
|
283
|
+
|
|
284
|
+
```html
|
|
285
|
+
<div class="flex w-full flex-col gap-3">
|
|
286
|
+
<mona-segmented
|
|
287
|
+
aria-label="Simulated load"
|
|
288
|
+
size="small"
|
|
289
|
+
[options]="loads"
|
|
290
|
+
[value]="load()"
|
|
291
|
+
(valueChange)="onLoadChange($event)"></mona-segmented>
|
|
292
|
+
<mona-chart aria-label="Server load" class="h-64 w-full">
|
|
293
|
+
<mona-gauge-series
|
|
294
|
+
name="Server load"
|
|
295
|
+
[endAngle]="90"
|
|
296
|
+
[startAngle]="-90"
|
|
297
|
+
[value]="load()"
|
|
298
|
+
[valueFormatter]="percent">
|
|
299
|
+
<ng-template monaChartGaugeCenterTemplate let-formattedValue="formattedValue" let-isClamped="isClamped">
|
|
300
|
+
<span class="text-2xl font-semibold text-foreground">{{ formattedValue }}</span>
|
|
301
|
+
@if (isClamped) {
|
|
302
|
+
<span class="text-xs text-muted-foreground">Above the scale</span>
|
|
303
|
+
}
|
|
304
|
+
</ng-template>
|
|
305
|
+
</mona-gauge-series>
|
|
306
|
+
<mona-chart-tooltip />
|
|
307
|
+
</mona-chart>
|
|
308
|
+
</div>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Appearance & Styling
|
|
312
|
+
|
|
313
|
+
### Angles and size
|
|
314
|
+
|
|
315
|
+
Angles are in degrees, with `0` at 12 o'clock, and go clockwise. A series covers the sweep from `startAngle` to `endAngle`, up to a full turn. When `endAngle` isn't past `startAngle`, the sweep wraps around: `270` to `90` is the upper half.
|
|
316
|
+
|
|
317
|
+
| Series | Default sweep |
|
|
318
|
+
| :--- | :--- |
|
|
319
|
+
| Radial bar | `0` to `360`, a full circle |
|
|
320
|
+
| Rose | `0` to `360`, a full circle |
|
|
321
|
+
| Gauge | `-120` to `120`, a circle open at the bottom |
|
|
322
|
+
|
|
323
|
+
The outer radius is `outerRadiusRatio` of half the plot's shorter side, and the inner radius is `innerRadiusRatio` of the outer radius. A rose first leaves room for its axis labels, and a stroke takes half its width off the outer radius. Every series is centered in the plot, whatever its angles, so a half gauge leaves the lower half of a square plot empty.
|
|
324
|
+
|
|
325
|
+
### Radial bar
|
|
326
|
+
|
|
327
|
+
| Input | Effect |
|
|
328
|
+
| :--- | :--- |
|
|
329
|
+
| `barGap` | Pixels between rings. It shrinks when the rings wouldn't fit. |
|
|
330
|
+
| `barThickness` | The thickness of each ring, up to what fits. Thinner rings are centered between the inner and outer radius. Without it, the rings share all the space. |
|
|
331
|
+
| `cornerRadius` | Rounds the ends of each ring, up to half its thickness. The default rounds them fully; `0` squares them. |
|
|
332
|
+
| `showTrack`, `trackColor`, `trackOpacity` | A track behind each ring, over the whole sweep, so the reader can see how far the ring has to go. |
|
|
333
|
+
|
|
334
|
+
### Rose
|
|
335
|
+
|
|
336
|
+
| Input | Effect |
|
|
337
|
+
| :--- | :--- |
|
|
338
|
+
| `scaleMode` | `"area"` makes each petal's area proportional to its value, so the eye compares them fairly. `"radius"` makes its length proportional, which makes large values look larger than they are. |
|
|
339
|
+
| `padAngle` | Degrees between petals, at most about a third of a slice. |
|
|
340
|
+
| `cornerRadius` | Rounds the corners of each petal, up to half its length. The default is square. |
|
|
341
|
+
|
|
342
|
+
### Gauge
|
|
343
|
+
|
|
344
|
+
| Input | Effect |
|
|
345
|
+
| :--- | :--- |
|
|
346
|
+
| `indicator` | `"arc"` fills the track up to the value, `"needle"` points at it, and `"both"` does both. |
|
|
347
|
+
| `needleLengthRatio`, `needleWidth`, `hubRadius` | The needle's length as a share of the outer radius, its width at the base, and the radius of the hub at the center, in pixels. |
|
|
348
|
+
| `showValue` | Writes the formatted value in the middle. Its size follows the inner radius. The needle's hub is in the middle too, so with a needle you may want to turn it off or use a center template that clears it. |
|
|
349
|
+
| `cornerRadius` | Rounds the ends of the value arc. The default is square. |
|
|
350
|
+
|
|
351
|
+
### Color and fill
|
|
352
|
+
|
|
353
|
+
| Input | Values | Effect |
|
|
354
|
+
| :--- | :--- | :--- |
|
|
355
|
+
| `colorField` | A field | Reads a CSS color or variable name from each row. It wins over `colors`. |
|
|
356
|
+
| `colors` | CSS colors or variable names | Colors the items in turn, starting again when they run out. Without either, items take `--color-chart-1` to `--color-chart-5` in order. |
|
|
357
|
+
| `color`, `needleColor` | Any CSS color | A gauge's value color, and its needle and hub color. The needle takes the value color by default. |
|
|
358
|
+
| `fillMode` | `"solid"`, `"gradient"` | A gradient runs from a light tint at the inner edge of each arc to a translucent wash at its outer edge, so it's much lighter than a solid fill. |
|
|
359
|
+
| `fillOpacity` | A number from `0` to `1` | The opacity of the fill. The default is `1`. |
|
|
360
|
+
| `strokeColor`, `strokeWidth` | Any CSS color, pixels | An outline around each ring or petal. There is none by default, and without `strokeColor` it takes the item's color. |
|
|
361
|
+
| `trackColor`, `trackOpacity` | Any CSS color, `0` to `1` | The track behind the rings or the gauge. It's `--color-muted` at `0.15` opacity by default. |
|
|
362
|
+
|
|
363
|
+
## Theming
|
|
364
|
+
|
|
365
|
+
These custom properties, set on the series element or an ancestor, change the defaults. An input wins over them.
|
|
366
|
+
|
|
367
|
+
| Property | Series | Sets |
|
|
368
|
+
| :--- | :--- | :--- |
|
|
369
|
+
| `--mona-chart-radial-track-color` | Radial bar, gauge | The track color. |
|
|
370
|
+
| `--mona-chart-radial-track-opacity` | Radial bar, gauge | The track opacity. |
|
|
371
|
+
| `--mona-chart-radial-arc-fill-opacity` | All | The fill opacity. |
|
|
372
|
+
| `--mona-chart-radial-arc-stroke-color` | Radial bar, rose | The outline color. |
|
|
373
|
+
| `--mona-chart-radial-arc-stroke-width` | Radial bar, rose | The outline width. |
|
|
374
|
+
| `--mona-chart-gauge-color` | Gauge | The value color. |
|
|
375
|
+
| `--mona-chart-gauge-needle-color` | Gauge | The needle color. |
|
|
376
|
+
| `--mona-chart-gauge-hub-color` | Gauge | The hub color. It follows the needle color otherwise. |
|
|
377
|
+
|
|
378
|
+
## Behavior
|
|
379
|
+
|
|
380
|
+
### One radial series per chart
|
|
381
|
+
|
|
382
|
+
A chart draws a single radial bar, rose or gauge. With two, or with a radial series next to a Cartesian, pie, donut, radar or polar series, it draws nothing and logs a development warning. Use a chart for each gauge in a dashboard.
|
|
383
|
+
|
|
384
|
+
### Scales
|
|
385
|
+
|
|
386
|
+
- **Radial bar:** a ring's length is its value's share of the range from `min` to `max`. `min` is `0` by default, and a negative one is raised to `0`. `max` is the largest value by default, so the largest ring always closes; set it when the values are shares of a known total. A value beyond the range draws an empty or a full ring, and the tooltip still gives the real value.
|
|
387
|
+
- **Rose:** a petal's length runs from the radial axis `min`, `0` by default, to its `max`, which is the largest value rounded up to a tidy number unless the axis sets it or turns `nice` off.
|
|
388
|
+
- **Gauge:** the dial runs from `min`, `0`, to `max`, `100`. When `max` is below `min` they're swapped, and when they're equal `max` becomes `min + 1`, each with a development warning. A value beyond the dial stops the arc and the needle at its end, while the text still gives the value and `isClamped` is `true`.
|
|
389
|
+
|
|
390
|
+
### Missing values
|
|
391
|
+
|
|
392
|
+
| Series | A missing or non-numeric value | A negative value |
|
|
393
|
+
| :--- | :--- | :--- |
|
|
394
|
+
| Radial bar | Leaves the row out. The other rings share its space. | The same, with a development warning. |
|
|
395
|
+
| Rose | Leaves the category's slice empty, so the other petals keep their places. | The same, with a development warning. |
|
|
396
|
+
| Gauge | Is skipped in favor of the next row. With no value at all, the chart shows its no-data state. | Is a valid reading, drawn at `min` when below it. |
|
|
397
|
+
|
|
398
|
+
When two rows have the same category, the first one with a value is kept, and a radial bar logs a development warning. A gauge given several valid rows uses the first and warns.
|
|
399
|
+
|
|
400
|
+
### Hiding items
|
|
401
|
+
|
|
402
|
+
The legend of a radial bar or rose has an entry for each item, named by its formatted category. Toggling one hides that item, writes `[(hiddenItemIds)]` and emits `datumVisibilityChange` with the item's `itemId`, category, row and new visibility. It doesn't emit the chart's `seriesVisibilityChange`. The scale stays the same, so the other items keep their lengths: a hidden ring gives its space to the others, and a hidden petal leaves its slice empty. `toggleDatum(itemId)` does the same from code.
|
|
403
|
+
|
|
404
|
+
An item's id comes from `keyField`, or else its category, or else its row index, and `chartItemKeyId(key)`, `chartItemCategoryId(category)` and `chartItemIndexId(index)` build each kind. So `chartItemCategoryId("Sales")` hides the item whose category is `"Sales"`. These functions are described in the [Chart Overview API](chart.md). Treat the ids as opaque: compare them, but don't parse them. Set `keyField` when categories can change but items should stay hidden. Ids the data no longer has are dropped, as described under Two-Way Binding on [Chart Overview](chart.md).
|
|
405
|
+
|
|
406
|
+
A gauge's legend entry stands for the whole series. Toggling it sets `[(visible)]` and emits `seriesVisibilityChange`.
|
|
407
|
+
|
|
408
|
+
### Formatting
|
|
409
|
+
|
|
410
|
+
`valueFormatter` formats the values in the tooltip, in screen reader announcements and in a gauge's middle, and a gauge's `formattedMin` and `formattedMax`. `categoryFormatter` formats the category names in the legend, the tooltip, the announcements and a rose's angular labels. An axis `formatter` formats that axis's labels only. Without them, numbers follow the library locale.
|
|
411
|
+
|
|
412
|
+
### Tooltip
|
|
413
|
+
|
|
414
|
+
The tooltip shows one item at a time: `shared` has no effect on these charts. In a tooltip template, `formattedCategory` and `formattedY` hold the category and value. A gauge's point also has `formattedRadialMin`, `formattedRadialMax`, `radialRatio` and `isClamped`.
|
|
415
|
+
|
|
416
|
+
## Accessibility
|
|
417
|
+
|
|
418
|
+
The chart is the focusable element, and these series add no roles of their own. Name the chart with `title` or `aria-label`, and give the series a `name`.
|
|
419
|
+
|
|
420
|
+
- **A radial bar** reads as its name, the item's category and value, and its position, such as "Goal progress, Sales: 82%, 1 of 5".
|
|
421
|
+
- **A rose** reads the same way, one petal at a time.
|
|
422
|
+
- **A gauge** reads as its name and value, then its range, such as "CPU load: 72, range 0 to 100", and says when the value is beyond the dial.
|
|
423
|
+
|
|
424
|
+
Use `valueFormatter` to add a unit the reader would otherwise miss, since it's also what screen readers hear.
|
|
425
|
+
|
|
426
|
+
- **Don't rely on color alone.** A radial bar draws no category labels, so keep the legend or the tooltip. A rose needs an angular axis to name its petals.
|
|
427
|
+
- **Keep fills visible.** Graphics need a 3:1 contrast with the background. A gradient fill and a low `fillOpacity` both lighten the arcs, so check them against the background.
|
|
428
|
+
- **The gauge's middle is read out.** A center template's content isn't hidden from screen readers, so keep it short and consistent with the value the chart announces.
|
|
429
|
+
|
|
430
|
+
### Keyboard Navigation
|
|
431
|
+
|
|
432
|
+
| Key | Action |
|
|
433
|
+
| :--- | :--- |
|
|
434
|
+
| `ArrowRight` / `ArrowLeft` | Move to the next or previous ring of a radial bar, from the outermost, or petal of a rose, clockwise. Both wrap around. |
|
|
435
|
+
| `Home` / `End` | Move to the first or last ring or petal. |
|
|
436
|
+
|
|
437
|
+
Hidden items are skipped, and a gauge has a single point. The rest of the keys, including `Enter` for `pointClick`, are listed on [Chart Overview](chart.md).
|
|
438
|
+
|
|
439
|
+
## API
|
|
440
|
+
|
|
441
|
+
Everything below is imported from `@nanahoshi/mona-ui/chart`.
|
|
442
|
+
|
|
443
|
+
### `RadialBarSeriesComponent`
|
|
444
|
+
|
|
445
|
+
Renders concentric circular progress rings with customizable bar gap, thickness, rounded corners, and background
|
|
446
|
+
tracks.
|
|
447
|
+
|
|
448
|
+
**Selector:** `mona-radial-bar-series`
|
|
449
|
+
|
|
450
|
+
#### Inputs
|
|
451
|
+
|
|
452
|
+
| Name | Type | Default | Description |
|
|
453
|
+
| --- | --- | --- | --- |
|
|
454
|
+
| `barGap` | `number` | `4` | Spacing in pixels between concentric radial rings. |
|
|
455
|
+
| `barThickness` | `number \| undefined` | `undefined` | Explicit radial thickness in pixels for each bar ring. |
|
|
456
|
+
| `categoryField` | `ChartField` | `"category"` | Property key or accessor extracting the category label for each radial ring. |
|
|
457
|
+
| `categoryFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Formatter callback for ring category labels. |
|
|
458
|
+
| `class` | `string` | `""` | Additional CSS classes applied to the series. |
|
|
459
|
+
| `colorField` | `ChartField \| undefined` | `undefined` | Accessor function or property key extracting an explicit color for each radial ring. |
|
|
460
|
+
| `colors` | `readonly string[] \| undefined` | `undefined` | Explicit array of colors used to fill successive radial rings. |
|
|
461
|
+
| `cornerRadius` | `number \| undefined` | `undefined` | Corner radius in pixels applied to arc endpoints. |
|
|
462
|
+
| `data` | `readonly unknown[] \| undefined` | `undefined` | Series-specific dataset overriding root chart data. |
|
|
463
|
+
| `endAngle` | `number` | `360` | Ending angle in degrees (clockwise from 12 o'clock). |
|
|
464
|
+
| `field` | `ChartField` | `"value"` | Property key or accessor extracting the numeric value for each radial ring. |
|
|
465
|
+
| `fillMode` | `ChartRadialArcFillMode` | `"solid"` | Fill style applied to radial rings ("solid" or radial "gradient"). |
|
|
466
|
+
| `fillOpacity` | `number \| undefined` | `undefined` | Opacity of bar fills (between 0 and 1). |
|
|
467
|
+
| `hiddenItemIds` (two-way) | `readonly string[]` | `[]` | The hidden item IDs. Bind `[(hiddenItemIds)]` for two-way binding; legend toggles write to it. Build an ID with `chartItemKeyId(key)` when `keyField` is set, or else with `chartItemCategoryId(category)`. |
|
|
468
|
+
| `innerRadiusRatio` | `number` | `0.2` | Inner radius ratio relative to available plot bounds (0 to 1). |
|
|
469
|
+
| `keyField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting a stable datum identity across updates. |
|
|
470
|
+
| `max` | `number \| undefined` | `undefined` | Explicit maximum value for the radial bar progress scale. |
|
|
471
|
+
| `min` | `number \| undefined` | `undefined` | Explicit minimum value for the radial bar progress scale. |
|
|
472
|
+
| `name` | `string` | `"Radial Bar"` | Series name used in tooltips and accessibility announcements. |
|
|
473
|
+
| `outerRadiusRatio` | `number` | `0.9` | Outer radius ratio relative to available plot bounds (0.1 to 1). |
|
|
474
|
+
| `showTrack` | `boolean` | `true` | Whether to display background circular track rings. |
|
|
475
|
+
| `startAngle` | `number` | `0` | Starting angle in degrees (0 is 12 o'clock, clockwise). |
|
|
476
|
+
| `strokeColor` | `string` | `""` | Color of bar stroke boundary. |
|
|
477
|
+
| `strokeWidth` | `number \| undefined` | `undefined` | Stroke width in pixels for bar boundaries. |
|
|
478
|
+
| `trackColor` | `string` | `""` | Color of background track rings. |
|
|
479
|
+
| `trackOpacity` | `number \| undefined` | `undefined` | Opacity of background track rings. |
|
|
480
|
+
| `valueFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Formatter callback for bar numeric values. |
|
|
481
|
+
| `visible` (two-way) | `boolean` | `true` | Two-way bindable visibility of the series. |
|
|
482
|
+
|
|
483
|
+
#### Outputs
|
|
484
|
+
|
|
485
|
+
| Name | Type | Description |
|
|
486
|
+
| --- | --- | --- |
|
|
487
|
+
| `datumVisibilityChange` | `ChartRadialDatumVisibilityEvent` | Emits when an individual ring's visibility is toggled via the legend. |
|
|
488
|
+
| `hiddenItemIdsChange` | `readonly string[]` | Emitted when `hiddenItemIds` changes. |
|
|
489
|
+
| `visibleChange` | `boolean` | Emitted when `visible` changes. |
|
|
490
|
+
|
|
491
|
+
#### Methods
|
|
492
|
+
|
|
493
|
+
| Signature | Description |
|
|
494
|
+
| --- | --- |
|
|
495
|
+
| `toggleDatum(itemId: string): boolean` | Shows or hides the bar with this id, and returns whether it's now visible. |
|
|
496
|
+
|
|
497
|
+
### `GaugeSeriesComponent`
|
|
498
|
+
|
|
499
|
+
Renders circular or semi-circular gauge meters with value progress arcs, tapered needles, central hubs, and centered
|
|
500
|
+
value projection.
|
|
501
|
+
|
|
502
|
+
**Selector:** `mona-gauge-series`
|
|
503
|
+
|
|
504
|
+
#### Inputs
|
|
505
|
+
|
|
506
|
+
| Name | Type | Default | Description |
|
|
507
|
+
| --- | --- | --- | --- |
|
|
508
|
+
| `class` | `string` | `""` | Additional CSS classes applied to the series. |
|
|
509
|
+
| `color` | `string` | `""` | Primary color of the gauge value arc. |
|
|
510
|
+
| `cornerRadius` | `number \| undefined` | `undefined` | Corner radius in pixels applied to gauge arc endpoints. |
|
|
511
|
+
| `data` | `readonly unknown[] \| undefined` | `undefined` | Series-specific dataset overriding root chart data. |
|
|
512
|
+
| `endAngle` | `number` | `120` | Ending angle in degrees (clockwise from 12 o'clock). |
|
|
513
|
+
| `field` | `ChartField` | `"value"` | Property key or accessor extracting the numeric gauge value when direct value is not set. |
|
|
514
|
+
| `fillMode` | `ChartRadialArcFillMode` | `"solid"` | Fill style applied to gauge value arc ("solid" or radial "gradient"). |
|
|
515
|
+
| `fillOpacity` | `number \| undefined` | `undefined` | Opacity of gauge value arc fill (between 0 and 1). |
|
|
516
|
+
| `hubRadius` | `number` | `5` | Radius in pixels of the needle center hub circle. |
|
|
517
|
+
| `indicator` | `ChartGaugeIndicator` | `"arc"` | Indicator mode: "arc" (progress arc), "needle" (pointer needle), or "both". |
|
|
518
|
+
| `innerRadiusRatio` | `number` | `0.72` | Inner radius ratio relative to outer radius (0 to 1). |
|
|
519
|
+
| `keyField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting a stable datum identity across updates. |
|
|
520
|
+
| `max` | `number` | `100` | Maximum domain value. |
|
|
521
|
+
| `min` | `number` | `0` | Minimum domain value. |
|
|
522
|
+
| `name` | `string` | `"Gauge"` | Series name used in tooltips and accessibility announcements. |
|
|
523
|
+
| `needleColor` | `string` | `""` | Color of the needle and center hub. |
|
|
524
|
+
| `needleLengthRatio` | `number` | `0.78` | Length of the needle pointer as a fraction of outer radius (0.1 to 1). |
|
|
525
|
+
| `needleWidth` | `number` | `2` | Stroke width in pixels for the needle pointer. |
|
|
526
|
+
| `outerRadiusRatio` | `number` | `0.9` | Outer radius ratio relative to available plot bounds (0.1 to 1). |
|
|
527
|
+
| `showValue` | `boolean` | `true` | Whether to display the formatted value in the center of the gauge. |
|
|
528
|
+
| `startAngle` | `number` | `-120` | Starting angle in degrees (0 is 12 o'clock, clockwise). |
|
|
529
|
+
| `trackColor` | `string` | `""` | Color of background track arc. |
|
|
530
|
+
| `trackOpacity` | `number \| undefined` | `undefined` | Opacity of background track arc. |
|
|
531
|
+
| `value` | `number \| undefined` | `undefined` | Direct scalar value for the gauge. When defined, takes precedence over data/field. |
|
|
532
|
+
| `valueFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Formatter callback for gauge numeric values. |
|
|
533
|
+
| `visible` (two-way) | `boolean` | `true` | Two-way bindable visibility of the series. |
|
|
534
|
+
|
|
535
|
+
#### Outputs
|
|
536
|
+
|
|
537
|
+
| Name | Type | Description |
|
|
538
|
+
| --- | --- | --- |
|
|
539
|
+
| `visibleChange` | `boolean` | Emitted when `visible` changes. |
|
|
540
|
+
|
|
541
|
+
### `RoseSeriesComponent`
|
|
542
|
+
|
|
543
|
+
Renders Nightingale rose (coxcomb) charts with angular category petals whose radial extent scales by area or radius.
|
|
544
|
+
|
|
545
|
+
**Selector:** `mona-rose-series`
|
|
546
|
+
|
|
547
|
+
#### Inputs
|
|
548
|
+
|
|
549
|
+
| Name | Type | Default | Description |
|
|
550
|
+
| --- | --- | --- | --- |
|
|
551
|
+
| `categoryField` | `ChartField` | `"category"` | Property key or accessor extracting the category label for each rose petal. |
|
|
552
|
+
| `categoryFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Formatter callback for category labels. |
|
|
553
|
+
| `class` | `string` | `""` | Additional CSS classes applied to the series. |
|
|
554
|
+
| `colorField` | `ChartField \| undefined` | `undefined` | Accessor function or property key extracting an explicit color for each petal. |
|
|
555
|
+
| `colors` | `readonly string[] \| undefined` | `undefined` | Explicit array of colors used to fill successive rose petals. |
|
|
556
|
+
| `cornerRadius` | `number \| undefined` | `undefined` | Corner radius in pixels applied to outer petal corners. |
|
|
557
|
+
| `data` | `readonly unknown[] \| undefined` | `undefined` | Series-specific dataset overriding root chart data. |
|
|
558
|
+
| `endAngle` | `number` | `360` | Ending angle in degrees (clockwise from 12 o'clock). |
|
|
559
|
+
| `field` | `ChartField` | `"value"` | Property key or accessor extracting the numeric petal value. |
|
|
560
|
+
| `fillMode` | `ChartRadialArcFillMode` | `"solid"` | Fill style applied to rose petals ("solid" or radial "gradient"). |
|
|
561
|
+
| `fillOpacity` | `number \| undefined` | `undefined` | Opacity of petal fills (between 0 and 1). |
|
|
562
|
+
| `hiddenItemIds` (two-way) | `readonly string[]` | `[]` | The hidden item IDs. Bind `[(hiddenItemIds)]` for two-way binding; legend toggles write to it. Build an ID with `chartItemKeyId(key)` when `keyField` is set, or else with `chartItemCategoryId(category)`. |
|
|
563
|
+
| `innerRadiusRatio` | `number` | `0` | Inner radius ratio relative to available plot bounds (0 to 1). |
|
|
564
|
+
| `keyField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting a stable datum identity across updates. |
|
|
565
|
+
| `name` | `string` | `"Rose"` | Series name used in tooltips and accessibility announcements. |
|
|
566
|
+
| `outerRadiusRatio` | `number` | `0.9` | Outer radius ratio relative to available plot bounds (0.1 to 1). |
|
|
567
|
+
| `padAngle` | `number` | `2` | Angular padding in degrees between adjacent rose petals. |
|
|
568
|
+
| `scaleMode` | `ChartRoseScaleMode` | `"area"` | Scale mode for petal radius: "area" (annular area proportional to value) or "radius" (linear radial distance). |
|
|
569
|
+
| `startAngle` | `number` | `0` | Starting angle in degrees (0 is 12 o'clock, clockwise). |
|
|
570
|
+
| `strokeColor` | `string` | `""` | Color of petal separator strokes. |
|
|
571
|
+
| `strokeWidth` | `number \| undefined` | `undefined` | Stroke width in pixels for petal boundaries. |
|
|
572
|
+
| `valueFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Formatter callback for petal numeric values. |
|
|
573
|
+
| `visible` (two-way) | `boolean` | `true` | Two-way bindable visibility of the series. |
|
|
574
|
+
|
|
575
|
+
#### Outputs
|
|
576
|
+
|
|
577
|
+
| Name | Type | Description |
|
|
578
|
+
| --- | --- | --- |
|
|
579
|
+
| `datumVisibilityChange` | `ChartRadialDatumVisibilityEvent` | Emits when an individual petal's visibility is toggled via the legend. |
|
|
580
|
+
| `hiddenItemIdsChange` | `readonly string[]` | Emitted when `hiddenItemIds` changes. |
|
|
581
|
+
| `visibleChange` | `boolean` | Emitted when `visible` changes. |
|
|
582
|
+
|
|
583
|
+
#### Methods
|
|
584
|
+
|
|
585
|
+
| Signature | Description |
|
|
586
|
+
| --- | --- |
|
|
587
|
+
| `toggleDatum(itemId: string): boolean` | Shows or hides the petal with this id, and returns whether it's now visible. |
|
|
588
|
+
|
|
589
|
+
### `ChartGaugeCenterTemplateDirective`
|
|
590
|
+
|
|
591
|
+
**Selector:** `ng-template[monaChartGaugeCenterTemplate]`
|
|
592
|
+
|
|
593
|
+
#### Template context
|
|
594
|
+
|
|
595
|
+
| Name | Type |
|
|
596
|
+
| --- | --- |
|
|
597
|
+
| `$implicit` | `number` |
|
|
598
|
+
| `formattedMax` | `string` |
|
|
599
|
+
| `formattedMin` | `string` |
|
|
600
|
+
| `formattedValue` | `string` |
|
|
601
|
+
| `isClamped` | `boolean` |
|
|
602
|
+
| `max` | `number` |
|
|
603
|
+
| `min` | `number` |
|
|
604
|
+
| `ratio` | `number` |
|
|
605
|
+
| `seriesId` | `string` |
|
|
606
|
+
| `seriesName` | `string` |
|
|
607
|
+
| `value` | `number` |
|
|
608
|
+
|
|
609
|
+
### Types
|
|
610
|
+
|
|
611
|
+
#### `ChartGaugeCenterTemplateContext`
|
|
612
|
+
|
|
613
|
+
| Name | Type |
|
|
614
|
+
| --- | --- |
|
|
615
|
+
| `$implicit` (read-only) | `number` |
|
|
616
|
+
| `formattedMax` (read-only) | `string` |
|
|
617
|
+
| `formattedMin` (read-only) | `string` |
|
|
618
|
+
| `formattedValue` (read-only) | `string` |
|
|
619
|
+
| `isClamped` (read-only) | `boolean` |
|
|
620
|
+
| `max` (read-only) | `number` |
|
|
621
|
+
| `min` (read-only) | `number` |
|
|
622
|
+
| `ratio` (read-only) | `number` |
|
|
623
|
+
| `seriesId` (read-only) | `string` |
|
|
624
|
+
| `seriesName` (read-only) | `string` |
|
|
625
|
+
| `value` (read-only) | `number` |
|
|
626
|
+
|
|
627
|
+
#### `ChartRadialDatumVisibilityEvent`
|
|
628
|
+
|
|
629
|
+
| Name | Type |
|
|
630
|
+
| --- | --- |
|
|
631
|
+
| `category` (read-only) | `unknown` |
|
|
632
|
+
| `dataIndex` (read-only) | `number` |
|
|
633
|
+
| `datum` (read-only) | `unknown` |
|
|
634
|
+
| `itemId` (read-only) | `string` |
|
|
635
|
+
| `seriesId` (read-only) | `string` |
|
|
636
|
+
| `seriesName` (read-only) | `string` |
|
|
637
|
+
| `seriesType` (read-only) | `"radialBar" \| "rose"` |
|
|
638
|
+
| `visible` (read-only) | `boolean` |
|
|
639
|
+
|
|
640
|
+
#### `ChartGaugeIndicator`
|
|
641
|
+
|
|
642
|
+
```typescript
|
|
643
|
+
type ChartGaugeIndicator = "arc" | "both" | "needle";
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
#### `ChartRadialArcFillMode`
|
|
647
|
+
|
|
648
|
+
```typescript
|
|
649
|
+
type ChartRadialArcFillMode = "gradient" | "solid";
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
#### `ChartRoseScaleMode`
|
|
653
|
+
|
|
654
|
+
```typescript
|
|
655
|
+
type ChartRoseScaleMode = "area" | "radius";
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
**Documented elsewhere:** [`ChartField`](chart.md), [`ChartValueFormatter`](chart.md)
|