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
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// Styles for the entry points this component's own markup renders. The legend is a
|
|
5
5
|
// `ul[wr-chart-legend]`, so `@use 'ngwr/charts/meter-group'` alone draws it styled.
|
|
6
6
|
@use '../../chart-legend/styles' as chart-legend-styles; // WrChartLegend
|
|
7
|
+
@use '../../core/styles' as core-styles; // WrChartState
|
|
7
8
|
@include theme.loaded('charts/meter-group');
|
|
8
9
|
|
|
9
10
|
.wr-meter-group {
|
|
@@ -11,20 +12,40 @@
|
|
|
11
12
|
--wr-meter-group-font-family: var(--wr-font-family-base);
|
|
12
13
|
--wr-meter-group-color: var(--wr-color-on-surface);
|
|
13
14
|
--wr-meter-group-bar-height: 0.625rem;
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
--wr-meter-group-
|
|
15
|
+
// The chart theme's radius, the track every unfilled scale is painted with, and the line
|
|
16
|
+
// between two fills that touch. They were a pill, a role of this meter's own and a 2px
|
|
17
|
+
// gap in the track's colour.
|
|
18
|
+
--wr-meter-group-bar-radius: var(--wr-chart-bar-radius);
|
|
19
|
+
--wr-meter-group-track-bg: var(--wr-chart-track);
|
|
20
|
+
--wr-meter-group-slice-gap: 1px;
|
|
21
|
+
--wr-meter-group-separator: var(--wr-chart-separator);
|
|
18
22
|
--wr-meter-group-legend-value-color: var(--wr-color-on-surface-muted);
|
|
23
|
+
// A band moving to a new value.
|
|
24
|
+
--wr-meter-group-duration: var(--wr-chart-duration);
|
|
25
|
+
--wr-meter-group-ease: var(--wr-chart-ease);
|
|
26
|
+
// The line the state message is written on, in the legend's place.
|
|
27
|
+
--wr-meter-group-status-height: var(--wr-text-sm-leading);
|
|
28
|
+
// Which way a band slides: 1 from the left, -1 from the right. A transform is physical,
|
|
29
|
+
// so the stylesheet turns it over under RTL.
|
|
30
|
+
--wr-meter-group-dir: 1;
|
|
19
31
|
|
|
20
32
|
display: flex;
|
|
21
33
|
flex-direction: column;
|
|
22
|
-
gap: var(--wr-meter-group-gap);
|
|
23
34
|
font-family: var(--wr-meter-group-font-family);
|
|
24
35
|
color: var(--wr-meter-group-color);
|
|
25
36
|
|
|
37
|
+
&:dir(rtl) {
|
|
38
|
+
--wr-meter-group-dir: -1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Beside the bar, the legend is a column and the bar takes the rest, centred on it.
|
|
42
|
+
&.wr-chart--legend-side {
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
26
47
|
&__bar {
|
|
27
|
-
|
|
48
|
+
position: relative;
|
|
28
49
|
width: 100%;
|
|
29
50
|
height: var(--wr-meter-group-bar-height);
|
|
30
51
|
border-radius: var(--wr-meter-group-bar-radius);
|
|
@@ -38,35 +59,50 @@
|
|
|
38
59
|
}
|
|
39
60
|
}
|
|
40
61
|
|
|
62
|
+
// As wide as the bar, and slid back so that it ENDS at its share of it
|
|
63
|
+
// (`--wr-meter-group-slice-end`, 0 to 1 from the bar's start, which the component
|
|
64
|
+
// writes): the bands are piled first on top, so each shows from where the one before it
|
|
65
|
+
// ends. A new value, or a legend row toggled, moves a transform, which lays nothing
|
|
66
|
+
// out; it used to move `width`, and every frame of that laid the bar out again.
|
|
41
67
|
&__slice {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
transform: translateX(calc((var(--wr-meter-group-slice-end, 1) - 1) * 100% * var(--wr-meter-group-dir)));
|
|
72
|
+
transition: transform var(--wr-meter-group-duration) var(--wr-meter-group-ease);
|
|
45
73
|
// An inline `background`, which forced colors resets to `Canvas` — the bar
|
|
46
74
|
// vanished and left only the legend. The SVG charts keep their fills there.
|
|
47
75
|
forced-color-adjust: none;
|
|
48
|
-
// The
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
transition: none;
|
|
76
|
+
// The shared hover-dim fades a mark by its opacity, and a band lies over the start of
|
|
77
|
+
// the next: faded, it would show that one through. A band stays whole and takes a
|
|
78
|
+
// veil of the surface instead (`::after`, below), which reads the same.
|
|
79
|
+
opacity: 1;
|
|
80
|
+
// The line between two bands: the end edge of each, in the surface, inside its own
|
|
81
|
+
// box so every boundary sits at its exact share. A band of nothing ends where the one
|
|
82
|
+
// before it does, and its line lies under that one's. The last band draws none: past
|
|
83
|
+
// it is the track or the end of the bar.
|
|
84
|
+
border-inline-end: var(--wr-meter-group-slice-gap) solid var(--wr-meter-group-separator);
|
|
85
|
+
|
|
86
|
+
&:last-of-type {
|
|
87
|
+
border-inline-end: 0;
|
|
61
88
|
}
|
|
62
89
|
}
|
|
63
90
|
|
|
91
|
+
// Where the message of an empty, loading or failed meter is written.
|
|
92
|
+
&__status {
|
|
93
|
+
position: relative;
|
|
94
|
+
min-height: var(--wr-meter-group-status-height);
|
|
95
|
+
margin-block-start: var(--wr-meter-group-gap);
|
|
96
|
+
}
|
|
97
|
+
|
|
64
98
|
&__legend {
|
|
65
99
|
--wr-meter-group-legend-gap-y: var(--wr-space-sm);
|
|
66
100
|
--wr-meter-group-legend-gap-x: var(--wr-space-lg);
|
|
67
101
|
|
|
102
|
+
// The room between the bar and the legend, on whichever side the legend sits.
|
|
103
|
+
--wr-chart-legend-space: var(--wr-meter-group-gap);
|
|
104
|
+
|
|
68
105
|
list-style: none;
|
|
69
|
-
margin: 0;
|
|
70
106
|
padding: 0;
|
|
71
107
|
display: flex;
|
|
72
108
|
flex-wrap: wrap;
|
|
@@ -87,9 +123,10 @@
|
|
|
87
123
|
color: var(--wr-meter-group-color);
|
|
88
124
|
}
|
|
89
125
|
|
|
126
|
+
// The 8px dot every chart's legend keys a row with.
|
|
90
127
|
&__swatch {
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
128
|
+
width: var(--wr-chart-legend-dot-size);
|
|
129
|
+
height: var(--wr-chart-legend-dot-size);
|
|
93
130
|
border-radius: 50%;
|
|
94
131
|
flex: 0 0 auto;
|
|
95
132
|
// The key to the slices' colours, so it keeps them where the slices do.
|
|
@@ -107,3 +144,28 @@
|
|
|
107
144
|
font-variant-numeric: tabular-nums;
|
|
108
145
|
}
|
|
109
146
|
}
|
|
147
|
+
|
|
148
|
+
// Hover: every band but the one under the pointer, or under a hovered legend row, takes a
|
|
149
|
+
// veil of the surface at the theme's dim. Only while the meter is dimmed.
|
|
150
|
+
.wr-chart--dim .wr-meter-group__slice:not(.wr-chart-mark--on)::after {
|
|
151
|
+
content: '';
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset: 0;
|
|
154
|
+
background: var(--wr-meter-group-separator);
|
|
155
|
+
opacity: calc(1 - var(--wr-chart-dim));
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
transition: opacity var(--wr-chart-duration-short) var(--wr-chart-ease);
|
|
158
|
+
|
|
159
|
+
@starting-style {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// A band entering the page slides in from the bar's start, where the browser can start a
|
|
165
|
+
// transition from a style of its own (`@starting-style`); elsewhere it is drawn at its
|
|
166
|
+
// share. Under reduced motion the theme's duration is 0s, and it is drawn at once.
|
|
167
|
+
@starting-style {
|
|
168
|
+
.wr-meter-group__slice {
|
|
169
|
+
transform: translateX(calc(-100% * var(--wr-meter-group-dir)));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
// Styles for the entry points this component's own markup renders. The legend is a
|
|
5
5
|
// `ul[wr-chart-legend]`, so `@use 'ngwr/charts/radar-chart'` alone draws it styled.
|
|
6
6
|
@use '../../chart-legend/styles' as chart-legend-styles; // WrChartLegend
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
7
|
+
// The chart theme every hook below defaults to (`--wr-chart-*`), the hover-dim rule, the
|
|
8
|
+
// empty / loading / error message, and the `<wr-chart-table>` that `dataTable` renders
|
|
9
|
+
// beside the drawing, which its own rule clips out of sight.
|
|
10
|
+
@use '../../core/styles' as core-styles; // WrChartTable, WrChartState
|
|
10
11
|
@include theme.loaded('charts/radar-chart');
|
|
11
12
|
|
|
12
13
|
.wr-radar-chart {
|
|
@@ -17,35 +18,39 @@
|
|
|
17
18
|
// as wide as a name may run beside it and as tall as one line above and below it; a
|
|
18
19
|
// name longer than its room is ellipsised, and the tooltip and the data table carry it
|
|
19
20
|
// whole.
|
|
20
|
-
--wr-radar-chart-label-font-size: var(--wr-
|
|
21
|
+
--wr-radar-chart-label-font-size: var(--wr-chart-label-size);
|
|
21
22
|
--wr-radar-chart-label-line-height: var(--wr-text-xs-leading);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//
|
|
23
|
+
// Muted, as the category names along every chart's axis are.
|
|
24
|
+
--wr-radar-chart-label-color: var(--wr-chart-label);
|
|
25
|
+
// How far past the end of its spoke a name starts: clear of a dot on the outer ring.
|
|
25
26
|
--wr-radar-chart-label-gap: var(--wr-space-sm);
|
|
26
27
|
--wr-radar-chart-label-max-width: 10rem;
|
|
27
28
|
--wr-radar-chart-gutter-x: 5rem;
|
|
28
29
|
--wr-radar-chart-gutter-y: calc(var(--wr-radar-chart-label-line-height) + var(--wr-radar-chart-label-gap));
|
|
29
|
-
// The ring values
|
|
30
|
-
// the surface round each glyph:
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
--wr-radar-chart-ring-label-
|
|
36
|
-
|
|
37
|
-
--wr-radar-chart-
|
|
38
|
-
// The web, as faint as the line chart's gridlines.
|
|
39
|
-
--wr-radar-chart-grid-color: color-mix(in srgb, var(--wr-border-base) 70%, transparent);
|
|
30
|
+
// The ring values, each on its own ring between two spokes, muted as every axis' ticks
|
|
31
|
+
// are, with a halo of the surface round each glyph: a series' outline crosses the gap
|
|
32
|
+
// between two spokes somewhere, and the halo keeps a number readable where a line runs
|
|
33
|
+
// behind it while the line still shows round it. A chip with a wash of the surface
|
|
34
|
+
// veiled the outlines under it instead, and on a phone took a large part of a quadrant.
|
|
35
|
+
--wr-radar-chart-ring-label-color: var(--wr-chart-label);
|
|
36
|
+
--wr-radar-chart-ring-label-halo: var(--wr-chart-separator);
|
|
37
|
+
// The web, at the contrast of every chart's gridlines.
|
|
38
|
+
--wr-radar-chart-grid-color: var(--wr-chart-grid);
|
|
40
39
|
--wr-radar-chart-grid-width: 1px;
|
|
41
|
-
// The series: an outline, a
|
|
40
|
+
// The series: an outline, a tint under it, and a dot at every value. In pixels,
|
|
42
41
|
// whatever the drawing's size, since every stroke here does not scale.
|
|
43
|
-
--wr-radar-chart-line-width:
|
|
42
|
+
--wr-radar-chart-line-width: var(--wr-chart-stroke);
|
|
43
|
+
--wr-radar-chart-dot-size: var(--wr-chart-marker);
|
|
44
|
+
// How much of the series' colour the tint keeps. More on a dark surface: the same
|
|
45
|
+
// share of a colour over a dark page is a darker tint, not a lighter one, and at the
|
|
46
|
+
// light scheme's share two series over each other read as one murky patch.
|
|
44
47
|
--wr-radar-chart-area-opacity: 0.15;
|
|
45
|
-
--wr-radar-chart-
|
|
46
|
-
// What the open tooltip marks: its axis' spoke, and
|
|
47
|
-
|
|
48
|
-
--wr-radar-chart-
|
|
48
|
+
--wr-radar-chart-area-opacity-dark: 0.24;
|
|
49
|
+
// What the open tooltip marks: its axis' spoke, and each value on it as a larger dot
|
|
50
|
+
// inside a ring of the surface.
|
|
51
|
+
--wr-radar-chart-crosshair-color: var(--wr-chart-axis);
|
|
52
|
+
--wr-radar-chart-hover-ring: var(--wr-chart-separator);
|
|
53
|
+
--wr-radar-chart-hover-ring-width: 2px;
|
|
49
54
|
|
|
50
55
|
display: inline-flex;
|
|
51
56
|
// The containing block of the out-of-flow `dataTable` copy, as on the line chart: a
|
|
@@ -54,7 +59,8 @@
|
|
|
54
59
|
position: relative;
|
|
55
60
|
flex-direction: column;
|
|
56
61
|
align-items: center;
|
|
57
|
-
gap
|
|
62
|
+
// No `gap`: the room between the drawing and the legend is the legend's own margin, on
|
|
63
|
+
// whichever side `legendPosition` puts it. See `&__legend`.
|
|
58
64
|
max-width: 100%;
|
|
59
65
|
font-family: var(--wr-radar-chart-font-family);
|
|
60
66
|
color: var(--wr-radar-chart-color);
|
|
@@ -85,10 +91,21 @@
|
|
|
85
91
|
stroke-width: var(--wr-radar-chart-grid-width);
|
|
86
92
|
}
|
|
87
93
|
|
|
94
|
+
// The tint under a series: its own colour, which the template hands over, at the share
|
|
95
|
+
// the scheme asks for. Over the `fill` attribute, which is the colour itself. Never
|
|
96
|
+
// hittable: the fills lie over each other, so the one on top would answer for all of
|
|
97
|
+
// them, and the outline and the dots are what the hover-dim reads.
|
|
88
98
|
&__area {
|
|
89
|
-
|
|
99
|
+
$color: var(--wr-radar-chart-series-color, currentColor);
|
|
100
|
+
|
|
101
|
+
fill: light-dark(
|
|
102
|
+
color-mix(in srgb, $color calc(var(--wr-radar-chart-area-opacity) * 100%), transparent),
|
|
103
|
+
color-mix(in srgb, $color calc(var(--wr-radar-chart-area-opacity-dark) * 100%), transparent)
|
|
104
|
+
);
|
|
105
|
+
pointer-events: none;
|
|
90
106
|
}
|
|
91
107
|
|
|
108
|
+
// The opacity transition for the hover-dim is the shared rule's, on `data-wr-series`.
|
|
92
109
|
&__line {
|
|
93
110
|
stroke-width: var(--wr-radar-chart-line-width);
|
|
94
111
|
}
|
|
@@ -97,19 +114,24 @@
|
|
|
97
114
|
stroke-width: var(--wr-radar-chart-dot-size);
|
|
98
115
|
}
|
|
99
116
|
|
|
117
|
+
// Solid and stronger than the web, over the spoke it marks. Neither it nor the hovered
|
|
118
|
+
// dots are hittable, so the outline or the dot under them still answers the pointer.
|
|
100
119
|
&__crosshair {
|
|
101
120
|
stroke: var(--wr-radar-chart-crosshair-color);
|
|
102
121
|
stroke-width: 1px;
|
|
103
|
-
|
|
122
|
+
pointer-events: none;
|
|
104
123
|
}
|
|
105
124
|
|
|
125
|
+
// A hovered value: 2px larger than a dot at rest, inside a ring of the surface.
|
|
106
126
|
&__hover-dot {
|
|
107
|
-
stroke
|
|
127
|
+
stroke: var(--wr-radar-chart-hover-ring);
|
|
128
|
+
stroke-width: calc(var(--wr-radar-chart-dot-size) + 2px + 2 * var(--wr-radar-chart-hover-ring-width));
|
|
129
|
+
pointer-events: none;
|
|
108
130
|
}
|
|
109
131
|
|
|
110
132
|
&__hover-dot-center {
|
|
111
|
-
stroke: var(--wr-radar-chart-
|
|
112
|
-
|
|
133
|
+
stroke-width: calc(var(--wr-radar-chart-dot-size) + 2px);
|
|
134
|
+
pointer-events: none;
|
|
113
135
|
}
|
|
114
136
|
|
|
115
137
|
// Both layers cover the drawing exactly, so a label's percentages are the drawing's.
|
|
@@ -123,18 +145,17 @@
|
|
|
123
145
|
line-height: var(--wr-radar-chart-label-line-height);
|
|
124
146
|
}
|
|
125
147
|
|
|
126
|
-
//
|
|
127
|
-
// against the line it names
|
|
128
|
-
//
|
|
129
|
-
// percent is the layer's height, which is the drawing's. A fitted scale can run below
|
|
148
|
+
// Centred on the point of its ring the component hands over, between two spokes, so a
|
|
149
|
+
// value reads against the line it names and lies on no spoke, no dot and no axis name.
|
|
150
|
+
// The percentages are the layer's, which is the drawing's. A fitted scale can run below
|
|
130
151
|
// zero, and a value has no strong character of its own, so `plaintext` keeps the sign
|
|
131
152
|
// of `-20` before its digits on an RTL page.
|
|
132
153
|
&__ring-label {
|
|
133
154
|
position: absolute;
|
|
134
|
-
// rtl-ok:
|
|
135
|
-
left: 50
|
|
155
|
+
// rtl-ok: a point of the drawing, which does not mirror with `direction`
|
|
156
|
+
left: calc(var(--wr-radar-chart-x, 50) * 1%);
|
|
136
157
|
top: calc(var(--wr-radar-chart-y, 0) * 1%);
|
|
137
|
-
transform: translate(
|
|
158
|
+
transform: translate(-50%, -50%);
|
|
138
159
|
color: var(--wr-radar-chart-ring-label-color);
|
|
139
160
|
text-shadow:
|
|
140
161
|
0 0 2px var(--wr-radar-chart-ring-label-halo),
|
|
@@ -183,14 +204,35 @@
|
|
|
183
204
|
unicode-bidi: plaintext;
|
|
184
205
|
}
|
|
185
206
|
|
|
207
|
+
// The room between the legend and the drawing, on whichever side `legendPosition` puts
|
|
208
|
+
// it: the shared legend rule reads `--wr-chart-legend-space`, and `--wr-radar-chart-gap`
|
|
209
|
+
// is the chart's own name for it, from when the legend was always below.
|
|
186
210
|
&__legend {
|
|
187
|
-
|
|
211
|
+
--wr-chart-legend-space: var(--wr-radar-chart-gap);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Beside the legend the chart is a row: the drawing keeps its `size` and the legend is
|
|
216
|
+
// centred against it. The shared side rule makes the host a block-level flex box whose
|
|
217
|
+
// body takes the rest of the row, which suits a plot that fills its container; this
|
|
218
|
+
// drawing has a size of its own, so the chart stays as wide as its parts, and the
|
|
219
|
+
// drawing still shrinks before the page scrolls. The class is doubled as the shared rule
|
|
220
|
+
// doubles it, and the chart's own name outweighs it.
|
|
221
|
+
.wr-radar-chart.wr-chart--legend-side.wr-chart--legend-side {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
flex-direction: row;
|
|
224
|
+
align-items: center;
|
|
225
|
+
|
|
226
|
+
> .wr-radar-chart__surface {
|
|
227
|
+
flex: 0 1 auto;
|
|
228
|
+
min-width: 0;
|
|
188
229
|
}
|
|
189
230
|
}
|
|
190
231
|
|
|
191
232
|
// Forced colors keeps the SVG strokes as written, so the strokes written in theme colours
|
|
192
233
|
// would keep colours the forced palette no longer has: the web would vanish on a dark
|
|
193
|
-
// canvas, and the
|
|
234
|
+
// canvas, and the surface-coloured ring round a hovered dot would be a ring of the old
|
|
235
|
+
// page.
|
|
194
236
|
@media (forced-colors: active) {
|
|
195
237
|
.wr-radar-chart__ring,
|
|
196
238
|
.wr-radar-chart__spoke {
|
|
@@ -201,7 +243,7 @@
|
|
|
201
243
|
stroke: CanvasText;
|
|
202
244
|
}
|
|
203
245
|
|
|
204
|
-
.wr-radar-chart__hover-dot
|
|
246
|
+
.wr-radar-chart__hover-dot {
|
|
205
247
|
stroke: Canvas;
|
|
206
248
|
}
|
|
207
249
|
}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
// Styles for the entry points this component's own markup renders. The legend is a
|
|
5
5
|
// `ul[wr-chart-legend]`, so `@use 'ngwr/charts/scatter-chart'` alone draws it styled.
|
|
6
6
|
@use '../../chart-legend/styles' as chart-legend-styles; // WrChartLegend
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
7
|
+
// The chart theme every hook below defaults to (`--wr-chart-*`), the hover-dim rule, the
|
|
8
|
+
// empty / loading / error message, and the `<wr-chart-table>` that `dataTable` renders
|
|
9
|
+
// beside the plot, which its own rule clips out of sight.
|
|
10
|
+
@use '../../core/styles' as core-styles; // WrChartTable, WrChartState
|
|
10
11
|
@include theme.loaded('charts/scatter-chart');
|
|
11
12
|
|
|
12
13
|
.wr-scatter-chart {
|
|
@@ -19,18 +20,25 @@
|
|
|
19
20
|
--wr-scatter-chart-plot-inset-x: var(--wr-space-md);
|
|
20
21
|
--wr-scatter-chart-plot-inset-y: var(--wr-space-sm);
|
|
21
22
|
--wr-scatter-chart-legend-margin-bottom: var(--wr-space-md);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// The gridlines across the plot and the one at zero: the chart theme's, as on every
|
|
24
|
+
// chart. The ones up the plot, at the x ticks, are not painted: values are read across,
|
|
25
|
+
// and a second set of lines is a cage round the points. Give this hook a colour, the
|
|
26
|
+
// grid's own for one, to draw them.
|
|
27
|
+
--wr-scatter-chart-grid-color: var(--wr-chart-grid);
|
|
28
|
+
--wr-scatter-chart-zero-color: var(--wr-chart-zero);
|
|
29
|
+
--wr-scatter-chart-grid-x-color: transparent;
|
|
30
|
+
--wr-scatter-chart-tick-gap: var(--wr-space-sm);
|
|
31
|
+
--wr-scatter-chart-tick-font-size: var(--wr-chart-label-size);
|
|
25
32
|
--wr-scatter-chart-tick-line-height: var(--wr-text-xs-leading);
|
|
26
|
-
--wr-scatter-chart-tick-color: var(--wr-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--wr-scatter-chart-title-
|
|
33
|
+
--wr-scatter-chart-tick-color: var(--wr-chart-label);
|
|
34
|
+
// An axis' name: the scale's size, heavier and in full ink, so it reads as the name of
|
|
35
|
+
// the numbers beside it.
|
|
36
|
+
--wr-scatter-chart-title-font-size: var(--wr-chart-label-size);
|
|
37
|
+
--wr-scatter-chart-title-font-weight: var(--wr-font-weight-semibold);
|
|
38
|
+
--wr-scatter-chart-title-color: var(--wr-color-on-surface);
|
|
30
39
|
--wr-scatter-chart-title-gap: var(--wr-space-xs);
|
|
31
40
|
// Every marker is ringed in the surface colour, so two that touch stay two shapes
|
|
32
|
-
// rather than one blot
|
|
33
|
-
// and a ring is a shape that survives greyscale.
|
|
41
|
+
// rather than one blot, and a ring is a shape that survives greyscale.
|
|
34
42
|
//
|
|
35
43
|
// A plain point is drawn solid. Drawn at 0.7, the primary marker measured 2.9:1 against
|
|
36
44
|
// the light surface and 2.6:1 against the dark one, under the 3:1 WCAG 1.4.11 asks of a
|
|
@@ -39,8 +47,11 @@
|
|
|
39
47
|
// every smaller one behind it, which costs more than the contrast does.
|
|
40
48
|
--wr-scatter-chart-point-opacity: 1;
|
|
41
49
|
--wr-scatter-chart-bubble-opacity: 0.7;
|
|
42
|
-
--wr-scatter-chart-point-ring: var(--wr-
|
|
50
|
+
--wr-scatter-chart-point-ring: var(--wr-chart-separator);
|
|
43
51
|
--wr-scatter-chart-point-ring-width: 1px;
|
|
52
|
+
// The point being read is drawn again a little larger, inside a ring of the surface
|
|
53
|
+
// this wide, which parts it from the points it overlaps.
|
|
54
|
+
--wr-scatter-chart-halo-color: var(--wr-chart-separator);
|
|
44
55
|
--wr-scatter-chart-halo-width: 2px;
|
|
45
56
|
|
|
46
57
|
// The plot's padding: the inset tokens, or as far as the largest marker drawn reaches
|
|
@@ -49,8 +60,8 @@
|
|
|
49
60
|
// exactly on it, so one a fraction of a step inside sits a few px from it, and a 20px
|
|
50
61
|
// bubble there would paint over the tick labels and past the chart's own box, where an
|
|
51
62
|
// `overflow: hidden` ancestor cuts it off.
|
|
52
|
-
$reach-x: calc(var(--wr-scatter-chart-reach-x, 0) * 1px
|
|
53
|
-
$reach-y: calc(var(--wr-scatter-chart-reach-y, 0) * 1px
|
|
63
|
+
$reach-x: calc(var(--wr-scatter-chart-reach-x, 0) * 1px);
|
|
64
|
+
$reach-y: calc(var(--wr-scatter-chart-reach-y, 0) * 1px);
|
|
54
65
|
$inset: max(var(--wr-scatter-chart-plot-inset-x), $reach-x);
|
|
55
66
|
$inset-y: max(var(--wr-scatter-chart-plot-inset-y), $reach-y);
|
|
56
67
|
|
|
@@ -72,47 +83,93 @@
|
|
|
72
83
|
font-family: var(--wr-scatter-chart-font-family);
|
|
73
84
|
color: var(--wr-scatter-chart-color);
|
|
74
85
|
|
|
86
|
+
// The legend is the shared one, placed by `legendPosition`. The room between it and
|
|
87
|
+
// the plot, on whichever side that is: the shared rule reads `--wr-chart-legend-space`,
|
|
88
|
+
// and the hook is the chart's own name for it, from when the legend was always above.
|
|
75
89
|
&__legend {
|
|
76
|
-
|
|
90
|
+
--wr-chart-legend-space: var(--wr-scatter-chart-legend-margin-bottom);
|
|
77
91
|
}
|
|
78
92
|
|
|
79
|
-
// The y
|
|
80
|
-
// alone. A grid follows `direction`, so the gutter is on the right under
|
|
81
|
-
// rule of its own; the drawing itself keeps its x axis running left to
|
|
82
|
-
// SVG chart here does — the HTML layouts (bar, bullet, treemap) are the
|
|
93
|
+
// The y axis' name, the y labels and the plot, and the x labels and the x axis' name
|
|
94
|
+
// under the plot alone. A grid follows `direction`, so the gutter is on the right under
|
|
95
|
+
// RTL with no rule of its own; the drawing itself keeps its x axis running left to
|
|
96
|
+
// right, as every SVG chart here does — the HTML layouts (bar, bullet, treemap) are the
|
|
97
|
+
// ones that mirror.
|
|
83
98
|
&__body {
|
|
84
99
|
display: grid;
|
|
85
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
100
|
+
grid-template-columns: auto auto minmax(0, 1fr);
|
|
86
101
|
}
|
|
87
102
|
|
|
88
|
-
// The
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
|
|
103
|
+
// The top tick is centred on the top gridline, which sits the plot's block padding
|
|
104
|
+
// below the top of the chart: half a line of the number needs at least that much room,
|
|
105
|
+
// or it hangs out of the chart's own box and a card that clips cuts it. Nothing at the
|
|
106
|
+
// defaults, where the padding is exactly half a line.
|
|
107
|
+
&--axis &__body {
|
|
108
|
+
padding-block-start: max(
|
|
109
|
+
0px,
|
|
110
|
+
calc(var(--wr-scatter-chart-tick-line-height) / 2 - var(--wr-scatter-chart-plot-inset-y))
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Empty, loading or failed: the shared message, over the plot. A grid item in the
|
|
115
|
+
// plot's own cell rather than a child of it, since the plot is an `img`; the shared
|
|
116
|
+
// rule's `inset` has nothing to resolve against here and the cell sizes it instead.
|
|
117
|
+
&__body > .wr-chart-state {
|
|
118
|
+
position: relative;
|
|
119
|
+
inset: auto;
|
|
120
|
+
grid-column: 3;
|
|
121
|
+
grid-row: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// The axes' names. A name is the host's own text, in whatever language, so it takes its
|
|
125
|
+
// direction from that text (`plaintext`): on an RTL page "Revenue, k$" read
|
|
126
|
+
// "$Revenue, k", its trailing sign carried to the page's start.
|
|
93
127
|
&__y-title,
|
|
94
128
|
&__x-title {
|
|
95
129
|
font-size: var(--wr-scatter-chart-title-font-size);
|
|
96
130
|
font-weight: var(--wr-scatter-chart-title-font-weight);
|
|
97
131
|
color: var(--wr-scatter-chart-title-color);
|
|
98
|
-
overflow-wrap: anywhere;
|
|
99
132
|
unicode-bidi: plaintext;
|
|
100
133
|
}
|
|
101
134
|
|
|
102
|
-
//
|
|
103
|
-
//
|
|
135
|
+
// The y axis' name runs ALONG its axis, reading upwards, in a column of its own outside
|
|
136
|
+
// the scale. Set level above the plot it sat where a legend row sits and read as an
|
|
137
|
+
// entry of one; turned, it is the name of the axis it lies along and of nothing else.
|
|
138
|
+
// Written vertically and turned half a turn, with every glyph laid on its side, so a
|
|
139
|
+
// name in any script reads bottom to top. One line: the column is as wide as a line is
|
|
140
|
+
// tall, and a name longer than the plot is tall is cut with an ellipsis rather than
|
|
141
|
+
// growing the plot - it contributes no height to its row (`height: 0`) and then takes
|
|
142
|
+
// the row's (`min-height: 100%`).
|
|
104
143
|
&__y-title {
|
|
105
|
-
grid-column: 1
|
|
144
|
+
grid-column: 1;
|
|
106
145
|
grid-row: 1;
|
|
107
|
-
justify-self:
|
|
108
|
-
|
|
109
|
-
|
|
146
|
+
justify-self: center;
|
|
147
|
+
height: 0;
|
|
148
|
+
min-height: 100%;
|
|
149
|
+
// In a vertical line the block axis runs across the page: this is the room between
|
|
150
|
+
// the name and the scale, on the name's plot side.
|
|
151
|
+
margin-block-start: var(--wr-scatter-chart-title-gap);
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
line-height: var(--wr-scatter-chart-tick-line-height);
|
|
154
|
+
text-align: center;
|
|
155
|
+
text-overflow: ellipsis;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
writing-mode: vertical-rl;
|
|
158
|
+
text-orientation: sideways;
|
|
159
|
+
transform: rotate(180deg);
|
|
160
|
+
|
|
161
|
+
// The gutter is on the other side of the plot, and so is the room.
|
|
162
|
+
&:dir(rtl) {
|
|
163
|
+
margin-block-start: 0;
|
|
164
|
+
margin-block-end: var(--wr-scatter-chart-title-gap);
|
|
165
|
+
}
|
|
110
166
|
}
|
|
111
167
|
|
|
112
168
|
&__x-title {
|
|
113
|
-
grid-column:
|
|
114
|
-
grid-row:
|
|
169
|
+
grid-column: 3;
|
|
170
|
+
grid-row: 3;
|
|
115
171
|
margin-block-start: var(--wr-scatter-chart-title-gap);
|
|
172
|
+
overflow-wrap: anywhere;
|
|
116
173
|
text-align: center;
|
|
117
174
|
}
|
|
118
175
|
|
|
@@ -122,8 +179,8 @@
|
|
|
122
179
|
// the drawing, inside the plot's block padding, then up by half itself — the line
|
|
123
180
|
// chart's y axis, for the same reasons.
|
|
124
181
|
&__y-axis {
|
|
125
|
-
grid-column:
|
|
126
|
-
grid-row:
|
|
182
|
+
grid-column: 2;
|
|
183
|
+
grid-row: 1;
|
|
127
184
|
display: grid;
|
|
128
185
|
grid-template-rows: minmax(0, 1fr);
|
|
129
186
|
padding-inline-end: var(--wr-scatter-chart-tick-gap);
|
|
@@ -149,8 +206,8 @@
|
|
|
149
206
|
}
|
|
150
207
|
|
|
151
208
|
&__plot {
|
|
152
|
-
grid-column:
|
|
153
|
-
grid-row:
|
|
209
|
+
grid-column: 3;
|
|
210
|
+
grid-row: 1;
|
|
154
211
|
position: relative;
|
|
155
212
|
padding: $inset-y $inset;
|
|
156
213
|
}
|
|
@@ -170,6 +227,15 @@
|
|
|
170
227
|
stroke-width: 1px;
|
|
171
228
|
}
|
|
172
229
|
|
|
230
|
+
// Zero, wherever it falls on the y axis: the line the values are read against.
|
|
231
|
+
&__grid-line--zero {
|
|
232
|
+
stroke: var(--wr-scatter-chart-zero-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&__grid-line--x {
|
|
236
|
+
stroke: var(--wr-scatter-chart-grid-x-color);
|
|
237
|
+
}
|
|
238
|
+
|
|
173
239
|
&--bubbles {
|
|
174
240
|
--wr-scatter-chart-point-opacity: var(--wr-scatter-chart-bubble-opacity);
|
|
175
241
|
}
|
|
@@ -181,17 +247,22 @@
|
|
|
181
247
|
stroke-linejoin: round;
|
|
182
248
|
}
|
|
183
249
|
|
|
184
|
-
//
|
|
185
|
-
//
|
|
250
|
+
// The point being read: its marker again, solid whatever the chart draws its points at,
|
|
251
|
+
// inside a ring of the surface. The ring is a stroke twice its width painted UNDER the
|
|
252
|
+
// fill, so all of it that shows is outside the marker. Never hittable: it is drawn
|
|
253
|
+
// under the pointer, and the point it marks is found by position rather than by what
|
|
254
|
+
// is under the pointer.
|
|
186
255
|
&__halo {
|
|
187
256
|
pointer-events: none;
|
|
188
|
-
stroke
|
|
257
|
+
stroke: var(--wr-scatter-chart-halo-color);
|
|
258
|
+
stroke-width: calc(2 * var(--wr-scatter-chart-halo-width));
|
|
189
259
|
stroke-linejoin: round;
|
|
260
|
+
paint-order: stroke;
|
|
190
261
|
}
|
|
191
262
|
|
|
192
263
|
&__x-axis {
|
|
193
|
-
grid-column:
|
|
194
|
-
grid-row:
|
|
264
|
+
grid-column: 3;
|
|
265
|
+
grid-row: 2;
|
|
195
266
|
position: relative;
|
|
196
267
|
margin-block-start: var(--wr-scatter-chart-tick-gap);
|
|
197
268
|
font-size: var(--wr-scatter-chart-tick-font-size);
|
|
@@ -241,6 +312,8 @@
|
|
|
241
312
|
@media (forced-colors: active) {
|
|
242
313
|
.wr-scatter-chart {
|
|
243
314
|
--wr-scatter-chart-point-ring: Canvas;
|
|
315
|
+
--wr-scatter-chart-halo-color: Canvas;
|
|
244
316
|
--wr-scatter-chart-grid-color: GrayText;
|
|
317
|
+
--wr-scatter-chart-zero-color: CanvasText;
|
|
245
318
|
}
|
|
246
319
|
}
|