ngwr 16.4.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/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-carousel-testing.mjs +4 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +21 -2
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +48 -4
- 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 +47 -19
- 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 +35 -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-graph.mjs +81 -13
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +5 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +5 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +5 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +5 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +5 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +5 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +5 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +5 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +5 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +5 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +5 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +5 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +5 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +5 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +5 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +5 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +5 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +5 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +5 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +5 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +5 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +5 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +20 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.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 +2 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +2 -0
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +14 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +49 -16
- package/fesm2022/ngwr-tree.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/i18n/ar.json +5 -0
- package/i18n/cs.json +5 -0
- package/i18n/de.json +5 -0
- package/i18n/en.json +5 -0
- package/i18n/es.json +5 -0
- package/i18n/fr.json +5 -0
- package/i18n/he.json +5 -0
- package/i18n/hi.json +5 -0
- package/i18n/id.json +5 -0
- package/i18n/it.json +5 -0
- package/i18n/ja.json +5 -0
- package/i18n/ko.json +5 -0
- package/i18n/nl.json +5 -0
- package/i18n/pl.json +5 -0
- package/i18n/pt.json +5 -0
- package/i18n/ru.json +5 -0
- package/i18n/sv.json +5 -0
- package/i18n/tr.json +5 -0
- package/i18n/uk.json +5 -0
- package/i18n/vi.json +5 -0
- package/i18n/zh-TW.json +5 -0
- package/i18n/zh.json +5 -0
- package/llms-full.txt +8 -8
- package/llms.txt +7 -3
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +24 -13
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/references/catalog.md +1 -1
- package/tour/styles/_index.scss +6 -0
- package/types/ngwr-carousel-testing.d.ts +6 -4
- package/types/ngwr-carousel.d.ts +14 -3
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +27 -3
- 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 +17 -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 +29 -6
- package/types/ngwr-graph.d.ts +22 -6
- 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-table.d.ts +1 -1
- package/types/ngwr-tour.d.ts +21 -2
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +33 -2
- 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 { WrChartLegendItem } from "ngwr/charts/chart-legend";
|
|
2
|
+
import { WrChartLegendItem, WrChartLegendPosition } from "ngwr/charts/chart-legend";
|
|
3
3
|
import { WrChartTableData } from "ngwr/charts/core";
|
|
4
4
|
/** One line of a `<wr-line-chart>`: a name, one value per x, and optionally its own colour. */
|
|
5
5
|
interface WrLineSeries {
|
|
@@ -15,11 +15,6 @@ interface WrLineSeries {
|
|
|
15
15
|
/** Any CSS colour, `var(--wr-…)` included. Left out, the series takes the next palette colour. */
|
|
16
16
|
readonly color?: string;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Where the readout sits: over the crosshair at the top of the plot, over it at the bottom,
|
|
20
|
-
* or at the top beside it on either side. Physical, as the drawing's own x is.
|
|
21
|
-
*/
|
|
22
|
-
type TooltipPlacement = 'top' | 'below' | 'left' | 'right';
|
|
23
18
|
/** A series as it is drawn: `tops` is what each x is plotted at, `bases` where its band starts under `stacked`. */
|
|
24
19
|
interface PlottedSeries {
|
|
25
20
|
readonly index: number;
|
|
@@ -30,9 +25,19 @@ interface PlottedSeries {
|
|
|
30
25
|
readonly tops: readonly (number | null)[];
|
|
31
26
|
readonly bases: readonly (number | null)[] | null;
|
|
32
27
|
}
|
|
28
|
+
/** One reading under the crosshair: a series' own value, and where its marker is drawn. */
|
|
29
|
+
interface HoverPoint {
|
|
30
|
+
readonly index: number;
|
|
31
|
+
readonly label: string;
|
|
32
|
+
readonly value: number;
|
|
33
|
+
readonly text: string;
|
|
34
|
+
readonly color: string;
|
|
35
|
+
readonly x: number;
|
|
36
|
+
readonly y: number;
|
|
37
|
+
}
|
|
33
38
|
/**
|
|
34
|
-
* Multi-series line chart
|
|
35
|
-
* SVG-only — no external dependency.
|
|
39
|
+
* Multi-series line chart on the shared chart theme: gridlines, a y scale, a legend and
|
|
40
|
+
* a hover tooltip. SVG-only — no external dependency.
|
|
36
41
|
*
|
|
37
42
|
* @example
|
|
38
43
|
* ```html
|
|
@@ -45,9 +50,22 @@ interface PlottedSeries {
|
|
|
45
50
|
* />
|
|
46
51
|
* ```
|
|
47
52
|
*
|
|
48
|
-
*
|
|
53
|
+
* Each series takes the next colour of the chart palette (`--wr-chart-1` to `-8`) and
|
|
54
|
+
* the next dash. The gridlines (`showGrid`) and the scale beside them (`showAxis`) are
|
|
55
|
+
* each an input; the zero line is drawn stronger. Hovering a line or a legend row dims
|
|
56
|
+
* the other series; the tooltip is the one every chart shares.
|
|
57
|
+
*
|
|
58
|
+
* The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), below the plot
|
|
59
|
+
* unless `legendPosition` says otherwise and left out for a single series; with
|
|
49
60
|
* `toggleableLegend` its rows show and hide their series through `hiddenSeries`.
|
|
50
61
|
*
|
|
62
|
+
* With nothing to draw the chart keeps its frame and says "No data"; `loading` and
|
|
63
|
+
* `error` put their own message there in place of the lines.
|
|
64
|
+
*
|
|
65
|
+
* A series with more than two points a pixel is drawn from the first, lowest, highest
|
|
66
|
+
* and last point of every pixel column (`decimate`), which is the same line on screen at
|
|
67
|
+
* a fraction of the path.
|
|
68
|
+
*
|
|
51
69
|
* An AREA chart is this one with `showArea`, which fills under every line down to
|
|
52
70
|
* zero, and `stacked` piles the series on each other so the top line reads the total:
|
|
53
71
|
*
|
|
@@ -96,10 +114,47 @@ export declare class WrLineChart {
|
|
|
96
114
|
readonly xLabels: import("@angular/core").InputSignal<readonly string[]>;
|
|
97
115
|
/** Chart pixel height. @default 240 */
|
|
98
116
|
readonly height: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
99
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Draw the gridlines: one across the plot at every tick of the y axis, in
|
|
119
|
+
* `--wr-line-chart-grid-color`, which defaults to the chart theme's `--wr-chart-grid`;
|
|
120
|
+
* the one at zero is drawn in `--wr-line-chart-zero-color`. The scale's numbers are
|
|
121
|
+
* `showAxis`. @default true
|
|
122
|
+
*/
|
|
100
123
|
readonly showGrid: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
101
|
-
/**
|
|
102
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Print the y axis' scale: a number beside the plot at every tick. Off, the gutter
|
|
126
|
+
* goes and the drawing takes its width. The x labels under the plot are `xLabels`.
|
|
127
|
+
* @default true
|
|
128
|
+
*/
|
|
129
|
+
readonly showAxis: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
130
|
+
/**
|
|
131
|
+
* Show the legend. `'auto'` shows it when there is something to tell apart - two
|
|
132
|
+
* series or more - and leaves it out for a single series, which has nothing to key;
|
|
133
|
+
* `true` shows it for one series too. @default 'auto'
|
|
134
|
+
*/
|
|
135
|
+
readonly showLegend: import("@angular/core").InputSignalWithTransform<boolean | "auto", unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* Where the legend sits: `bottom` or `top` of the chart as a wrapping row, `start` or
|
|
138
|
+
* `end` of it as a column, or `none` for no legend at all - `hiddenSeries` still hides
|
|
139
|
+
* a series from outside. @default 'bottom'
|
|
140
|
+
*/
|
|
141
|
+
readonly legendPosition: import("@angular/core").InputSignal<WrChartLegendPosition>;
|
|
142
|
+
/**
|
|
143
|
+
* A request for the chart's data is in flight: the lines give way to the loading
|
|
144
|
+
* message, over the grid and the axis the chart keeps. @default false
|
|
145
|
+
*/
|
|
146
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
147
|
+
/**
|
|
148
|
+
* The chart's data failed to load: the lines give way to the error message. `loading`
|
|
149
|
+
* wins over it. @default false
|
|
150
|
+
*/
|
|
151
|
+
readonly error: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
152
|
+
/** The message shown with nothing to draw. Falls back to `chart.empty`, then `'No data'`. */
|
|
153
|
+
readonly emptyLabel: import("@angular/core").InputSignal<string | null>;
|
|
154
|
+
/** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */
|
|
155
|
+
readonly loadingLabel: import("@angular/core").InputSignal<string | null>;
|
|
156
|
+
/** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */
|
|
157
|
+
readonly errorLabel: import("@angular/core").InputSignal<string | null>;
|
|
103
158
|
/**
|
|
104
159
|
* Make each legend row a toggle button that shows and hides its series, through
|
|
105
160
|
* `hiddenSeries`. A row is a `<button aria-pressed>`, pressed while its series is
|
|
@@ -123,8 +178,24 @@ export declare class WrLineChart {
|
|
|
123
178
|
* kept and ignored.
|
|
124
179
|
*/
|
|
125
180
|
readonly hiddenSeries: import("@angular/core").ModelSignal<readonly number[]>;
|
|
126
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* Show dots at each data point. Under `decimate` the dots are left out once the points
|
|
183
|
+
* sit closer than a dot is wide, where they would touch and read as a thicker line.
|
|
184
|
+
* @default true
|
|
185
|
+
*/
|
|
127
186
|
readonly showDots: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
187
|
+
/**
|
|
188
|
+
* Draw a dense series from fewer points. Once a series has more than two points for
|
|
189
|
+
* every pixel of the drawing's width, each pixel column keeps its first, lowest,
|
|
190
|
+
* highest and last point and the rest are not drawn: every stroke inside a column
|
|
191
|
+
* lands on the same pixels, so the line on screen is the same and its path is a
|
|
192
|
+
* fraction of the size. The peaks, the first point and the last always survive, and a
|
|
193
|
+
* hole in the data still breaks the line. The dots thin with the line, and go
|
|
194
|
+
* altogether once the points are closer than a dot is wide. The axis, the tooltip and
|
|
195
|
+
* the data table always read every point. Off draws every point as given.
|
|
196
|
+
* @default true
|
|
197
|
+
*/
|
|
198
|
+
readonly decimate: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
128
199
|
/**
|
|
129
200
|
* Fill the space under each line, down to zero, which makes this an area chart.
|
|
130
201
|
*
|
|
@@ -164,11 +235,15 @@ export declare class WrLineChart {
|
|
|
164
235
|
*/
|
|
165
236
|
readonly dataTable: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
166
237
|
/**
|
|
167
|
-
* Show the hover readout: the crosshair, the point markers and the tooltip
|
|
168
|
-
*
|
|
169
|
-
*
|
|
238
|
+
* Show the hover readout: the crosshair, the point markers and the tooltip, which is
|
|
239
|
+
* the chip every chart shares, with the x label as its heading and a row per series.
|
|
240
|
+
* Off drops all three, since a crosshair with no values beside it points at nothing.
|
|
241
|
+
*
|
|
242
|
+
* By default the pointer passes under the chip to the chart, so the next section
|
|
243
|
+
* answers at once and the chip closes off the chart; `'hoverable'` lets the pointer
|
|
244
|
+
* rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true
|
|
170
245
|
*/
|
|
171
|
-
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean,
|
|
246
|
+
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
172
247
|
/**
|
|
173
248
|
* Drawn edge to edge in a 600×300 viewBox that stretches to the plot. Nothing in it is
|
|
174
249
|
* text: the tick labels used to be `<text>` in here, and with
|
|
@@ -182,31 +257,15 @@ export declare class WrLineChart {
|
|
|
182
257
|
private readonly svg;
|
|
183
258
|
private readonly plot;
|
|
184
259
|
private readonly probe;
|
|
185
|
-
private readonly tooltipEl;
|
|
186
260
|
/** An x with no label of its own, by its position from 1 in the reader's own digits. */
|
|
187
261
|
private readonly ordinals;
|
|
188
262
|
/** What a browser measured, once it has: `null` on the server and until the first render. */
|
|
189
263
|
private readonly measured;
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
* a marker it reads. Decided in a browser, from the readout's own size, each time the
|
|
193
|
-
* hovered x changes.
|
|
194
|
-
*/
|
|
195
|
-
protected readonly tooltipPlacement: import("@angular/core").WritableSignal<TooltipPlacement>;
|
|
196
|
-
/** Hovered point index (across all series) — null when no hover. */
|
|
197
|
-
protected readonly hoveredIndex: import("@angular/core").WritableSignal<number | null>;
|
|
198
|
-
/** The hovered index while the readout is on, so turning `tooltip` off mid-hover clears it. */
|
|
199
|
-
protected readonly activeIndex: import("@angular/core").Signal<number | null>;
|
|
200
|
-
/**
|
|
201
|
-
* The index Escape dismissed. It stays shut while the pointer stays on that point —
|
|
202
|
-
* WCAG 1.4.13 asks for dismissal WITHOUT moving the pointer, and every `mousemove`
|
|
203
|
-
* re-reports the point, so a plain close would reopen on the next pixel. The rule
|
|
204
|
-
* the shared chart tooltip follows for the other charts.
|
|
205
|
-
*/
|
|
206
|
-
private dismissed;
|
|
264
|
+
/** The drawing's box, on the observer every chart shares: what a resize re-measures on. */
|
|
265
|
+
private readonly drawingSize;
|
|
207
266
|
constructor();
|
|
208
267
|
/**
|
|
209
|
-
* Every series, resolved: its palette
|
|
268
|
+
* Every series, resolved: its colour from the chart palette, its dash (`wrChartDash`, so the lines are
|
|
210
269
|
* told apart by shape and not only by hue, the first one solid) and its data with a
|
|
211
270
|
* HOLE at each non-finite point. Hidden ones included, since the legend lists them.
|
|
212
271
|
*
|
|
@@ -228,6 +287,20 @@ export declare class WrLineChart {
|
|
|
228
287
|
}[]>;
|
|
229
288
|
/** The legend's rows: every series, keyed by its own dash. */
|
|
230
289
|
protected readonly legendItems: import("@angular/core").Signal<readonly WrChartLegendItem[]>;
|
|
290
|
+
/**
|
|
291
|
+
* Whether the chart draws its legend: unless `legendPosition` is `none` or `showLegend`
|
|
292
|
+
* is off. Under `showLegend="auto"` a single series has nothing to tell apart, and
|
|
293
|
+
* draws none.
|
|
294
|
+
*/
|
|
295
|
+
protected readonly legendShown: import("@angular/core").Signal<boolean>;
|
|
296
|
+
/** Whether the legend comes before the plot, in the DOM as on screen: above it, or at inline start. */
|
|
297
|
+
protected readonly legendFirst: import("@angular/core").Signal<boolean>;
|
|
298
|
+
/** Whether the legend sits beside the plot rather than above or below it. */
|
|
299
|
+
protected readonly legendSide: import("@angular/core").Signal<boolean>;
|
|
300
|
+
/** Whether the chart has nothing to draw: no series, or none with a point. Hidden ones count as data. */
|
|
301
|
+
private readonly empty;
|
|
302
|
+
/** What the chart shows in place of its lines, or `null` while it draws them. */
|
|
303
|
+
protected readonly state: import("@angular/core").Signal<import("ngwr/charts/core").WrChartStateView | null>;
|
|
231
304
|
/** The series drawn, read and fitted to: every one `hiddenSeries` does not name. */
|
|
232
305
|
protected readonly visibleSeries: import("@angular/core").Signal<{
|
|
233
306
|
index: number;
|
|
@@ -265,13 +338,26 @@ export declare class WrLineChart {
|
|
|
265
338
|
*/
|
|
266
339
|
protected readonly yTicks: import("@angular/core").Signal<{
|
|
267
340
|
value: number;
|
|
341
|
+
zero: boolean;
|
|
268
342
|
y: number;
|
|
269
343
|
}[]>;
|
|
270
344
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
345
|
+
* How many pixel columns a series is decimated to, or 0 while none is: with `decimate`
|
|
346
|
+
* off, and while the longest series has two points a pixel or fewer, which is every
|
|
347
|
+
* chart of ordinary size. From the drawing's measured width, and `ASSUMED_WIDTH` before
|
|
348
|
+
* a browser has measured it. A number rather than the width itself, so a resize that
|
|
349
|
+
* changes nothing here rebuilds no path.
|
|
350
|
+
*/
|
|
351
|
+
private readonly columns;
|
|
352
|
+
/** Whether the dots are drawn: `showDots`, unless `decimate` finds the points closer than a dot is wide. */
|
|
353
|
+
private readonly dotsShown;
|
|
354
|
+
/** The series drawn, each with the points of it that are: every one, or four a pixel column (`decimate`). */
|
|
355
|
+
private readonly keptSeries;
|
|
356
|
+
/**
|
|
357
|
+
* The SVG path through the kept points of a series — one subpath per unbroken run, so
|
|
358
|
+
* a hole in the data leaves a hole in the line rather than a straight segment across it.
|
|
273
359
|
*/
|
|
274
|
-
|
|
360
|
+
private linePath;
|
|
275
361
|
/**
|
|
276
362
|
* Every series shown as the template draws it: its line's path, and with `showDots` one
|
|
277
363
|
* path holding a subpath per dot, empty when there is none to draw. Built once per change
|
|
@@ -285,28 +371,30 @@ export declare class WrLineChart {
|
|
|
285
371
|
d: string;
|
|
286
372
|
dots: string;
|
|
287
373
|
}[]>;
|
|
288
|
-
/** A series' dots as one path, a subpath each. A hole in the data gets none. */
|
|
374
|
+
/** A series' dots as one path, a subpath for each kept point. A hole in the data gets none. */
|
|
289
375
|
private dotsFor;
|
|
290
376
|
/**
|
|
291
377
|
* The fills under the lines with `showArea`: one per unbroken run of two points or
|
|
292
378
|
* more, from the line down to zero, or down to the top of the band below under
|
|
293
379
|
* `stacked`. A run of one point has no width to fill. Keyed by the series' position
|
|
294
|
-
* and the run's first x, so a run that moves is a new fill.
|
|
380
|
+
* and the run's first x, so a run that moves is a new fill. Each follows the points
|
|
381
|
+
* its line is drawn through.
|
|
295
382
|
*/
|
|
296
383
|
protected readonly areas: import("@angular/core").Signal<{
|
|
297
384
|
key: string;
|
|
385
|
+
series: number;
|
|
298
386
|
color: string;
|
|
299
387
|
d: string;
|
|
300
388
|
}[]>;
|
|
301
|
-
/** One fill: along the run's plotted values, then back along its base
|
|
389
|
+
/** One fill: along the run's plotted values, then back along its base. */
|
|
302
390
|
private areaPath;
|
|
303
391
|
/** A point's x in the viewBox — a lone point in the middle, as the sparkline draws one. */
|
|
304
392
|
protected pointX(index: number): number;
|
|
305
393
|
protected pointY(value: number): number;
|
|
306
394
|
/**
|
|
307
395
|
* A point's x as a percentage of the drawing's width, which the SVG stretches to. The
|
|
308
|
-
* x labels
|
|
309
|
-
*
|
|
396
|
+
* x labels are placed with it, in a box as wide as the plot: the stylesheet adds the
|
|
397
|
+
* plot's inline padding, so they land on the point at any size.
|
|
310
398
|
*/
|
|
311
399
|
protected xPercent(index: number): number;
|
|
312
400
|
/**
|
|
@@ -319,9 +407,11 @@ export declare class WrLineChart {
|
|
|
319
407
|
*/
|
|
320
408
|
protected readonly xSlot: import("@angular/core").Signal<number>;
|
|
321
409
|
/**
|
|
322
|
-
*
|
|
323
|
-
* Laid out as wide as its widest line, so
|
|
324
|
-
* one with the most characters — `WWWWW` is wider than
|
|
410
|
+
* The longest few x labels, a line each: the hidden copy the labels' room is measured
|
|
411
|
+
* against. Laid out as wide as its widest line, so among those few it measures the
|
|
412
|
+
* widest rather than the one with the most characters — `WWWWW` is wider than
|
|
413
|
+
* `iiiiiii`. A few and not every label: ten thousand labels were ten thousand lines to
|
|
414
|
+
* shape on every change, to learn the width of one.
|
|
325
415
|
*/
|
|
326
416
|
protected readonly probeText: import("@angular/core").Signal<string>;
|
|
327
417
|
/**
|
|
@@ -346,54 +436,53 @@ export declare class WrLineChart {
|
|
|
346
436
|
}[];
|
|
347
437
|
}>;
|
|
348
438
|
/**
|
|
349
|
-
* The
|
|
350
|
-
*
|
|
351
|
-
*
|
|
439
|
+
* The readings at x `i`, one per series shown that has one. Each marker sits where the
|
|
440
|
+
* series is drawn, which under `stacked` is the top of its band, while the row reads
|
|
441
|
+
* the series' own value.
|
|
352
442
|
*/
|
|
353
|
-
|
|
354
|
-
index: number;
|
|
355
|
-
label: string;
|
|
356
|
-
value: number;
|
|
357
|
-
text: string;
|
|
358
|
-
color: string;
|
|
359
|
-
x: number;
|
|
360
|
-
y: number;
|
|
361
|
-
}[]>;
|
|
362
|
-
protected readonly hoverLabel: import("@angular/core").Signal<string>;
|
|
443
|
+
private pointsAt;
|
|
363
444
|
/**
|
|
364
|
-
* The
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
* the
|
|
445
|
+
* The chart's tooltip: the chip every chart shares, with the hovered x's label as its
|
|
446
|
+
* heading and a row per series shown with a reading there, in the series' colour. It
|
|
447
|
+
* points at the box round that x's markers - the crosshair, from the highest marker to
|
|
448
|
+
* the lowest, widened by a marker's reach - from above, and flips for room, so it
|
|
449
|
+
* covers none of the markers it reads. It takes `wr-line-chart__tooltip` beside the
|
|
450
|
+
* shared class, which is what this chart's own `--wr-line-chart-tooltip-*` hooks style.
|
|
369
451
|
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
* Over the padding the nearest point is the end one, so the index is clamped.
|
|
452
|
+
* An x is found by POSITION, anywhere over the plot, so the chip is scrubbed the way a
|
|
453
|
+
* sparkline's is: while it is up it follows the pointer by itself, over the plot and
|
|
454
|
+
* over the chip.
|
|
374
455
|
*/
|
|
375
|
-
protected
|
|
376
|
-
|
|
456
|
+
protected readonly tip: import("ngwr/popover").WrChartTooltip;
|
|
457
|
+
/** The hovered x while the chart draws its lines: a state has nothing to read out. */
|
|
458
|
+
protected readonly activeIndex: import("@angular/core").Signal<number | null>;
|
|
459
|
+
/** The hovered x's readings: what the crosshair and the markers are drawn from. */
|
|
460
|
+
protected readonly hoverPoints: import("@angular/core").Signal<HoverPoint[]>;
|
|
461
|
+
private readout;
|
|
462
|
+
/**
|
|
463
|
+
* The pointer over the plot, while no chip is up: an open chip follows the pointer by
|
|
464
|
+
* itself, through `indexAt`, so each move is measured once. A MOUSE event, as the
|
|
465
|
+
* sparkline's is: a tap fires `pointerdown`, `pointerup` and `pointerleave` and no
|
|
466
|
+
* `pointermove`, then the compatibility `mousemove`, so a `pointermove` listener never
|
|
467
|
+
* opened the readout on a phone and the `pointerleave` closed whatever it had.
|
|
468
|
+
*/
|
|
469
|
+
private onPointerMove;
|
|
470
|
+
/**
|
|
471
|
+
* The x nearest a viewport position over the plot, or `null` off it. Measured against
|
|
472
|
+
* the drawing inside the plot: the drawing runs edge to edge, so the first and last
|
|
473
|
+
* dots overhang it into the plot's padding, and over the padding the nearest point is
|
|
474
|
+
* the end one, so the index is clamped. One layout read: the plot's own box is the
|
|
475
|
+
* drawing's, widened by the padding last measured.
|
|
476
|
+
*/
|
|
477
|
+
private indexAt;
|
|
377
478
|
/** A zero-length line at a point, which a round cap paints as a dot. */
|
|
378
479
|
protected dotPath(x: number, y: number): string;
|
|
379
480
|
/**
|
|
380
|
-
* Read the drawing's width, the plot's
|
|
381
|
-
*
|
|
382
|
-
*
|
|
481
|
+
* Read the drawing's width, the plot's padding and the widest x label off the layout.
|
|
482
|
+
* A hidden chart measures 0 and keeps its last reading rather than thin to nothing;
|
|
483
|
+
* with no label to measure the estimate stays in charge.
|
|
383
484
|
*/
|
|
384
485
|
private measure;
|
|
385
|
-
/**
|
|
386
|
-
* Place the readout clear of the markers it reads. Over the crosshair at the top of the
|
|
387
|
-
* plot, as it always sat, while that covers none of them; else at the bottom, while that
|
|
388
|
-
* covers none; else beside the crosshair at the top, on the side with more room, which
|
|
389
|
-
* covers none of them as long as it fits there — every marker is on the crosshair. Where
|
|
390
|
-
* each covers some, the one that covers fewest, in that order on a tie.
|
|
391
|
-
*
|
|
392
|
-
* Every candidate is worked out from the readout's own size and from how far inside the
|
|
393
|
-
* drawing's edge it sits, which is the same at the top and, moved below, at the bottom —
|
|
394
|
-
* so the choice never depends on where it is now, and settles in one pass.
|
|
395
|
-
*/
|
|
396
|
-
private placeTooltip;
|
|
397
486
|
/**
|
|
398
487
|
* The y-axis labels, top to bottom, in the reader's own language — and decided for
|
|
399
488
|
* the AXIS, not one tick at a time (`useChartNumbers().ticks`).
|
|
@@ -457,11 +546,46 @@ export declare class WrLineChart {
|
|
|
457
546
|
"required": false;
|
|
458
547
|
"isSignal": true;
|
|
459
548
|
};
|
|
549
|
+
"showAxis": {
|
|
550
|
+
"alias": "showAxis";
|
|
551
|
+
"required": false;
|
|
552
|
+
"isSignal": true;
|
|
553
|
+
};
|
|
460
554
|
"showLegend": {
|
|
461
555
|
"alias": "showLegend";
|
|
462
556
|
"required": false;
|
|
463
557
|
"isSignal": true;
|
|
464
558
|
};
|
|
559
|
+
"legendPosition": {
|
|
560
|
+
"alias": "legendPosition";
|
|
561
|
+
"required": false;
|
|
562
|
+
"isSignal": true;
|
|
563
|
+
};
|
|
564
|
+
"loading": {
|
|
565
|
+
"alias": "loading";
|
|
566
|
+
"required": false;
|
|
567
|
+
"isSignal": true;
|
|
568
|
+
};
|
|
569
|
+
"error": {
|
|
570
|
+
"alias": "error";
|
|
571
|
+
"required": false;
|
|
572
|
+
"isSignal": true;
|
|
573
|
+
};
|
|
574
|
+
"emptyLabel": {
|
|
575
|
+
"alias": "emptyLabel";
|
|
576
|
+
"required": false;
|
|
577
|
+
"isSignal": true;
|
|
578
|
+
};
|
|
579
|
+
"loadingLabel": {
|
|
580
|
+
"alias": "loadingLabel";
|
|
581
|
+
"required": false;
|
|
582
|
+
"isSignal": true;
|
|
583
|
+
};
|
|
584
|
+
"errorLabel": {
|
|
585
|
+
"alias": "errorLabel";
|
|
586
|
+
"required": false;
|
|
587
|
+
"isSignal": true;
|
|
588
|
+
};
|
|
465
589
|
"toggleableLegend": {
|
|
466
590
|
"alias": "toggleableLegend";
|
|
467
591
|
"required": false;
|
|
@@ -477,6 +601,11 @@ export declare class WrLineChart {
|
|
|
477
601
|
"required": false;
|
|
478
602
|
"isSignal": true;
|
|
479
603
|
};
|
|
604
|
+
"decimate": {
|
|
605
|
+
"alias": "decimate";
|
|
606
|
+
"required": false;
|
|
607
|
+
"isSignal": true;
|
|
608
|
+
};
|
|
480
609
|
"showArea": {
|
|
481
610
|
"alias": "showArea";
|
|
482
611
|
"required": false;
|
|
@@ -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
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
*
|
|
@@ -34,6 +34,13 @@ interface WrMeterSegment {
|
|
|
34
34
|
*
|
|
35
35
|
* The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), and with
|
|
36
36
|
* `toggleableLegend` its rows show and hide their segments through `hiddenSegments`.
|
|
37
|
+
* `legendPosition` puts it under the bar, over it or beside it.
|
|
38
|
+
*
|
|
39
|
+
* **On the chart theme.** A segment with no `color` takes the next colour of the chart
|
|
40
|
+
* palette (`--wr-chart-1` to `-8`), solid, and a 1px line in the surface parts two
|
|
41
|
+
* segments. Hovering a segment or its legend row dims the others. With no segment the
|
|
42
|
+
* bar is an empty track with "No data" under it; `loading` and `error` put their own
|
|
43
|
+
* message there.
|
|
37
44
|
*
|
|
38
45
|
* @see https://ngwr.dev/charts/meter-group
|
|
39
46
|
*/
|
|
@@ -50,8 +57,34 @@ export declare class WrMeterGroup {
|
|
|
50
57
|
readonly segments: import("@angular/core").InputSignal<readonly WrMeterSegment[]>;
|
|
51
58
|
/** Explicit total, a capacity the segments fill. `0` (default) uses the sum of the segments shown. @default 0 */
|
|
52
59
|
readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
53
|
-
/**
|
|
54
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Show the labelled legend. `'auto'` leaves it out for a single segment, which has
|
|
62
|
+
* nothing to tell apart; `true` shows it for one too, since the row carries the value.
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
readonly showLegend: import("@angular/core").InputSignalWithTransform<boolean | "auto", unknown>;
|
|
66
|
+
/**
|
|
67
|
+
* Where the legend sits: `bottom` or `top` of the bar as a wrapping row, `start` or
|
|
68
|
+
* `end` of it as a column, or `none` for no legend at all - `hiddenSegments` still
|
|
69
|
+
* hides a segment from outside. @default 'bottom'
|
|
70
|
+
*/
|
|
71
|
+
readonly legendPosition: import("@angular/core").InputSignal<WrChartLegendPosition>;
|
|
72
|
+
/**
|
|
73
|
+
* A request for the meter's data is in flight: the bar empties and the loading message
|
|
74
|
+
* takes the legend's place. @default false
|
|
75
|
+
*/
|
|
76
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
77
|
+
/**
|
|
78
|
+
* The meter's data failed to load: the bar empties and the error message takes the
|
|
79
|
+
* legend's place. `loading` wins while both are set. @default false
|
|
80
|
+
*/
|
|
81
|
+
readonly error: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
82
|
+
/** The message shown when there is no segment. Falls back to `chart.empty`, then `'No data'`. */
|
|
83
|
+
readonly emptyLabel: import("@angular/core").InputSignal<string | null>;
|
|
84
|
+
/** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */
|
|
85
|
+
readonly loadingLabel: import("@angular/core").InputSignal<string | null>;
|
|
86
|
+
/** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */
|
|
87
|
+
readonly errorLabel: import("@angular/core").InputSignal<string | null>;
|
|
55
88
|
/** Show each segment's value in the legend, next to its label. @default true */
|
|
56
89
|
readonly showValues: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
57
90
|
/**
|
|
@@ -79,11 +112,15 @@ export declare class WrMeterGroup {
|
|
|
79
112
|
*/
|
|
80
113
|
readonly hiddenSegments: import("@angular/core").ModelSignal<readonly number[]>;
|
|
81
114
|
/**
|
|
82
|
-
* Show a tooltip with the segment's label and value on hover. It replaces the
|
|
83
|
-
*
|
|
84
|
-
*
|
|
115
|
+
* Show a tooltip with the segment's label and value on hover. It replaces the band's
|
|
116
|
+
* `title`, which is written only while this is off — or the browser would open a
|
|
117
|
+
* second copy a moment later.
|
|
118
|
+
*
|
|
119
|
+
* By default the pointer passes under the chip to the chart, so the next section
|
|
120
|
+
* answers at once and the chip closes off the chart; `'hoverable'` lets the pointer
|
|
121
|
+
* rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true
|
|
85
122
|
*/
|
|
86
|
-
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean,
|
|
123
|
+
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
87
124
|
/**
|
|
88
125
|
* Writes every value in the legend and the tooltip, and the total the bar announces
|
|
89
126
|
* as `aria-valuetext`. `null` uses `Intl.NumberFormat` in `LOCALE_ID`.
|
|
@@ -92,6 +129,7 @@ export declare class WrMeterGroup {
|
|
|
92
129
|
readonly valueFormat: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
93
130
|
/** Each value as the legend, the tooltip and the bar print it: never compact, in `LOCALE_ID` unless `valueFormat` is given. */
|
|
94
131
|
private readonly numbers;
|
|
132
|
+
private readonly barEl;
|
|
95
133
|
private readonly sliceEls;
|
|
96
134
|
/**
|
|
97
135
|
* A segment's contribution, floored at `0` and with anything non-finite read
|
|
@@ -132,6 +170,16 @@ export declare class WrMeterGroup {
|
|
|
132
170
|
* boundary and would leave a double one.
|
|
133
171
|
*/
|
|
134
172
|
protected readonly bands: import("@angular/core").Signal<{
|
|
173
|
+
/** Its share of the bar, 0 to 1. */
|
|
174
|
+
size: number;
|
|
175
|
+
/**
|
|
176
|
+
* Where it ends, as a share of the bar from its start. Every band is as wide as the
|
|
177
|
+
* bar and slid back so that it ends here, under the bands before it: its length on
|
|
178
|
+
* screen is then a transform, and a new value lays nothing out.
|
|
179
|
+
*/
|
|
180
|
+
end: number;
|
|
181
|
+
/** Its place in the pile: the first band on top, so each covers the start of the next. */
|
|
182
|
+
layer: number;
|
|
135
183
|
index: number;
|
|
136
184
|
label: string;
|
|
137
185
|
text: string;
|
|
@@ -147,6 +195,17 @@ export declare class WrMeterGroup {
|
|
|
147
195
|
* only the shown ones, so the band is found among them by that position.
|
|
148
196
|
*/
|
|
149
197
|
protected readonly tip: import("ngwr/popover").WrChartTooltip;
|
|
198
|
+
/**
|
|
199
|
+
* Whether the meter draws its legend: unless `showLegend` is off, `legendPosition` is
|
|
200
|
+
* `none`, or there is no segment. Under `showLegend="auto"` a single segment draws none.
|
|
201
|
+
*/
|
|
202
|
+
protected readonly legendShown: import("@angular/core").Signal<boolean>;
|
|
203
|
+
/** Whether the legend comes before the bar, in the DOM as on screen: above it, or at inline start. */
|
|
204
|
+
protected readonly legendFirst: import("@angular/core").Signal<boolean>;
|
|
205
|
+
/** Whether the legend sits beside the bar rather than above or below it. */
|
|
206
|
+
protected readonly legendSide: import("@angular/core").Signal<boolean>;
|
|
207
|
+
/** What the meter shows in place of its legend, or `null` while it draws its segments. */
|
|
208
|
+
protected readonly state: import("@angular/core").Signal<import("ngwr/charts/core").WrChartStateView | null>;
|
|
150
209
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrMeterGroup, never>;
|
|
151
210
|
static ɵcmp: i0.ɵɵComponentDeclaration<WrMeterGroup, "wr-meter-group", never, {
|
|
152
211
|
"ariaLabel": {
|
|
@@ -169,6 +228,36 @@ export declare class WrMeterGroup {
|
|
|
169
228
|
"required": false;
|
|
170
229
|
"isSignal": true;
|
|
171
230
|
};
|
|
231
|
+
"legendPosition": {
|
|
232
|
+
"alias": "legendPosition";
|
|
233
|
+
"required": false;
|
|
234
|
+
"isSignal": true;
|
|
235
|
+
};
|
|
236
|
+
"loading": {
|
|
237
|
+
"alias": "loading";
|
|
238
|
+
"required": false;
|
|
239
|
+
"isSignal": true;
|
|
240
|
+
};
|
|
241
|
+
"error": {
|
|
242
|
+
"alias": "error";
|
|
243
|
+
"required": false;
|
|
244
|
+
"isSignal": true;
|
|
245
|
+
};
|
|
246
|
+
"emptyLabel": {
|
|
247
|
+
"alias": "emptyLabel";
|
|
248
|
+
"required": false;
|
|
249
|
+
"isSignal": true;
|
|
250
|
+
};
|
|
251
|
+
"loadingLabel": {
|
|
252
|
+
"alias": "loadingLabel";
|
|
253
|
+
"required": false;
|
|
254
|
+
"isSignal": true;
|
|
255
|
+
};
|
|
256
|
+
"errorLabel": {
|
|
257
|
+
"alias": "errorLabel";
|
|
258
|
+
"required": false;
|
|
259
|
+
"isSignal": true;
|
|
260
|
+
};
|
|
172
261
|
"showValues": {
|
|
173
262
|
"alias": "showValues";
|
|
174
263
|
"required": false;
|
|
@@ -84,7 +84,11 @@ export declare class WrRadarChartHarness extends ComponentHarness {
|
|
|
84
84
|
getVariant(): Promise<WrRadarVariant>;
|
|
85
85
|
/** The axis names round the drawing, clockwise from twelve o'clock, as given — the full text, ellipsised or not. */
|
|
86
86
|
getAxisLabels(): Promise<string[]>;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The ring values printed between two spokes, from the outer ring in: one closer than a
|
|
89
|
+
* line to the last is left out, though its ring is drawn. `[]` with `showGrid` off, and
|
|
90
|
+
* while the chart is empty, loading or failed.
|
|
91
|
+
*/
|
|
88
92
|
getRingLabels(): Promise<string[]>;
|
|
89
93
|
/** Whether the web is drawn (`showGrid`): the rings and the spokes. */
|
|
90
94
|
hasGrid(): Promise<boolean>;
|
|
@@ -115,9 +119,16 @@ export declare class WrRadarChartHarness extends ComponentHarness {
|
|
|
115
119
|
* series drawn, each fill covering that series' wedges.
|
|
116
120
|
*/
|
|
117
121
|
getAreaCount(): Promise<number>;
|
|
118
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* How many value dots were drawn across every series (`showDots`). A missing value has
|
|
124
|
+
* none. A series' dots are ONE path, a subpath each, so this counts the subpaths rather
|
|
125
|
+
* than the `.wr-radar-chart__dot` elements, which are one per series.
|
|
126
|
+
*/
|
|
119
127
|
getDotCount(): Promise<number>;
|
|
120
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Whether the legend is rendered: `showLegend` is not off, `legendPosition` is not
|
|
130
|
+
* `none`, and there are two series or more - or one, with `showLegend` set.
|
|
131
|
+
*/
|
|
121
132
|
hasLegend(): Promise<boolean>;
|
|
122
133
|
/**
|
|
123
134
|
* The legend, as a {@link WrChartLegendHarness}: each row's name, its key and its hidden
|