@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.
@@ -0,0 +1,518 @@
1
+ # Radar & Polar
2
+
3
+ > Radar and polar series on angular and radial axes, for comparing metrics or directions.
4
+
5
+ Entry point: `@nanahoshi/mona-ui/chart`
6
+
7
+ **Selectors:** `mona-radar-series`, `mona-polar-series`, `mona-chart-angular-axis`, `mona-chart-radial-axis`
8
+
9
+ Radar and polar series place values around a circle: the angle says what a value belongs to, and the distance from the center says how large it is. A radar series draws one spoke per category and joins the values into a closed shape, for comparing a profile of metrics. A polar series takes a numeric angle in degrees, for data that has a direction, such as wind or a signal pattern. Both go inside a `mona-chart`, on an angular and a radial axis.
10
+
11
+ ## Overview
12
+
13
+ Pick the series by what the angle means.
14
+
15
+ | Series | Use it for | Reads |
16
+ | :--- | :--- | :--- |
17
+ | `mona-radar-series` | A profile of the same metrics for one or more items, such as review scores, skills or the health of a product. Each category gets a spoke, evenly spaced. | `categoryField`, `field` |
18
+ | `mona-polar-series` | Values that depend on a direction or a cycle, such as wind by bearing, an antenna's reach or activity by hour. The angle is a number of degrees. | `categoryField` (the angle), `field` |
19
+
20
+ **Use something else when:**
21
+
22
+ - The reader needs to compare exact values, or to compare items on one metric. Bars on a straight axis are easier to read, see [Bar & Waterfall](chart-bar.md).
23
+ - The categories have an order that matters more than the shape, such as months. A line keeps the order readable, see [Line & Area](chart-line-area.md).
24
+ - You want the parts of a whole. Use a pie or donut, see [Pie & Donut](chart-pie.md).
25
+ - You want each category as its own arc or wedge, sized by value. Use a radial bar or rose series, see [Radial](chart-radial.md).
26
+
27
+ A chart takes several radar series, or several polar series, but not both: a chart that mixes them draws nothing and logs a development warning. Radar and polar series don't mix with Cartesian series either. The chart, legend, tooltip and other shared parts are described on [Chart Overview](chart.md).
28
+
29
+ ## Import & Quick Start
30
+
31
+ ```typescript
32
+ import {
33
+ ChartComponent,
34
+ ChartLegendComponent,
35
+ ChartTooltipComponent,
36
+ RadarSeriesComponent
37
+ } from "@nanahoshi/mona-ui/chart";
38
+ ```
39
+
40
+ ```html
41
+ <mona-chart aria-label="Review scores" class="h-80 w-full" [data]="scores">
42
+ <mona-radar-series categoryField="skill" field="phoneA" name="Phone A" />
43
+ <mona-radar-series categoryField="skill" field="phoneB" name="Phone B" />
44
+ <mona-chart-legend />
45
+ <mona-chart-tooltip [shared]="true" />
46
+ </mona-chart>
47
+ ```
48
+
49
+ Give the chart a height. It fills its host, and a host without a height has none. The axes are optional: without `mona-chart-angular-axis` and `mona-chart-radial-axis`, the chart draws both with their defaults. Add them to change the labels, grid or scale.
50
+
51
+ ## Anatomy
52
+
53
+ | Part | Selector | Role |
54
+ | :--- | :--- | :--- |
55
+ | Radar series | `mona-radar-series` | A closed shape through one value per category. |
56
+ | Polar series | `mona-polar-series` | A line through values placed at numeric angles. |
57
+ | Angular axis | `mona-chart-angular-axis` | The spokes, the outer boundary and the labels around the edge: one per category for radar, a degree scale for polar. |
58
+ | Radial axis | `mona-chart-radial-axis` | The value scale from the center outwards: the grid rings, their labels and the line they sit on. |
59
+
60
+ Each series reads its rows from the chart's `data`, unless it has its own `data`. The chart's `xField` doesn't apply here: the angle comes from the series' `categoryField`, and the value from `field`. A field is a property name or an accessor, `(row, index) => value`.
61
+
62
+ | Input | Radar | Polar |
63
+ | :--- | :--- | :--- |
64
+ | `categoryField` | The category of a spoke. Defaults to `"category"`. | The angle in degrees. Defaults to the deprecated `angleField`, which defaults to `"angle"`. |
65
+ | `field` | The value. Defaults to `"value"`. | The value. Defaults to `"value"`. |
66
+ | `keyField` | A stable identity for each row, so animations follow the row when the data changes. | The same. |
67
+ | `showPoints` | `true` by default. | `false` by default. |
68
+
69
+ The remaining inputs, `curve`, `connectNulls`, `fillMode`, `fillOpacity`, `strokeWidth`, `pointRadius`, `color`, `name` and `valueFormatter`, are the same on both.
70
+
71
+ ### Templates
72
+
73
+ `ng-template[monaChartAxisLabelTemplate]` works inside both axes. Its context is a `ChartAxisLabelTemplateContext`: `axis` is `"angular"` or `"radial"`, `index` is the label's position, and `$implicit` and `value` are the raw value, not the formatted text. That's the category for a radar spoke, the number of degrees for a polar tick, and the number for a ring. Apply the formatting you need inside the template.
74
+
75
+ The chart, legend and tooltip templates are described on [Chart Overview](chart.md). These series have no data labels.
76
+
77
+ ## Examples
78
+
79
+ ### Comparing profiles
80
+
81
+ Two radar series read the same rows, each with its own `field`. A solid fill shows the area each one covers, and fixing the radial axis to `0`–`100` keeps the scale honest when the scores are all high. `valueFormatter` adds the scale to the tooltip.
82
+
83
+ `compare-example.component.ts`
84
+
85
+ ```typescript
86
+ import { Component } from "@angular/core";
87
+ import {
88
+ ChartComponent,
89
+ ChartLegendComponent,
90
+ ChartRadialAxisComponent,
91
+ ChartTooltipComponent,
92
+ RadarSeriesComponent
93
+ } from "@nanahoshi/mona-ui/chart";
94
+ import type { ChartValueFormatter } from "@nanahoshi/mona-ui/chart";
95
+
96
+ @Component({
97
+ selector: "app-chart-radar-compare-example",
98
+ imports: [
99
+ ChartComponent,
100
+ ChartLegendComponent,
101
+ ChartRadialAxisComponent,
102
+ ChartTooltipComponent,
103
+ RadarSeriesComponent
104
+ ],
105
+ templateUrl: "./compare-example.component.html"
106
+ })
107
+ export class ChartRadarCompareExampleComponent {
108
+ protected readonly scores = [
109
+ { alpha: 86, beta: 72, skill: "Speed" },
110
+ { alpha: 64, beta: 88, skill: "Battery" },
111
+ { alpha: 78, beta: 81, skill: "Camera" },
112
+ { alpha: 92, beta: 70, skill: "Display" },
113
+ { alpha: 58, beta: 76, skill: "Price" },
114
+ { alpha: 74, beta: 69, skill: "Durability" }
115
+ ];
116
+ protected readonly outOf100: ChartValueFormatter = value => `${value} / 100`;
117
+ }
118
+ ```
119
+
120
+ `compare-example.component.html`
121
+
122
+ ```html
123
+ <mona-chart aria-label="Phone review scores" class="h-80 w-full" [data]="scores">
124
+ <mona-chart-radial-axis [max]="100" [min]="0" />
125
+ <mona-radar-series
126
+ categoryField="skill"
127
+ field="alpha"
128
+ fillMode="solid"
129
+ name="Phone A"
130
+ [valueFormatter]="outOf100" />
131
+ <mona-radar-series categoryField="skill" field="beta" fillMode="solid" name="Phone B" [valueFormatter]="outOf100" />
132
+ <mona-chart-legend />
133
+ <mona-chart-tooltip [shared]="true" />
134
+ </mona-chart>
135
+ ```
136
+
137
+ ### Wind rose
138
+
139
+ A polar series places each row at its `categoryField` angle, with `0` at the top and angles going clockwise. The angular axis `formatter` turns the degrees into compass points, both on the axis and in the tooltip, and `tickCount` sets how many there are.
140
+
141
+ `wind-rose-example.component.ts`
142
+
143
+ ```typescript
144
+ import { Component } from "@angular/core";
145
+ import {
146
+ ChartAngularAxisComponent,
147
+ ChartComponent,
148
+ ChartRadialAxisComponent,
149
+ ChartTooltipComponent,
150
+ PolarSeriesComponent
151
+ } from "@nanahoshi/mona-ui/chart";
152
+ import type { ChartAxisFormatter, ChartValueFormatter } from "@nanahoshi/mona-ui/chart";
153
+
154
+ const COMPASS = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"];
155
+
156
+ @Component({
157
+ selector: "app-chart-radar-wind-rose-example",
158
+ imports: [
159
+ ChartAngularAxisComponent,
160
+ ChartComponent,
161
+ ChartRadialAxisComponent,
162
+ ChartTooltipComponent,
163
+ PolarSeriesComponent
164
+ ],
165
+ templateUrl: "./wind-rose-example.component.html"
166
+ })
167
+ export class ChartRadarWindRoseExampleComponent {
168
+ /** The average wind every 45 degrees, from north, clockwise. */
169
+ protected readonly wind = [
170
+ { bearing: 0, speed: 9 },
171
+ { bearing: 45, speed: 7 },
172
+ { bearing: 90, speed: 6 },
173
+ { bearing: 135, speed: 8 },
174
+ { bearing: 180, speed: 13 },
175
+ { bearing: 225, speed: 19 },
176
+ { bearing: 270, speed: 22 },
177
+ { bearing: 315, speed: 15 }
178
+ ];
179
+ protected readonly compass: ChartAxisFormatter = value => COMPASS[Math.round(Number(value) / 45) % COMPASS.length];
180
+ protected readonly kmh: ChartValueFormatter = value => `${value} km/h`;
181
+ }
182
+ ```
183
+
184
+ `wind-rose-example.component.html`
185
+
186
+ ```html
187
+ <mona-chart aria-label="Average wind by direction" class="h-80 w-full" [data]="wind">
188
+ <mona-chart-angular-axis [formatter]="compass" [tickCount]="8" />
189
+ <mona-chart-radial-axis [labelAngle]="45" />
190
+ <mona-polar-series
191
+ categoryField="bearing"
192
+ curve="smooth"
193
+ field="speed"
194
+ fillMode="gradient"
195
+ name="Average wind"
196
+ [showPoints]="true"
197
+ [valueFormatter]="kmh" />
198
+ <mona-chart-tooltip />
199
+ </mona-chart>
200
+ ```
201
+
202
+ ### Axis labels
203
+
204
+ The angular axis label template adds a number to each spoke, and `rotation` turns the whole chart. On the radial axis, `formatter` adds a percent sign, and `gridShape="circle"` draws round rings instead of the polygons a radar chart uses by default.
205
+
206
+ `axis-labels-example.component.ts`
207
+
208
+ ```typescript
209
+ import { Component } from "@angular/core";
210
+ import {
211
+ ChartAngularAxisComponent,
212
+ ChartAxisLabelTemplateDirective,
213
+ ChartComponent,
214
+ ChartRadialAxisComponent,
215
+ ChartTooltipComponent,
216
+ RadarSeriesComponent
217
+ } from "@nanahoshi/mona-ui/chart";
218
+ import type { ChartAxisFormatter } from "@nanahoshi/mona-ui/chart";
219
+
220
+ @Component({
221
+ selector: "app-chart-radar-axis-labels-example",
222
+ imports: [
223
+ ChartAngularAxisComponent,
224
+ ChartAxisLabelTemplateDirective,
225
+ ChartComponent,
226
+ ChartRadialAxisComponent,
227
+ ChartTooltipComponent,
228
+ RadarSeriesComponent
229
+ ],
230
+ templateUrl: "./axis-labels-example.component.html"
231
+ })
232
+ export class ChartRadarAxisLabelsExampleComponent {
233
+ protected readonly coverage = [
234
+ { area: "Components", value: 92 },
235
+ { area: "Directives", value: 81 },
236
+ { area: "Services", value: 74 },
237
+ { area: "Pipes", value: 96 },
238
+ { area: "Utilities", value: 67 }
239
+ ];
240
+ protected readonly percent: ChartAxisFormatter = value => `${value}%`;
241
+ }
242
+ ```
243
+
244
+ `axis-labels-example.component.html`
245
+
246
+ ```html
247
+ <mona-chart aria-label="Test coverage by area" class="h-80 w-full" [data]="coverage">
248
+ <mona-chart-angular-axis [labelOffset]="14" [rotation]="36">
249
+ <ng-template monaChartAxisLabelTemplate let-value let-index="index">
250
+ <span class="font-medium">{{ index + 1 }}. {{ value }}</span>
251
+ </ng-template>
252
+ </mona-chart-angular-axis>
253
+ <mona-chart-radial-axis gridShape="circle" [formatter]="percent" [max]="100" [min]="0" [tickCount]="4" />
254
+ <mona-radar-series categoryField="area" curve="smooth" fillMode="gradient" name="Coverage" />
255
+ <mona-chart-tooltip />
256
+ </mona-chart>
257
+ ```
258
+
259
+ ## Appearance & Styling
260
+
261
+ ### Series
262
+
263
+ | Input | Values | Effect |
264
+ | :--- | :--- | :--- |
265
+ | `fillMode` | `"none"`, `"solid"`, `"gradient"` | `"solid"` fills evenly. `"gradient"` is faint at the center and reaches `fillOpacity` at the series' farthest point. A radar series fills its closed shape, and a polar series fills from the center out to its line. |
266
+ | `fillOpacity` | A number from `0` to `1` | The opacity of a solid fill, and the outer opacity of a gradient. Defaults to `0.18`. |
267
+ | `curve` | `"linear"`, `"smooth"` | `"smooth"` draws a curve through the points. It needs at least three, and draws straight lines below that. A smooth curve can bulge past a point, so keep `"linear"` when the exact vertices matter. |
268
+ | `strokeWidth` | Pixels | The width of the outline. Defaults to `2`. `0` leaves only the fill and the points. |
269
+ | `showPoints`, `pointRadius` | `boolean`, pixels | Markers at each value. The radius defaults to `3.5` on radar and `3` on polar. |
270
+ | `color` | Any CSS color or `var()` | Replaces the palette color for the line, fill and points. By default series take `--color-chart-1` to `--color-chart-5` in order. |
271
+
272
+ When several radar series overlap, keep the fill light, or fill only one of them and leave the others as outlines.
273
+
274
+ ### Angular axis
275
+
276
+ | Input | Default | Effect |
277
+ | :--- | :--- | :--- |
278
+ | `rotation` | `0` | Turns every spoke and label clockwise by this many degrees. `0` puts the first category, or 0°, at the top. |
279
+ | `tickCount` | `12` | The number of degree ticks on a polar chart, from `2` to `72`, evenly spaced. Above 12, every second label is shown, and above 24, every fourth, while every spoke is still drawn. A radar chart has one spoke per category and ignores it. |
280
+ | `formatter` | Category text, or degrees in the locale | Formats the labels, and the category or angle in the tooltip and announcements. It receives the raw value and its index. |
281
+ | `labelOffset` | `10` | Pixels between the outer edge and the labels. |
282
+ | `gridLines` | `true` | The spokes from the center to the edge. |
283
+ | `axisLine` | `true` | The outer boundary: a polygon or a circle, matching the radial axis `gridShape`. |
284
+ | `labels` | `true` | The labels around the edge. |
285
+ | `visible` | `true` | `false` hides the spokes, the boundary and the labels. |
286
+
287
+ ### Radial axis
288
+
289
+ | Input | Default | Effect |
290
+ | :--- | :--- | :--- |
291
+ | `gridShape` | `"auto"` | `"polygon"` joins the spokes into rings with corners, `"circle"` draws round rings. `"auto"` uses polygons for radar and circles for polar. A polygon needs at least three spokes, and is drawn as a circle with fewer. On a polar chart the corners are at the degree ticks. |
292
+ | `min`, `max` | From the data | Fix the ends of the scale. See Scale under Behavior. |
293
+ | `nice` | `true` | Rounds the ends the data sets to tidy values. An end you set with `min` or `max` stays as set. |
294
+ | `tickCount` | `5` | The number of rings to aim for, from `1` to `20`. The actual number follows round values. |
295
+ | `labelAngle` | `0` | The direction of the ring labels and the axis line, in degrees clockwise from the top. It doesn't follow the angular `rotation`. |
296
+ | `labelOffset` | `6` | Pixels between a ring and its label. |
297
+ | `formatter` | Numbers in the locale | Formats the ring labels. The tooltip keeps the series' `valueFormatter`. |
298
+ | `gridLines` | `true` | The rings. |
299
+ | `axisLine` | `true` | The line from the center to the edge, at `labelAngle`. |
300
+ | `labels` | `true` | The ring labels. |
301
+ | `visible` | `true` | `false` hides the rings, their labels and the axis line. |
302
+
303
+ ## Theming
304
+
305
+ The series read these custom properties from their own host element, so set them with `class`, for example `class="[--mona-chart-radial-stroke-width:3px]"`. An input set on the series wins over them.
306
+
307
+ | Property | Default | Sets |
308
+ | :--- | :--- | :--- |
309
+ | `--mona-chart-radial-stroke-width` | `2` | The outline width. |
310
+ | `--mona-chart-radial-point-radius` | `3.5` radar, `3` polar | The marker radius. |
311
+ | `--mona-chart-radial-fill-opacity` | `0.18` | The fill opacity. |
312
+
313
+ A series also takes its color from a `text-*` class on its host, as in `class="text-chart-3"`, when `color` isn't set. The rings and spokes take `--mona-chart-grid-color`, the zero ring `--mona-chart-zero-line-color`, and the outer boundary and radial axis line `--mona-chart-axis-line-color`. Without them, they fall back to the theme's border and muted colors.
314
+
315
+ ## Behavior
316
+
317
+ ### Categories on a radar chart
318
+
319
+ - The spokes are the categories of all visible series together, in the order they first appear in the data. A series that lacks a category has a gap at that spoke.
320
+ - Hiding a series in the legend removes the categories only it has, and the radial scale is worked out again from the visible series.
321
+ - A row whose category is empty, `null` or `undefined` gets a generated name, "Category" followed by the row's position.
322
+ - When a series has the same category twice, the first row with a number wins, and a development warning names the category.
323
+
324
+ ### Angles on a polar chart
325
+
326
+ - Angles are degrees, clockwise from the top, and are reduced to `0`–`360`: `-90` and `270` are the same angle, and so are `360` and `0`.
327
+ - Each series is drawn in order of angle, whatever the order of the rows, and its line runs from the smallest angle to the largest without joining back to the first point. A row at `360` doesn't close the loop, since it is the same angle as `0`.
328
+ - A row whose angle isn't a number is skipped. When a series has the same angle twice, the first row with a number wins, and a development warning names the angle.
329
+ - The deprecated `angleField` still works, but `categoryField` wins when both are set.
330
+
331
+ ### Missing values
332
+
333
+ A row whose value is `null`, `undefined` or not a number leaves a gap.
334
+
335
+ - On a radar series a gap breaks the outline, so the shape is no longer closed and isn't filled. With `connectNulls`, the outline goes straight from one value to the next and the shape closes again, as long as at least three values are left.
336
+ - On a polar series a gap breaks the line and the fill. With `connectNulls`, they go straight across it.
337
+ - A radar fill needs at least three values, a polar fill at least two, and an outline at least two. A single value still shows as a point when `showPoints` is on.
338
+
339
+ ### Scale
340
+
341
+ - The radial scale always includes zero, so a value's distance from the center stays proportional to it. When the data has negative values, the center is the lowest value, and the zero ring is drawn darker.
342
+ - With `min` or `max`, a value outside the range is drawn at the center or at the edge rather than beyond it.
343
+ - Every series in the chart shares one scale, so put metrics with very different ranges on a common scale, such as a score out of 100, before comparing them on a radar chart.
344
+
345
+ ### Tooltip
346
+
347
+ - Without `shared`, the tooltip shows the point nearest the pointer, within a few pixels of it.
348
+ - With `shared` on a radar chart, pointing anywhere in the wedge around a spoke shows every series at that spoke.
349
+ - With `shared` on a polar chart, the tooltip shows every series with a value at the nearest angle. Series only share a tooltip where their angles match exactly, so give them the same angles when you want to compare them.
350
+ - The pointer near the center, or far outside the edge, shows nothing.
351
+
352
+ ### Value formatting
353
+
354
+ `valueFormatter` formats a series' values in its tooltip and screen reader announcements, and receives the value and the row's index. It leaves the ring labels alone: format those with the radial axis `formatter`. Without either, numbers follow the library locale.
355
+
356
+ ### Not in polar charts
357
+
358
+ Panning and zooming (`navigation` and the viewport), downsampling, the crosshair and cross-chart synchronization are for Cartesian charts. A `mona-chart-x-axis` or `mona-chart-y-axis` inside a radar or polar chart is ignored, with a development warning.
359
+
360
+ ### Two-way binding
361
+
362
+ `[(visible)]` holds whether the series is shown. The legend sets it when the user toggles the series.
363
+
364
+ ## Accessibility
365
+
366
+ The chart is the focusable element, and these series add no roles of their own. Each point is announced with its series name, its category or angle, and its formatted value. The chart's description names the series and gives each one's lowest and highest value, and with `dataTable` the hidden table has a row per spoke or angle and a column per series. The axis labels are `aria-hidden`, so what a reader hears comes from the series and the formatters.
367
+
368
+ - **Name each series** with `name`, and use `valueFormatter` to add a unit or a scale, such as "/ 100" or "km/h".
369
+ - **Format angles for people.** On a polar chart, an angular `formatter` that turns degrees into compass points or hours also changes what's announced.
370
+ - **Don't rely on color alone.** Keep the legend, and use fills sparingly so overlapping series stay distinguishable. Points help in forced colors and print.
371
+ - **Keep the number of spokes readable.** Many categories crowd the labels around the edge. Above a dozen, bars are often clearer.
372
+
373
+ ### Keyboard Navigation
374
+
375
+ | Key | Action |
376
+ | :--- | :--- |
377
+ | `ArrowRight` / `ArrowLeft` | Move to the next or previous spoke or angle, going round: after the last comes the first. |
378
+ | `ArrowUp` / `ArrowDown` | Move to another series at the same spoke or angle. |
379
+ | `Home` / `End` | Move to the first or last spoke or angle. |
380
+
381
+ On a polar chart, a series with values at different angles from the others is reached by moving to its angles. The rest of the keys, including selection, are listed on [Chart Overview](chart.md).
382
+
383
+ ## API
384
+
385
+ Everything below is imported from `@nanahoshi/mona-ui/chart`.
386
+
387
+ ### `PolarSeriesComponent`
388
+
389
+ Renders continuous polar series mapping magnitude over continuous degree angles (0° to 360°).
390
+
391
+ **Selector:** `mona-polar-series`
392
+
393
+ #### Inputs
394
+
395
+ | Name | Type | Default | Description |
396
+ | --- | --- | --- | --- |
397
+ | `angleField` | `ChartField` | `"angle"` | **Deprecated.** Use `categoryField`, as on the other series. Property key or accessor function extracting the degree angle (0° to 360°) for each data item. |
398
+ | `categoryField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting the angle for each point. Takes precedence over `angleField`. |
399
+ | `class` | `string` | `""` | Additional CSS classes applied to the series host element. |
400
+ | `color` | `string` | `""` | Explicit stroke and marker color override for the series. |
401
+ | `connectNulls` | `boolean` | `false` | Whether to connect points across null or invalid values without gaps. |
402
+ | `curve` | `ChartRadialCurve` | `"linear"` | Radial curve interpolation style (`"linear"` or `"smooth"`). |
403
+ | `data` | `readonly unknown[] \| undefined` | `undefined` | Series-specific dataset overriding the root chart data. |
404
+ | `field` | `ChartField` | `"value"` | Property key or accessor function extracting the numeric radial distance/value for each data item. |
405
+ | `fillMode` | `ChartRadialFillMode` | `"none"` | Fill mode applied to the area between the data curve and the chart center pole (`"none"`, `"solid"`, or `"gradient"`). |
406
+ | `fillOpacity` | `number \| undefined` | `undefined` | Opacity ratio for polar area fills (0 to 1). |
407
+ | `keyField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting a stable datum identity across updates. |
408
+ | `name` | `string` | `"Polar"` | Series name displayed in legends, tooltips, and accessibility regions. |
409
+ | `pointRadius` | `number \| undefined` | `undefined` | Radius in pixels for point markers. |
410
+ | `showPoints` | `boolean` | `false` | Whether to draw point markers at each valid angular coordinate. |
411
+ | `strokeWidth` | `number \| undefined` | `undefined` | Stroke width in pixels for the outer data line. |
412
+ | `valueFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Custom formatter function for numeric values in tooltips and live region announcements. |
413
+ | `visible` (two-way) | `boolean` | `true` | Whether the polar series is visible on the chart. |
414
+
415
+ #### Outputs
416
+
417
+ | Name | Type | Description |
418
+ | --- | --- | --- |
419
+ | `visibleChange` | `boolean` | Emitted when `visible` changes. |
420
+
421
+ ### `RadarSeriesComponent`
422
+
423
+ Renders closed polygonal radar series comparing categorical metrics across angular spokes.
424
+
425
+ **Selector:** `mona-radar-series`
426
+
427
+ #### Inputs
428
+
429
+ | Name | Type | Default | Description |
430
+ | --- | --- | --- | --- |
431
+ | `categoryField` | `ChartField` | `"category"` | Property key or accessor function extracting the angular spoke category for each data item. |
432
+ | `class` | `string` | `""` | Additional CSS classes applied to the series host element. |
433
+ | `color` | `string` | `""` | Explicit stroke and marker color override for the series. |
434
+ | `connectNulls` | `boolean` | `false` | Whether to connect adjacent valid category points across missing or null categories. |
435
+ | `curve` | `ChartRadialCurve` | `"linear"` | Radial interpolation curve (`"linear"` or `"smooth"`). |
436
+ | `data` | `readonly unknown[] \| undefined` | `undefined` | Series-specific dataset overriding the root chart data. |
437
+ | `field` | `ChartField` | `"value"` | Property key or accessor function extracting the numeric radial value for each data item. |
438
+ | `fillMode` | `ChartRadialFillMode` | `"none"` | Fill mode applied to the radar polygon (`"none"`, `"solid"`, or `"gradient"`). |
439
+ | `fillOpacity` | `number \| undefined` | `undefined` | Opacity ratio for polygon interior fills (0 to 1). |
440
+ | `keyField` | `ChartField \| undefined` | `undefined` | Property key or accessor extracting a stable datum identity across updates. |
441
+ | `name` | `string` | `"Radar"` | Series name displayed in legends, tooltips, and accessibility regions. |
442
+ | `pointRadius` | `number \| undefined` | `undefined` | Radius in pixels for point markers rendered at category vertices. |
443
+ | `showPoints` | `boolean` | `true` | Whether to draw point markers at each category vertex along the radar polygon. |
444
+ | `strokeWidth` | `number \| undefined` | `undefined` | Stroke width in pixels for the outer polygon boundary. |
445
+ | `valueFormatter` | `ChartValueFormatter \| undefined` | `undefined` | Custom formatter function for numeric values in tooltips and live region announcements. |
446
+ | `visible` (two-way) | `boolean` | `true` | Whether the radar series is visible on the chart. |
447
+
448
+ #### Outputs
449
+
450
+ | Name | Type | Description |
451
+ | --- | --- | --- |
452
+ | `visibleChange` | `boolean` | Emitted when `visible` changes. |
453
+
454
+ ### `ChartRadialAxisComponent`
455
+
456
+ Configures the radial numeric dimension (distance from pole) in Polar Axis charts.
457
+
458
+ **Selector:** `mona-chart-radial-axis`
459
+
460
+ #### Inputs
461
+
462
+ | Name | Type | Default | Description |
463
+ | --- | --- | --- | --- |
464
+ | `axisLine` | `boolean` | `true` | Whether the pole-to-boundary axis line along the label angle is rendered. |
465
+ | `class` | `string` | `""` | Additional CSS classes applied to the axis host element. |
466
+ | `formatter` | `ChartAxisFormatter \| undefined` | `undefined` | Custom formatter function for radial tick labels. |
467
+ | `gridLines` | `boolean` | `true` | Whether concentric radial grid rings or polygons are visible. |
468
+ | `gridShape` | `ChartRadialGridShape` | `"auto"` | Geometry of radial grid lines (`"auto"`, `"circle"`, or `"polygon"`). |
469
+ | `labelAngle` | `number` | `0` | Angle in degrees at which radial tick labels are positioned (0 = 12 o'clock). |
470
+ | `labelOffset` | `number` | `6` | Pixel offset between radial tick markers and their labels. |
471
+ | `labels` | `boolean` | `true` | Whether radial tick numeric labels are rendered. |
472
+ | `max` | `number \| undefined` | `undefined` | Explicit upper bound for the radial scale range. |
473
+ | `min` | `number \| undefined` | `undefined` | Explicit lower bound for the radial scale range. |
474
+ | `nice` | `boolean` | `true` | Automatically extends the radial domain to round, pleasant intervals. |
475
+ | `tickCount` | `number \| undefined` | `5` | Suggested number of concentric radial intervals. |
476
+ | `visible` | `boolean` | `true` | Whether the radial axis, grid rings, and tick labels are visible. |
477
+
478
+ ### `ChartAngularAxisComponent`
479
+
480
+ Configures the angular dimension (spokes and continuous degrees) in Polar Axis charts.
481
+
482
+ **Selector:** `mona-chart-angular-axis`
483
+
484
+ #### Inputs
485
+
486
+ | Name | Type | Default | Description |
487
+ | --- | --- | --- | --- |
488
+ | `axisLine` | `boolean` | `true` | Whether the outer circular or polygonal baseline axis boundary line is rendered. |
489
+ | `class` | `string` | `""` | Additional CSS classes applied to the axis host element. |
490
+ | `formatter` | `ChartAxisFormatter \| undefined` | `undefined` | Custom formatter function for angular tick and spoke labels. |
491
+ | `gridLines` | `boolean` | `true` | Whether radial angular spokes connecting the pole to outer categories/ticks are visible. |
492
+ | `labelOffset` | `number` | `10` | Radial offset in pixels between the outer chart boundary and the angular labels. |
493
+ | `labels` | `boolean` | `true` | Whether angular category or degree labels are rendered. |
494
+ | `rotation` | `number` | `0` | Angular rotation offset in degrees applied clockwise to all spoke positions. |
495
+ | `tickCount` | `number \| undefined` | `undefined` | Suggested number of degree ticks for polar charts (defaults to 12). Radar tick count is derived from categories. |
496
+ | `visible` | `boolean` | `true` | Whether the angular axis, spokes, and labels are visible. |
497
+
498
+ ### Types
499
+
500
+ #### `ChartRadialCurve`
501
+
502
+ ```typescript
503
+ type ChartRadialCurve = "linear" | "smooth";
504
+ ```
505
+
506
+ #### `ChartRadialFillMode`
507
+
508
+ ```typescript
509
+ type ChartRadialFillMode = "gradient" | "none" | "solid";
510
+ ```
511
+
512
+ #### `ChartRadialGridShape`
513
+
514
+ ```typescript
515
+ type ChartRadialGridShape = "auto" | "circle" | "polygon";
516
+ ```
517
+
518
+ **Documented elsewhere:** [`ChartAxisFormatter`](chart.md), [`ChartField`](chart.md), [`ChartValueFormatter`](chart.md)