ngwr 16.3.0 → 16.5.0
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/carousel/styles/_index.scss +53 -1
- package/charts/bar-chart/styles/_index.scss +494 -305
- package/charts/boxplot-chart/styles/_index.scss +114 -48
- package/charts/bullet-chart/styles/_index.scss +113 -42
- package/charts/calendar-heatmap/styles/_index.scss +111 -20
- package/charts/candlestick-chart/styles/_index.scss +61 -26
- package/charts/chart-legend/styles/_index.scss +119 -1
- package/charts/core/styles/_index.scss +201 -5
- package/charts/donut-chart/styles/_index.scss +76 -21
- package/charts/funnel-chart/styles/_index.scss +66 -38
- package/charts/gauge/styles/_index.scss +12 -1
- package/charts/heatmap-chart/styles/_index.scss +90 -53
- package/charts/line-chart/styles/_index.scss +143 -139
- package/charts/meter-group/styles/_index.scss +87 -25
- package/charts/radar-chart/styles/_index.scss +82 -40
- package/charts/scatter-chart/styles/_index.scss +117 -44
- package/charts/sparkline/styles/_index.scss +7 -1
- package/charts/treemap-chart/styles/_index.scss +94 -42
- package/charts/waterfall-chart/styles/_index.scss +150 -87
- package/color-picker/styles/_index.scss +7 -3
- package/copy-value/styles/_index.scss +21 -2
- package/date-stamp/styles/_index.scss +2 -1
- package/dialog/styles/_index.scss +6 -0
- package/drawer/styles/_index.scss +5 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +27 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +86 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +56 -25
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +299 -18
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +98 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +44 -4
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +60 -17
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
- package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +38 -2
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +56 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +13 -5
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +49 -6
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +7 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +27 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +643 -14
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +13 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +13 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +13 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +13 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +13 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +13 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +13 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +13 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +13 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +13 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +13 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +13 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +13 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +13 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +13 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +13 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +13 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +13 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +13 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +13 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +22 -5
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +41 -5
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +67 -12
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +3 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +100 -3
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +71 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +173 -11
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +25 -16
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +52 -8
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +64 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +16 -9
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +13 -4
- package/i18n/cs.json +13 -4
- package/i18n/de.json +13 -4
- package/i18n/en.json +13 -4
- package/i18n/es.json +13 -4
- package/i18n/fr.json +13 -4
- package/i18n/he.json +13 -4
- package/i18n/hi.json +13 -4
- package/i18n/id.json +13 -4
- package/i18n/it.json +13 -4
- package/i18n/ja.json +13 -4
- package/i18n/ko.json +13 -4
- package/i18n/nl.json +13 -4
- package/i18n/pl.json +13 -4
- package/i18n/pt.json +13 -4
- package/i18n/ru.json +13 -4
- package/i18n/sv.json +13 -4
- package/i18n/tr.json +13 -4
- package/i18n/uk.json +13 -4
- package/i18n/vi.json +13 -4
- package/i18n/zh-TW.json +13 -4
- package/i18n/zh.json +13 -4
- package/llms-full.txt +12 -12
- package/llms.txt +64 -27
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +24 -13
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/symbol-map.json +2 -0
- package/select/styles/_index.scss +13 -0
- package/skills/ngwr/SKILL.md +30 -3
- package/skills/ngwr/references/catalog.md +2 -2
- package/table/styles/_index.scss +24 -0
- package/theme/styles/_focus.scss +11 -1
- package/tour/styles/_index.scss +6 -0
- package/types/ngwr-carousel-testing.d.ts +29 -6
- package/types/ngwr-carousel.d.ts +52 -5
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +29 -7
- package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
- package/types/ngwr-charts-bar-chart.d.ts +220 -48
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
- package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
- package/types/ngwr-charts-bullet-chart.d.ts +72 -12
- package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
- package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
- package/types/ngwr-charts-chart-legend.d.ts +142 -5
- package/types/ngwr-charts-core.d.ts +259 -21
- package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -16
- package/types/ngwr-charts-funnel-chart.d.ts +62 -6
- package/types/ngwr-charts-gauge-testing.d.ts +5 -1
- package/types/ngwr-charts-gauge.d.ts +72 -10
- package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
- package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
- package/types/ngwr-charts-line-chart.d.ts +215 -86
- package/types/ngwr-charts-meter-group.d.ts +96 -7
- package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
- package/types/ngwr-charts-radar-chart.d.ts +148 -28
- package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
- package/types/ngwr-charts-scatter-chart.d.ts +188 -18
- package/types/ngwr-charts-sparkline.d.ts +26 -4
- package/types/ngwr-charts-treemap-chart.d.ts +121 -23
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
- package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
- package/types/ngwr-color-picker.d.ts +27 -0
- package/types/ngwr-context-menu-testing.d.ts +10 -9
- package/types/ngwr-context-menu.d.ts +19 -0
- package/types/ngwr-copy-value.d.ts +8 -0
- package/types/ngwr-date-picker.d.ts +34 -2
- package/types/ngwr-dialog.d.ts +30 -10
- package/types/ngwr-drawer.d.ts +32 -1
- package/types/ngwr-dropdown-testing.d.ts +8 -5
- package/types/ngwr-dropdown.d.ts +31 -6
- package/types/ngwr-file-upload.d.ts +8 -2
- package/types/ngwr-graph-testing.d.ts +28 -0
- package/types/ngwr-graph.d.ts +263 -91
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-overlay.d.ts +16 -1
- package/types/ngwr-popconfirm-testing.d.ts +11 -2
- package/types/ngwr-popconfirm.d.ts +28 -1
- package/types/ngwr-popover.d.ts +59 -9
- package/types/ngwr-select.d.ts +37 -0
- package/types/ngwr-table-testing.d.ts +52 -1
- package/types/ngwr-table.d.ts +102 -10
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +32 -4
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +35 -2
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +14 -11
- package/window/styles/_index.scss +5 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Signal } from "@angular/core";
|
|
2
|
+
import { ElementRef, Signal } from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
*
|
|
@@ -201,6 +201,88 @@ interface WrChartNumbers<A extends readonly unknown[] = []> {
|
|
|
201
201
|
* @internal
|
|
202
202
|
*/
|
|
203
203
|
export declare function wrChartAxis(min: number, max: number, options?: WrChartAxisOptions): WrChartAxis;
|
|
204
|
+
/**
|
|
205
|
+
* What a chart shows in place of its marks.
|
|
206
|
+
*
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
type WrChartStateKind = 'empty' | 'loading' | 'error';
|
|
210
|
+
/**
|
|
211
|
+
* The state a chart is in, with the message it shows for it.
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
interface WrChartStateView {
|
|
216
|
+
readonly kind: WrChartStateKind;
|
|
217
|
+
readonly label: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The inputs a chart hands {@link useChartState}.
|
|
221
|
+
*
|
|
222
|
+
* @internal
|
|
223
|
+
*/
|
|
224
|
+
interface WrChartStateOptions {
|
|
225
|
+
/** The chart's `loading` input. */
|
|
226
|
+
readonly loading: Signal<boolean>;
|
|
227
|
+
/** The chart's `error` input. */
|
|
228
|
+
readonly error: Signal<boolean>;
|
|
229
|
+
/** Whether the chart has nothing to draw. */
|
|
230
|
+
readonly empty: Signal<boolean>;
|
|
231
|
+
/** The chart's `emptyLabel`, `loadingLabel` and `errorLabel` inputs: `null` takes the catalog's. */
|
|
232
|
+
readonly emptyLabel: Signal<string | null>;
|
|
233
|
+
readonly loadingLabel: Signal<string | null>;
|
|
234
|
+
readonly errorLabel: Signal<string | null>;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The state a chart shows instead of its marks, or `null` while it draws them: loading
|
|
238
|
+
* first, then a failed load, then no data. Each message is the chart's own `*Label`
|
|
239
|
+
* input, then the catalog's `chart.loading` / `chart.error` / `chart.empty`, then
|
|
240
|
+
* English. Call in an injection context.
|
|
241
|
+
*
|
|
242
|
+
* One rule for every chart, so a dashboard whose requests are in flight reads the same
|
|
243
|
+
* in every tile, and a chart with no data is a framed "No data" rather than a blank box
|
|
244
|
+
* of whatever height its markup collapses to.
|
|
245
|
+
*
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
248
|
+
export declare function useChartState(options: WrChartStateOptions): Signal<WrChartStateView | null>;
|
|
249
|
+
/**
|
|
250
|
+
* The message a chart shows in place of its marks, centred over the frame it keeps.
|
|
251
|
+
*
|
|
252
|
+
* A live region: `role="status"`, so a screen reader hears "Loading…" when a chart
|
|
253
|
+
* starts a request and "No data" when it comes back with none, without the chart taking
|
|
254
|
+
* focus. A failed load is `role="alert"`, which interrupts, since it is the one of the
|
|
255
|
+
* three a reader has to act on. The chart renders it inside the box its marks are drawn
|
|
256
|
+
* in, which it positions; the grid and the axis under it stay.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```html
|
|
260
|
+
* @if (state(); as shown) {
|
|
261
|
+
* <wr-chart-state [kind]="shown.kind" [label]="shown.label" />
|
|
262
|
+
* }
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* @internal
|
|
266
|
+
*/
|
|
267
|
+
export declare class WrChartState {
|
|
268
|
+
/** Which of the three states this is. */
|
|
269
|
+
readonly kind: import("@angular/core").InputSignal<WrChartStateKind>;
|
|
270
|
+
/** The message, already translated. */
|
|
271
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
272
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrChartState, never>;
|
|
273
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrChartState, "wr-chart-state", never, {
|
|
274
|
+
"kind": {
|
|
275
|
+
"alias": "kind";
|
|
276
|
+
"required": true;
|
|
277
|
+
"isSignal": true;
|
|
278
|
+
};
|
|
279
|
+
"label": {
|
|
280
|
+
"alias": "label";
|
|
281
|
+
"required": true;
|
|
282
|
+
"isSignal": true;
|
|
283
|
+
};
|
|
284
|
+
}, {}, never, never, true, never>;
|
|
285
|
+
}
|
|
204
286
|
/**
|
|
205
287
|
* The figures a chart draws, as a table that only assistive technology reaches.
|
|
206
288
|
*
|
|
@@ -251,6 +333,112 @@ export declare class WrChartTable {
|
|
|
251
333
|
};
|
|
252
334
|
}, {}, never, never, true, never>;
|
|
253
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* The box a chart measures, in px. Both are 0 until it is laid out.
|
|
338
|
+
*
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
interface WrChartSize {
|
|
342
|
+
readonly width: number;
|
|
343
|
+
readonly height: number;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Reports `element`'s content box to `listener` whenever it changes, through ONE
|
|
347
|
+
* `ResizeObserver` for every chart on the page. Returns the function that stops it.
|
|
348
|
+
*
|
|
349
|
+
* Seven charts each made an observer of their own, so a dashboard of forty tiles ran
|
|
350
|
+
* forty. An observer is built to watch many targets and delivers them in one callback
|
|
351
|
+
* per frame. One listener per element: observing an element again replaces its listener.
|
|
352
|
+
* Where there is no `ResizeObserver` (a server, an old test environment) nothing is
|
|
353
|
+
* observed and the returned function does nothing.
|
|
354
|
+
*
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
export declare function wrChartObserveSize(element: Element, listener: (size: WrChartSize) => void): () => void;
|
|
358
|
+
/**
|
|
359
|
+
* The size of the element `target` holds, as a signal that follows it: `0 × 0` until the
|
|
360
|
+
* element is rendered and laid out, and again once it is gone. On the shared observer of
|
|
361
|
+
* {@link wrChartObserveSize}. Call in an injection context.
|
|
362
|
+
*
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
365
|
+
export declare function useChartSize(target: Signal<ElementRef<Element> | Element | undefined>): Signal<WrChartSize>;
|
|
366
|
+
/**
|
|
367
|
+
* What {@link useChartHover} tells a chart.
|
|
368
|
+
*
|
|
369
|
+
* @internal
|
|
370
|
+
*/
|
|
371
|
+
interface WrChartHoverHandlers {
|
|
372
|
+
/** The pointer is over the section whose `data-wr-index` is `index`. Not repeated while it stays there. */
|
|
373
|
+
enter(index: number): void;
|
|
374
|
+
/** The pointer left the sections: for the chart's box, or for a part of it that is no section. */
|
|
375
|
+
leave(event: MouseEvent): void;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Dims every mark of `host` but the ones of series `key`, or none for `null`: the chart
|
|
379
|
+
* takes `wr-chart--dim` and the series' own marks `wr-chart-mark--on`, and the shared
|
|
380
|
+
* stylesheet fades the rest to `--wr-chart-dim`. A mark is anything carrying
|
|
381
|
+
* `data-wr-series`, a legend row included.
|
|
382
|
+
*
|
|
383
|
+
* Classes set by hand rather than bound: a binding on every mark is re-evaluated for
|
|
384
|
+
* every mark on each hover change, and this touches the marks of two series.
|
|
385
|
+
*
|
|
386
|
+
* @internal
|
|
387
|
+
*/
|
|
388
|
+
export declare function wrChartDim(host: Element, key: string | null): void;
|
|
389
|
+
/**
|
|
390
|
+
* A chart's hover, from ONE pair of listeners on its host however many sections it draws.
|
|
391
|
+
*
|
|
392
|
+
* A section is any element carrying `data-wr-index`: the listener finds the nearest one
|
|
393
|
+
* above whatever the pointer is on and reports its index, once per section entered. A
|
|
394
|
+
* listener pair on every bar was two per bar, and each one a change detection pass over
|
|
395
|
+
* the whole chart for every bar the pointer crossed; these are native listeners, so a
|
|
396
|
+
* move runs no pass at all unless the chart's own handler writes a signal.
|
|
397
|
+
*
|
|
398
|
+
* A gap the chart marks with `data-wr-hold` keeps the section and the dim as they are, so
|
|
399
|
+
* crossing from one bar to the next does not close and reopen the tooltip; a section in
|
|
400
|
+
* such an area takes `wr-chart-section--on`, so a band the chart paints on it stays too.
|
|
401
|
+
*
|
|
402
|
+
* It also drives the shared hover-dim: the nearest element carrying `data-wr-series`
|
|
403
|
+
* names the series under the pointer, and {@link wrChartDim} fades the rest. Legend rows
|
|
404
|
+
* carry the attribute too, so hovering a row dims the chart the same way.
|
|
405
|
+
*
|
|
406
|
+
* Registered after the first render, in the browser only. Call in an injection context.
|
|
407
|
+
*
|
|
408
|
+
* @internal
|
|
409
|
+
*/
|
|
410
|
+
export declare function useChartHover(handlers: WrChartHoverHandlers): void;
|
|
411
|
+
/**
|
|
412
|
+
* @license
|
|
413
|
+
*
|
|
414
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
415
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
416
|
+
*/
|
|
417
|
+
/**
|
|
418
|
+
* The `limit` longest of `labels`, each once, longest first: the strings worth measuring.
|
|
419
|
+
*
|
|
420
|
+
* A chart sizes a gutter or keeps room past a bar from a hidden copy of the text that goes
|
|
421
|
+
* there. Copying every label made ten thousand hidden spans for ten thousand bars, to learn
|
|
422
|
+
* the width of one. The widest label is almost always among the longest few by character
|
|
423
|
+
* count - a proportional font can put `1,111` under `999`, which is why this returns a few
|
|
424
|
+
* and not one - so a chart renders these and reads the widest.
|
|
425
|
+
*
|
|
426
|
+
* @internal
|
|
427
|
+
*/
|
|
428
|
+
export declare function wrChartLongest(labels: readonly string[], limit?: number): string[];
|
|
429
|
+
/**
|
|
430
|
+
* How many categories each printed label stands for, so no two labels along an axis run
|
|
431
|
+
* into each other: 1 while every label fits its own band, 2 to print every second one,
|
|
432
|
+
* and so on.
|
|
433
|
+
*
|
|
434
|
+
* `extent` is the axis' length and `count` how many bands share it; `labelSize` is the
|
|
435
|
+
* longest label along the axis, and `gap` the least room between two labels. All in the
|
|
436
|
+
* same unit, px in practice. With nothing measured yet - a server render, a chart not
|
|
437
|
+
* laid out - the answer is 1: every label, as the markup had before it was measured.
|
|
438
|
+
*
|
|
439
|
+
* @internal
|
|
440
|
+
*/
|
|
441
|
+
export declare function wrChartLabelStep(count: number, extent: number, labelSize: number, gap?: number): number;
|
|
254
442
|
/**
|
|
255
443
|
* A marker shape per series, so points are told apart by SHAPE and not only by
|
|
256
444
|
* hue — the dash list's job, for a chart that draws points rather than lines.
|
|
@@ -295,6 +483,19 @@ export declare function wrChartMarkerPath(shape: WrChartMarkerShape, r: number):
|
|
|
295
483
|
* @internal
|
|
296
484
|
*/
|
|
297
485
|
export declare function wrChartMarkerExtent(shape: WrChartMarkerShape, r: number): WrChartMarkerExtent;
|
|
486
|
+
/**
|
|
487
|
+
* The `Intl.NumberFormat` for `locale` and `options`, built once for the page and shared
|
|
488
|
+
* by every chart on it.
|
|
489
|
+
*
|
|
490
|
+
* Building one costs about a tenth of a millisecond, and the charts built them freely:
|
|
491
|
+
* three per chart instance, and one per tick on every pass over an axis, so a table of a
|
|
492
|
+
* hundred sparklines paid for three hundred identical formatters. A formatter holds no
|
|
493
|
+
* state, so one per distinct key serves them all. The key is the locale and the options
|
|
494
|
+
* in the order given; the charts ask with a handful of shapes, so the map stays small.
|
|
495
|
+
*
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
498
|
+
export declare function wrChartNumberFormat(locale: string, options?: Intl.NumberFormatOptions): Intl.NumberFormat;
|
|
298
499
|
/**
|
|
299
500
|
* The number writers of one chart: its axis ticks, the labels it prints in tight
|
|
300
501
|
* spaces, and the figures of its tooltip and its accessible names — every one
|
|
@@ -340,21 +541,19 @@ export declare function useChartNumbers<A extends readonly unknown[] = []>(value
|
|
|
340
541
|
*/
|
|
341
542
|
/**
|
|
342
543
|
* Default series colours, in order: what a series, a slice or a segment with no
|
|
343
|
-
* `color` of its own takes.
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* same blue as `primary` to every reader (1.061:1 apart in light, 1.004:1 in
|
|
347
|
-
* dark, and the same hue), so two adjacent series would be one series with a
|
|
348
|
-
* seam. The neutral closes the list because it is the one tone here that no
|
|
349
|
-
* intent is near — it used to be the `medium` intent, which v15 removed, and the
|
|
350
|
-
* role resolves to the same step of the gray ramp.
|
|
544
|
+
* `color` of its own takes. Each is a token of the chart theme (`--wr-chart-1` to
|
|
545
|
+
* `--wr-chart-8`, declared by `ngwr/charts/core`'s stylesheet), so an app retints
|
|
546
|
+
* every chart by setting the tokens and a chart's markup never names a hex.
|
|
351
547
|
*
|
|
352
|
-
* The
|
|
353
|
-
*
|
|
354
|
-
*
|
|
548
|
+
* The palette is not the status intents: a second series is not a success and a
|
|
549
|
+
* fourth is not a danger. The first is the brand colour and the last the neutral
|
|
550
|
+
* role; neighbours alternate between a deep and a mid tone, so two series next to
|
|
551
|
+
* each other differ in lightness as well as in hue. The stylesheet carries the
|
|
552
|
+
* measured contrast of each.
|
|
355
553
|
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
554
|
+
* A chart that draws lines still pairs each with a dash (`WR_CHART_DASHES`), and
|
|
555
|
+
* one that draws points with a shape (`WR_CHART_MARKERS`): colour is never the
|
|
556
|
+
* only thing that tells two series apart.
|
|
358
557
|
*
|
|
359
558
|
* @internal
|
|
360
559
|
*/
|
|
@@ -365,15 +564,33 @@ export declare const WR_CHART_PALETTE: readonly string[];
|
|
|
365
564
|
* @internal
|
|
366
565
|
*/
|
|
367
566
|
export declare function wrChartColor(index: number): string;
|
|
567
|
+
/**
|
|
568
|
+
* The series colours every chart took before the chart theme: four status intents and
|
|
569
|
+
* the neutral role. Kept for the charts that have not moved onto `--wr-chart-*` yet,
|
|
570
|
+
* so each keeps its look until it does; a chart on the theme reads
|
|
571
|
+
* {@link WR_CHART_PALETTE}.
|
|
572
|
+
*
|
|
573
|
+
* `warning` measures 1.71:1 on a white surface, under the 3:1 a graphic needs, which
|
|
574
|
+
* is one of the reasons the theme's palette replaced it.
|
|
575
|
+
*
|
|
576
|
+
* @internal
|
|
577
|
+
*/
|
|
578
|
+
export declare const WR_CHART_LEGACY_PALETTE: readonly string[];
|
|
579
|
+
/**
|
|
580
|
+
* The {@link WR_CHART_LEGACY_PALETTE} colour for the series at `index`, wrapping past
|
|
581
|
+
* the end.
|
|
582
|
+
*
|
|
583
|
+
* @internal
|
|
584
|
+
*/
|
|
585
|
+
export declare function wrChartLegacyColor(index: number): string;
|
|
368
586
|
/**
|
|
369
587
|
* A dash pattern per series, so lines are told apart by SHAPE and not only by hue.
|
|
370
588
|
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* that survives greyscale, printing and a monochrome display.
|
|
589
|
+
* A reader with red-green colour blindness can see two strokes of similar lightness
|
|
590
|
+
* as one grey, and a legend that pairs a coloured dot with a name does not rescue it:
|
|
591
|
+
* matching the dot to the line is exactly the step that needs hue. Distinguishing
|
|
592
|
+
* series by dash is the standard remedy and the only one that survives greyscale,
|
|
593
|
+
* printing and a monochrome display.
|
|
377
594
|
*
|
|
378
595
|
* The FIRST entry is solid on purpose. A single-series chart is the common case
|
|
379
596
|
* and there is nothing to tell apart in it; the patterns only appear once a second
|
|
@@ -388,4 +605,25 @@ export declare const WR_CHART_DASHES: readonly string[];
|
|
|
388
605
|
* @internal
|
|
389
606
|
*/
|
|
390
607
|
export declare function wrChartDash(index: number): string;
|
|
391
|
-
|
|
608
|
+
/**
|
|
609
|
+
* @license
|
|
610
|
+
*
|
|
611
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
612
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
613
|
+
*/
|
|
614
|
+
/**
|
|
615
|
+
* `value` rounded to `digits` decimals for an inline style or an SVG attribute, with
|
|
616
|
+
* `-0` folded to `0`: a share of an axis, a percentage, a coordinate.
|
|
617
|
+
*
|
|
618
|
+
* Eleven charts each kept a copy of this under another name (`short`, `percent`,
|
|
619
|
+
* `fixed`), at three precisions. A written geometry value wants few digits - every one
|
|
620
|
+
* past the fourth is bytes in the DOM and a different string for the same pixel - and
|
|
621
|
+
* never `-0`, which `Math.round` produces for a small negative and which prints as `-0`.
|
|
622
|
+
*
|
|
623
|
+
* Not `wrRound` from `ngwr/utils`, which nudges by `Number.EPSILON` to round a decimal
|
|
624
|
+
* tie the way a person expects and keeps the sign of a zero.
|
|
625
|
+
*
|
|
626
|
+
* @internal
|
|
627
|
+
*/
|
|
628
|
+
export declare function wrChartRound(value: number, digits?: number): number;
|
|
629
|
+
export type { WrChartAxis, WrChartAxisOptions, WrChartHoverHandlers, WrChartMarkerExtent, WrChartMarkerShape, WrChartNumbers, WrChartSize, WrChartStateKind, WrChartStateOptions, WrChartStateView, WrChartTableData, WrChartTableGroup, WrChartTableRow };
|
|
@@ -53,8 +53,10 @@ export declare class WrDonutChartHarness extends ComponentHarness {
|
|
|
53
53
|
/** The name the ring announces — the whole chart's, since the slices announce nothing. */
|
|
54
54
|
getAccessibleName(): Promise<string | null>;
|
|
55
55
|
/**
|
|
56
|
-
* How many wedges were drawn. A hidden slice draws none
|
|
57
|
-
*
|
|
56
|
+
* How many wedges were drawn. A hidden slice draws none, and nor does a chart that is
|
|
57
|
+
* empty, loading or failed. The invisible hover target a sliver gets over the ring
|
|
58
|
+
* (`.wr-donut-chart__hit`) and the track an empty ring keeps (`.wr-donut-chart__track`)
|
|
59
|
+
* are not wedges and are not counted.
|
|
58
60
|
*/
|
|
59
61
|
getSliceCount(): Promise<number>;
|
|
60
62
|
/**
|
|
@@ -65,15 +67,19 @@ export declare class WrDonutChartHarness extends ComponentHarness {
|
|
|
65
67
|
* answer `null` for it whatever was bound.
|
|
66
68
|
*/
|
|
67
69
|
isPie(): Promise<boolean>;
|
|
68
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Whether the legend is rendered: `showLegend` is not off, `legendPosition` is not
|
|
72
|
+
* `none`, and there are two segments or more - or one, with `showLegend` set.
|
|
73
|
+
*/
|
|
69
74
|
hasLegend(): Promise<boolean>;
|
|
70
75
|
/**
|
|
71
76
|
* The legend as a {@link WrChartLegendHarness}: each row's key and its hidden state
|
|
72
77
|
* and, with `toggleableLegend`, the toggles that show and hide a slice. Not the same
|
|
73
78
|
* thing as {@link getLegend}, which reads the rows' text and stays as it was.
|
|
74
79
|
*
|
|
75
|
-
* Throws when the chart draws no legend (`showLegend` off,
|
|
76
|
-
*
|
|
80
|
+
* Throws when the chart draws no legend (`showLegend` off, `legendPosition="none"`, no
|
|
81
|
+
* segments, or a single one under `showLegend="auto"`) rather than answering with an
|
|
82
|
+
* empty one: {@link hasLegend} is the question for that.
|
|
77
83
|
*/
|
|
78
84
|
getLegendHarness(): Promise<WrChartLegendHarness>;
|
|
79
85
|
/** The legend rows in order — the only textual form the data has. Hidden slices included. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { WrChartLegendItem } from "ngwr/charts/chart-legend";
|
|
2
|
+
import { WrChartLegendItem, WrChartLegendPosition } from "ngwr/charts/chart-legend";
|
|
3
3
|
/** One slice of a `<wr-donut-chart>`: a name, a value, and optionally its own colour. */
|
|
4
4
|
interface WrDonutSegment {
|
|
5
5
|
/** The slice's name, in the legend and the tooltip. */
|
|
@@ -26,16 +26,26 @@ interface WrDonutSegment {
|
|
|
26
26
|
* <wr-donut-chart [segments]="segments" pie />
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
|
-
* The
|
|
29
|
+
* **The look is the chart theme's.** A slice with no `color` takes the next colour of
|
|
30
|
+
* the shared palette (`--wr-chart-1` to `--wr-chart-8`), and every two slices are parted
|
|
31
|
+
* by a line in `--wr-chart-separator`, 1px at any `size`. Hovering a slice or a legend
|
|
32
|
+
* row dims the others.
|
|
33
|
+
*
|
|
34
|
+
* **The legend** is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), placed by
|
|
35
|
+
* `legendPosition` and left out for a single slice unless `showLegend` asks for it. With
|
|
30
36
|
* `toggleableLegend` its rows show and hide their slices through `hiddenSegments`.
|
|
31
37
|
*
|
|
38
|
+
* **Empty, loading, error.** With nothing to draw the chart keeps its ring as a track
|
|
39
|
+
* and says "No data"; `loading` and `error` put their own message there in place of the
|
|
40
|
+
* slices.
|
|
41
|
+
*
|
|
32
42
|
* @see https://ngwr.dev/charts/donut-chart
|
|
33
43
|
*/
|
|
34
44
|
export declare class WrDonutChart {
|
|
35
45
|
constructor();
|
|
36
46
|
/**
|
|
37
47
|
* The slices, drawn clockwise from twelve o'clock. A segment with no `color`
|
|
38
|
-
* takes the next
|
|
48
|
+
* takes the next colour of the chart palette, `--wr-chart-1` to `--wr-chart-8`.
|
|
39
49
|
*/
|
|
40
50
|
readonly segments: import("@angular/core").InputSignal<readonly WrDonutSegment[]>;
|
|
41
51
|
/**
|
|
@@ -64,8 +74,42 @@ export declare class WrDonutChart {
|
|
|
64
74
|
* back to `donutChart.pieLabel`. @default false
|
|
65
75
|
*/
|
|
66
76
|
readonly pie: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
67
|
-
/**
|
|
68
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Draw the slices edge to edge, with no gap between them: each is stroked in its own
|
|
79
|
+
* colour rather than the surface's, and the host takes the `wr-donut-chart--gapless`
|
|
80
|
+
* modifier. The gap is a shape that tells two neighbours apart without hue, so with it
|
|
81
|
+
* off only the colour change divides them; keep the legend or the tooltip on where the
|
|
82
|
+
* chart has to read without hue. @default false
|
|
83
|
+
*/
|
|
84
|
+
readonly gapless: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
85
|
+
/**
|
|
86
|
+
* Show the legend. `'auto'` shows it when there is something to tell apart - two
|
|
87
|
+
* segments or more - and leaves it out for a single one; `true` shows it for one
|
|
88
|
+
* segment too. @default 'auto'
|
|
89
|
+
*/
|
|
90
|
+
readonly showLegend: import("@angular/core").InputSignalWithTransform<boolean | "auto", unknown>;
|
|
91
|
+
/**
|
|
92
|
+
* Where the legend sits: `bottom` or `top` of the chart as a wrapping row, `start` or
|
|
93
|
+
* `end` of it as a column, or `none` for no legend at all - `hiddenSegments` still
|
|
94
|
+
* hides a slice from outside. @default 'bottom'
|
|
95
|
+
*/
|
|
96
|
+
readonly legendPosition: import("@angular/core").InputSignal<WrChartLegendPosition>;
|
|
97
|
+
/**
|
|
98
|
+
* A request for the chart's data is in flight: the slices give way to the loading
|
|
99
|
+
* message, over the ring drawn as a track. @default false
|
|
100
|
+
*/
|
|
101
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
102
|
+
/**
|
|
103
|
+
* The chart's data failed to load: the slices give way to the error message. `loading`
|
|
104
|
+
* wins while both are set. @default false
|
|
105
|
+
*/
|
|
106
|
+
readonly error: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
107
|
+
/** The message shown when there is nothing to draw. Falls back to `chart.empty`, then `'No data'`. */
|
|
108
|
+
readonly emptyLabel: import("@angular/core").InputSignal<string | null>;
|
|
109
|
+
/** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */
|
|
110
|
+
readonly loadingLabel: import("@angular/core").InputSignal<string | null>;
|
|
111
|
+
/** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */
|
|
112
|
+
readonly errorLabel: import("@angular/core").InputSignal<string | null>;
|
|
69
113
|
/**
|
|
70
114
|
* Make each legend row a toggle button that shows and hides its slice, through
|
|
71
115
|
* `hiddenSegments`. A row is a `<button aria-pressed>`, pressed while its slice is
|
|
@@ -93,20 +137,27 @@ export declare class WrDonutChart {
|
|
|
93
137
|
readonly centerValue: import("@angular/core").InputSignal<string>;
|
|
94
138
|
/** Smaller label under the value. Not rendered with `pie`, which has no hole to hold it. */
|
|
95
139
|
readonly centerLabel: import("@angular/core").InputSignal<string>;
|
|
96
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Whether the centre text renders: some is given, there is a hole to print it in, and
|
|
142
|
+
* no state's message is there instead.
|
|
143
|
+
*/
|
|
97
144
|
protected readonly showCenter: import("@angular/core").Signal<boolean>;
|
|
98
145
|
/**
|
|
99
|
-
* Show a tooltip with the slice's label and value on hover. Pointer only — the
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* `.wr-donut-chart__hit` over the pie: widened toward 12px of outer arc (15° on a
|
|
104
|
-
* under about 92px) out of what the wider slices beside it can spare, each of
|
|
105
|
-
* that much of its own. A sliver whose neighbours are slivers too, or
|
|
106
|
-
* spare, gets a narrower target or none, and is read in the legend.
|
|
107
|
-
* such target.
|
|
146
|
+
* Show a tooltip with the slice's label and value on hover. Pointer only — the legend
|
|
147
|
+
* prints the same numbers, and with `showLegend` off `ariaLabel` is where to say
|
|
148
|
+
* them. With `pie`, a slice too thin to land a pointer on, a sliver of a few degrees,
|
|
149
|
+
* is hovered over a wider strip than it draws, through an invisible
|
|
150
|
+
* `.wr-donut-chart__hit` over the pie: widened toward 12px of outer arc (15° on a
|
|
151
|
+
* chart under about 92px) out of what the wider slices beside it can spare, each of
|
|
152
|
+
* which keeps that much of its own. A sliver whose neighbours are slivers too, or
|
|
153
|
+
* have little to spare, gets a narrower target or none, and is read in the legend.
|
|
154
|
+
* The ring draws no such target.
|
|
155
|
+
*
|
|
156
|
+
* By default the pointer passes under the chip to the chart, so the next section
|
|
157
|
+
* answers at once and the chip closes off the chart; `'hoverable'` lets the pointer
|
|
158
|
+
* rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true
|
|
108
159
|
*/
|
|
109
|
-
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean,
|
|
160
|
+
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
110
161
|
/**
|
|
111
162
|
* Writes every value in the legend and the tooltip. `null` uses `Intl.NumberFormat`
|
|
112
163
|
* in `LOCALE_ID`. The centre text is printed as given.
|
|
@@ -174,6 +225,28 @@ export declare class WrDonutChart {
|
|
|
174
225
|
* value is not a number.
|
|
175
226
|
*/
|
|
176
227
|
protected readonly legendItems: import("@angular/core").Signal<readonly WrChartLegendItem[]>;
|
|
228
|
+
/**
|
|
229
|
+
* Whether the chart draws its legend: unless `legendPosition` is `none` or `showLegend`
|
|
230
|
+
* is off, and under `showLegend="auto"` only with two segments or more, since a single
|
|
231
|
+
* slice has nothing to tell apart.
|
|
232
|
+
*/
|
|
233
|
+
protected readonly legendShown: import("@angular/core").Signal<boolean>;
|
|
234
|
+
/** Whether the legend comes before the drawing, in the DOM as on screen: above it, or at inline start. */
|
|
235
|
+
protected readonly legendFirst: import("@angular/core").Signal<boolean>;
|
|
236
|
+
/** Whether the legend sits beside the drawing rather than above or below it. */
|
|
237
|
+
protected readonly legendSide: import("@angular/core").Signal<boolean>;
|
|
238
|
+
/**
|
|
239
|
+
* Whether the chart has nothing to draw: no segment, or none with a share to take. A
|
|
240
|
+
* slice hidden from the legend still counts, so hiding every slice is not "No data".
|
|
241
|
+
*/
|
|
242
|
+
private readonly empty;
|
|
243
|
+
/** What the chart shows in place of its slices, or `null` while it draws them. */
|
|
244
|
+
protected readonly state: import("@angular/core").Signal<import("ngwr/charts/core").WrChartStateView | null>;
|
|
245
|
+
/**
|
|
246
|
+
* The whole ring, or the whole disc of a pie, as one path: the frame the chart keeps
|
|
247
|
+
* while it has no slice to draw - under a state, or with every slice hidden.
|
|
248
|
+
*/
|
|
249
|
+
protected readonly track: import("@angular/core").Signal<string | null>;
|
|
177
250
|
/**
|
|
178
251
|
* One tooltip for the whole chart, pointing at the hovered slice: at the middle of
|
|
179
252
|
* its OUTER arc, on the side that part of the ring faces — above for a slice whose
|
|
@@ -217,11 +290,46 @@ export declare class WrDonutChart {
|
|
|
217
290
|
"required": false;
|
|
218
291
|
"isSignal": true;
|
|
219
292
|
};
|
|
293
|
+
"gapless": {
|
|
294
|
+
"alias": "gapless";
|
|
295
|
+
"required": false;
|
|
296
|
+
"isSignal": true;
|
|
297
|
+
};
|
|
220
298
|
"showLegend": {
|
|
221
299
|
"alias": "showLegend";
|
|
222
300
|
"required": false;
|
|
223
301
|
"isSignal": true;
|
|
224
302
|
};
|
|
303
|
+
"legendPosition": {
|
|
304
|
+
"alias": "legendPosition";
|
|
305
|
+
"required": false;
|
|
306
|
+
"isSignal": true;
|
|
307
|
+
};
|
|
308
|
+
"loading": {
|
|
309
|
+
"alias": "loading";
|
|
310
|
+
"required": false;
|
|
311
|
+
"isSignal": true;
|
|
312
|
+
};
|
|
313
|
+
"error": {
|
|
314
|
+
"alias": "error";
|
|
315
|
+
"required": false;
|
|
316
|
+
"isSignal": true;
|
|
317
|
+
};
|
|
318
|
+
"emptyLabel": {
|
|
319
|
+
"alias": "emptyLabel";
|
|
320
|
+
"required": false;
|
|
321
|
+
"isSignal": true;
|
|
322
|
+
};
|
|
323
|
+
"loadingLabel": {
|
|
324
|
+
"alias": "loadingLabel";
|
|
325
|
+
"required": false;
|
|
326
|
+
"isSignal": true;
|
|
327
|
+
};
|
|
328
|
+
"errorLabel": {
|
|
329
|
+
"alias": "errorLabel";
|
|
330
|
+
"required": false;
|
|
331
|
+
"isSignal": true;
|
|
332
|
+
};
|
|
225
333
|
"toggleableLegend": {
|
|
226
334
|
"alias": "toggleableLegend";
|
|
227
335
|
"required": false;
|