ngwr 16.3.0 → 16.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/carousel/styles/_index.scss +53 -1
- package/charts/bar-chart/styles/_index.scss +494 -305
- package/charts/boxplot-chart/styles/_index.scss +114 -48
- package/charts/bullet-chart/styles/_index.scss +113 -42
- package/charts/calendar-heatmap/styles/_index.scss +111 -20
- package/charts/candlestick-chart/styles/_index.scss +61 -26
- package/charts/chart-legend/styles/_index.scss +119 -1
- package/charts/core/styles/_index.scss +201 -5
- package/charts/donut-chart/styles/_index.scss +76 -21
- package/charts/funnel-chart/styles/_index.scss +66 -38
- package/charts/gauge/styles/_index.scss +12 -1
- package/charts/heatmap-chart/styles/_index.scss +90 -53
- package/charts/line-chart/styles/_index.scss +143 -139
- package/charts/meter-group/styles/_index.scss +87 -25
- package/charts/radar-chart/styles/_index.scss +82 -40
- package/charts/scatter-chart/styles/_index.scss +117 -44
- package/charts/sparkline/styles/_index.scss +7 -1
- package/charts/treemap-chart/styles/_index.scss +94 -42
- package/charts/waterfall-chart/styles/_index.scss +150 -87
- package/color-picker/styles/_index.scss +7 -3
- package/copy-value/styles/_index.scss +21 -2
- package/date-stamp/styles/_index.scss +2 -1
- package/dialog/styles/_index.scss +6 -0
- package/drawer/styles/_index.scss +5 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +27 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +86 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +56 -25
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +299 -18
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +98 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +44 -4
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +60 -17
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
- package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +38 -2
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +56 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +13 -5
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +49 -6
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +7 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +27 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +643 -14
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +13 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +13 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +13 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +13 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +13 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +13 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +13 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +13 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +13 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +13 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +13 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +13 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +13 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +13 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +13 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +13 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +13 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +13 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +13 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +13 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +22 -5
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +41 -5
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +67 -12
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +3 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +100 -3
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +71 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +173 -11
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +25 -16
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +52 -8
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +64 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +16 -9
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +13 -4
- package/i18n/cs.json +13 -4
- package/i18n/de.json +13 -4
- package/i18n/en.json +13 -4
- package/i18n/es.json +13 -4
- package/i18n/fr.json +13 -4
- package/i18n/he.json +13 -4
- package/i18n/hi.json +13 -4
- package/i18n/id.json +13 -4
- package/i18n/it.json +13 -4
- package/i18n/ja.json +13 -4
- package/i18n/ko.json +13 -4
- package/i18n/nl.json +13 -4
- package/i18n/pl.json +13 -4
- package/i18n/pt.json +13 -4
- package/i18n/ru.json +13 -4
- package/i18n/sv.json +13 -4
- package/i18n/tr.json +13 -4
- package/i18n/uk.json +13 -4
- package/i18n/vi.json +13 -4
- package/i18n/zh-TW.json +13 -4
- package/i18n/zh.json +13 -4
- package/llms-full.txt +12 -12
- package/llms.txt +64 -27
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +24 -13
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/symbol-map.json +2 -0
- package/select/styles/_index.scss +13 -0
- package/skills/ngwr/SKILL.md +30 -3
- package/skills/ngwr/references/catalog.md +2 -2
- package/table/styles/_index.scss +24 -0
- package/theme/styles/_focus.scss +11 -1
- package/tour/styles/_index.scss +6 -0
- package/types/ngwr-carousel-testing.d.ts +29 -6
- package/types/ngwr-carousel.d.ts +52 -5
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +29 -7
- package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
- package/types/ngwr-charts-bar-chart.d.ts +220 -48
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
- package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
- package/types/ngwr-charts-bullet-chart.d.ts +72 -12
- package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
- package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
- package/types/ngwr-charts-chart-legend.d.ts +142 -5
- package/types/ngwr-charts-core.d.ts +259 -21
- package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -16
- package/types/ngwr-charts-funnel-chart.d.ts +62 -6
- package/types/ngwr-charts-gauge-testing.d.ts +5 -1
- package/types/ngwr-charts-gauge.d.ts +72 -10
- package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
- package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
- package/types/ngwr-charts-line-chart.d.ts +215 -86
- package/types/ngwr-charts-meter-group.d.ts +96 -7
- package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
- package/types/ngwr-charts-radar-chart.d.ts +148 -28
- package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
- package/types/ngwr-charts-scatter-chart.d.ts +188 -18
- package/types/ngwr-charts-sparkline.d.ts +26 -4
- package/types/ngwr-charts-treemap-chart.d.ts +121 -23
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
- package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
- package/types/ngwr-color-picker.d.ts +27 -0
- package/types/ngwr-context-menu-testing.d.ts +10 -9
- package/types/ngwr-context-menu.d.ts +19 -0
- package/types/ngwr-copy-value.d.ts +8 -0
- package/types/ngwr-date-picker.d.ts +34 -2
- package/types/ngwr-dialog.d.ts +30 -10
- package/types/ngwr-drawer.d.ts +32 -1
- package/types/ngwr-dropdown-testing.d.ts +8 -5
- package/types/ngwr-dropdown.d.ts +31 -6
- package/types/ngwr-file-upload.d.ts +8 -2
- package/types/ngwr-graph-testing.d.ts +28 -0
- package/types/ngwr-graph.d.ts +263 -91
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-overlay.d.ts +16 -1
- package/types/ngwr-popconfirm-testing.d.ts +11 -2
- package/types/ngwr-popconfirm.d.ts +28 -1
- package/types/ngwr-popover.d.ts +59 -9
- package/types/ngwr-select.d.ts +37 -0
- package/types/ngwr-table-testing.d.ts +52 -1
- package/types/ngwr-table.d.ts +102 -10
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +32 -4
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +35 -2
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +14 -11
- package/window/styles/_index.scss +5 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-charts-candlestick-chart.mjs","names":[],"sources":["../../../projects/lib/charts/candlestick-chart/candlestick-chart.ts","../../../projects/lib/charts/candlestick-chart/candlestick-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\n\nimport { WrChartTable, type WrChartTableData, wrChartAxis, useChartNumbers } from 'ngwr/charts/core';\nimport { wrReadI18nText, useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip } from 'ngwr/popover';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrCandlestickDatum } from './types';\n\n/**\n * The drawing's width, in px, before a browser has measured it: what the server and the\n * first paint decide the body width and the x labels against. A phone's plot is about\n * 300px and a desktop column's about 700px.\n */\nconst ASSUMED_WIDTH = 560;\n\n/** How much of its slot a body takes: the stylesheet's own share, which this mirrors. */\nconst BODY_SHARE = 0.7;\n\n/** The widest a body is drawn, in px: `--wr-candlestick-chart-body-max-width`'s default, which this mirrors. */\nconst BODY_MAX = 24;\n\n/**\n * Below this width, in px, a hollow body has no inside to show: two 1px edges and at\n * most a pixel between them read as one bar. The chart is drawn `--dense` then.\n */\nconst DENSE_BELOW = 4;\n\n/** A label's width per character, in px, before a browser has measured the widest one. */\nconst CHAR_WIDTH = 7;\n\n/** The least room, in px, between two neighbouring x labels. */\nconst LABEL_GAP = 12;\n\n/** A percentage to three decimals, so an attribute stays short. */\nconst percent = (value: number): number => Math.round(value * 1000) / 1000;\n\n/**\n * The most fraction digits a price is written with by default: past it a decimal is\n * float noise — 0.1 + 0.2 is 0.30000000000000004 — rather than precision, and every\n * instrument quotes fewer. Crypto's eight places fit.\n */\nconst MAX_PRICE_DIGITS = 10;\n\n/**\n * How many fraction digits the shortest decimal that reads back as `value` has: 5 for\n * 1.08345, 0 for 120, 8 for 1.2e-7. `toString()` is that shortest form, written with an\n * exponent past 1e21 and below 1e-6, which this reads too.\n */\nfunction fractionDigits(value: number): number {\n const [mantissa, exponent = '0'] = Math.abs(value).toString().split('e');\n return Math.max(0, (mantissa.split('.')[1]?.length ?? 0) - Number(exponent));\n}\n\n/** What a browser measured: the drawing's width, the widest x label's and one body's, in px. */\ninterface Measured {\n readonly width: number;\n readonly label: number;\n readonly body: number;\n}\n\n/** One candle as the chart draws it: its prices and where it sits. */\ninterface DrawnCandle {\n /** Its position in `data`, which is its slot on the x axis and what it is tracked by. */\n readonly index: number;\n readonly label: string;\n readonly open: number;\n readonly high: number;\n readonly low: number;\n readonly close: number;\n /** Whether it closed at or above its open: drawn hollow in the increase colour, else filled in the decrease one. */\n readonly increase: boolean;\n /** Its centre, as a percentage of the drawing's width from the left. */\n readonly left: number;\n /** Its top — the higher of the high and the body — as a percentage of the drawing's height from the top. */\n readonly top: number;\n /** How far it reaches down from `top`, as a percentage of the drawing's height. */\n readonly height: number;\n /** How much of its own height the upper wick takes, from its top to the body, in percent. */\n readonly upper: number;\n /** How much of its own height the lower wick takes, from the body to its bottom, in percent. */\n readonly lower: number;\n}\n\n/**\n * Prices over time as candles: one per period, its wick from the low to the high and its\n * body from the open to the close. No external dependency, and no SVG: every candle is a\n * box placed by percentage, so its width can be a share of its slot held between 1px and\n * a ceiling.\n *\n * @example\n * ```html\n * <wr-candlestick-chart\n * ariaLabel=\"ACME, daily\"\n * [data]=\"[\n * { label: 'Mon', open: 102, high: 108, low: 99, close: 106 },\n * { label: 'Tue', open: 106, high: 107, low: 98, close: 100 }\n * ]\"\n * />\n * ```\n *\n * **A rise and a fall are told apart twice.** A rising candle, one that closed at or\n * above its open, is drawn HOLLOW in the increase colour, success by default; a falling\n * one FILLED in the decrease colour, danger by default — the words, the modifiers and\n * the hooks the waterfall chart uses for a change up and a change down. The two intents\n * sit within 1.004:1 of each other in luminance, so the fill is what a reader without\n * red-green vision reads, and what survives greyscale and print. `increaseColor` and\n * `decreaseColor` swap the colours — for a market that draws rises in red — and leave\n * the fill alone. So the fill always has room\n * to show, every body is drawn at least tall enough to hold it: its two edges and a 2px\n * inside (4px at the default edge), or two dashes and the gap between them while dense\n * (5px). It grows into its own wicks, so the high and the low stay put. A candle that\n * barely moved is drawn a few pixels taller than its prices, in both directions alike,\n * rather than as a line whose direction only its colour would tell.\n *\n * **Many candles thin out rather than pile up.** A body takes 70% of its slot, between\n * 1px and `--wr-candlestick-chart-body-max-width`, so the gaps close as the candles\n * crowd. Once a body is under 4px wide it has no inside to leave hollow, and the chart\n * is drawn `--dense`: a rising body is dotted rather than outlined, so the second\n * channel holds. The x labels are thinned to every n-th, the smallest n that keeps the\n * widest label clear of its neighbours. Both are decided on the drawing's measured\n * width, after render, so the server and the first paint assume a 560px drawing. Past a\n * candle per pixel the candles overlap; aggregate the periods first.\n *\n * The y axis is fitted to the lows and highs shown with no zero forced in, since a price\n * has no baseline, and snapped outward to a readable step, so no wick ends on the frame.\n *\n * The drawing is one named `role=\"img\"` and takes no tab stop; the tooltip, the period\n * with its open, high, low and close, is pointer only. `dataTable` renders every price\n * as a table only assistive technology reaches.\n *\n * @see https://ngwr.dev/charts/candlestick-chart\n */\n@Component({\n selector: 'wr-candlestick-chart',\n templateUrl: './candlestick-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-candlestick-chart',\n // A body too narrow to leave hollow is dotted instead; see `dense`.\n '[class.wr-candlestick-chart--dense]': 'dense()',\n // Variables of their own rather than the hooks, which an author sets from outside: a\n // `null` binding wipes a value of its own name from the host's `style` attribute.\n '[style.--wr-candlestick-chart-input-increase-color]': 'increaseColor()',\n '[style.--wr-candlestick-chart-input-decrease-color]': 'decreaseColor()',\n },\n imports: [WrChartTable],\n})\nexport class WrCandlestickChart {\n /**\n * The periods, oldest first: one evenly spaced slot each. A period whose four prices\n * are not all finite keeps its slot and its label, and draws no candle.\n */\n readonly data = input<readonly WrCandlestickDatum[]>([]);\n\n /**\n * Accessible name of the chart. The prices are nowhere in text unless `dataTable`\n * puts them there, so say what the chart shows: the instrument and the period.\n * Falls back to `candlestickChart.label` (\"Candlestick chart\"). It is also the data\n * table's caption.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'candlestickChart.label', 'Candlestick chart');\n\n /**\n * The colour of a rising candle, any CSS colour. `null` keeps\n * `--wr-candlestick-chart-increase-color`, which is `var(--wr-color-success)`. A rising\n * candle is hollow whatever its colour. @default null\n */\n readonly increaseColor = input<string | null>(null);\n\n /**\n * The colour of a falling candle, any CSS colour. `null` keeps\n * `--wr-candlestick-chart-decrease-color`, which is `var(--wr-color-danger)`. A falling\n * candle is filled whatever its colour. @default null\n */\n readonly decreaseColor = input<string | null>(null);\n\n /**\n * Writes every price the chart shows: the y-axis ticks, the tooltip and the data\n * table. `null` uses `Intl.NumberFormat` in `LOCALE_ID`: compact ticks (`1.2K`) unless\n * the full numbers are shorter, and in the tooltip and the table every price at the\n * data's own precision — as many fraction digits as the most precise price given, up\n * to ten, and never fewer than the axis step needs — so a forex quote of 1.08345 is\n * not written `1.083`.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The axis' compact ticks and the prices at the data's own precision, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n /** The plot's height in px, at least 80. @default 240 */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /**\n * Show the gridlines and the y-axis ticks. The period labels under the candles are the\n * time axis, so they stay either way, as the line chart's `xLabels` do. @default true\n */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /** Show a tooltip with the period's open, high, low and close under the pointer. Pointer only. @default true */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Render every period's prices as a table only assistive technology reaches, beside\n * the drawing: a row per period, headed by its label, and a column each for the open,\n * the high, the low and the close. A price that is not a finite number is an empty\n * cell. The drawing is one named image, so without it the prices are nowhere a screen\n * reader can walk. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /** The words for the four prices, from the catalog: in the tooltip and as the data table's columns. */\n private readonly openText = wrReadI18nText('candlestickChart.open', 'Open');\n private readonly highText = wrReadI18nText('candlestickChart.high', 'High');\n private readonly lowText = wrReadI18nText('candlestickChart.low', 'Low');\n private readonly closeText = wrReadI18nText('candlestickChart.close', 'Close');\n\n private readonly plot = viewChild<ElementRef<HTMLElement>>('plot');\n\n private readonly drawing = viewChild<ElementRef<HTMLElement>>('drawing');\n\n private readonly probe = viewChild<ElementRef<HTMLElement>>('probe');\n\n private readonly candleEls = viewChildren<ElementRef<HTMLElement>>('candleEl');\n\n /**\n * What a browser measured, once it has: `null` on the server and until the first\n * render, which decide against {@link ASSUMED_WIDTH} instead.\n */\n private readonly measured = signal<Measured | null>(null);\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/candlestick-chart');\n // Measured after render, in a browser: again when the candles or the labels change,\n // and when the drawing changes width. Never on the server — said here as well as by\n // the render hooks, which a server-platform test still runs.\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const destroyRef = inject(DestroyRef);\n\n afterRenderEffect(() => {\n this.candles();\n this.probeText();\n untracked(() => this.measure());\n });\n\n afterNextRender(() => {\n const drawing = this.drawing()?.nativeElement;\n if (!drawing || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => this.measure());\n observer.observe(drawing);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /** How many slots the x axis has: one per period, drawn or not. */\n protected readonly slots = computed(() => this.data().length);\n\n /** One slot's share of the drawing's width, in percent: what the stylesheet sizes a body against. */\n protected readonly slot = computed(() => (this.slots() === 0 ? 100 : percent(100 / this.slots())));\n\n /**\n * The y axis, from `wrChartAxis` over every candle drawn: fitted from the lowest of the\n * lows to the highest of the highs with no zero forced in, since a price has no\n * baseline, snapped outward at both ends and lifted a step at either end a wick would\n * end on (`symmetric`). A single price is centred with a step either side. With\n * nothing to draw, the 0 to 1 frame.\n *\n * A high below the body or a low above it counts as the body's edge, so nothing is\n * drawn outside the frame.\n */\n protected readonly axis = computed(() => {\n let lo = Number.POSITIVE_INFINITY;\n let hi = Number.NEGATIVE_INFINITY;\n for (const d of this.data()) {\n if (!WrCandlestickChart.drawable(d)) continue;\n lo = Math.min(lo, d.low, d.open, d.close);\n hi = Math.max(hi, d.high, d.open, d.close);\n }\n return wrChartAxis(lo, hi, { symmetric: true });\n });\n\n /**\n * The candles as drawn: every period whose four prices are finite, placed on its slot\n * and on the axis, with its wicks as shares of its own height so the stylesheet can\n * draw both and the body between them.\n */\n protected readonly candles = computed<readonly DrawnCandle[]>(() => {\n const { min, max } = this.axis();\n const slots = this.slots();\n const y = (value: number): number => ((max - value) / (max - min)) * 100;\n return this.data().flatMap((d, index) => {\n if (!WrCandlestickChart.drawable(d)) return [];\n const top = Math.max(d.high, d.open, d.close);\n const bottom = Math.min(d.low, d.open, d.close);\n const span = top - bottom;\n const share = (value: number): number => (span > 0 ? percent((value / span) * 100) : 0);\n return [\n {\n index,\n label: d.label,\n open: d.open,\n high: d.high,\n low: d.low,\n close: d.close,\n increase: d.close >= d.open,\n left: percent(((index + 0.5) / slots) * 100),\n top: percent(y(top)),\n height: percent(y(bottom) - y(top)),\n upper: share(top - Math.max(d.open, d.close)),\n lower: share(Math.min(d.open, d.close) - bottom),\n },\n ];\n });\n });\n\n /** Each drawn candle's position in {@link candles}, by its slot: how the tooltip finds a candle's element. */\n private readonly positions = computed(\n () => new Map(this.candles().map((candle, position) => [candle.index, position]))\n );\n\n /** One slot's width in px: measured, or against the assumed drawing. */\n private readonly slotPx = computed(() => (this.measured()?.width ?? ASSUMED_WIDTH) / Math.max(1, this.slots()));\n\n /**\n * Whether a body is too narrow to leave hollow — under 4px wide, measured off the\n * first candle, or worked out from the assumed drawing before a browser has measured\n * it. A dense chart dots its rising bodies instead (see the stylesheet). A chart with\n * no candle is never dense.\n */\n protected readonly dense = computed(() => {\n if (this.candles().length === 0) return false;\n const measured = this.measured()?.body ?? 0;\n const body = measured > 0 ? measured : wrClamp(this.slotPx() * BODY_SHARE, 1, BODY_MAX);\n return body < DENSE_BELOW;\n });\n\n /** The longest period label, by its characters: what the room for the x labels is estimated from before a browser has measured. */\n private readonly longestLabel = computed(() =>\n this.data().reduce((longest, d) => (d.label.length > longest.length ? d.label : longest), '')\n );\n\n /**\n * Every period label once, a line each: the hidden copy the x labels' room is measured\n * against. Laid out as wide as its widest line, so it measures the widest label rather\n * than the one with the most characters — `WWWWWWW` is wider than `iiiiiiii`. A line\n * break inside a label is a space here, as the printed label shows it.\n */\n protected readonly probeText = computed(() =>\n [...new Set(this.data().map(d => d.label.replace(/\\r\\n?|\\n/g, ' ')))].join('\\n')\n );\n\n /**\n * How wide a period label is taken to be, in px: the widest one as a browser measured\n * it, or seven pixels a character of the longest before it has. Every label is spaced as\n * if it were that wide.\n */\n private readonly labelPx = computed(() => {\n const measured = this.measured()?.label ?? 0;\n return measured > 0 ? measured : this.longestLabel().length * CHAR_WIDTH;\n });\n\n /**\n * Every how many slots a period label is printed: 1 while the widest label and a gap\n * fit one slot, else the smallest n whose n slots hold them.\n */\n protected readonly labelEvery = computed(() => Math.max(1, Math.ceil((this.labelPx() + LABEL_GAP) / this.slotPx())));\n\n /**\n * The period labels printed, left to right: every `labelEvery`-th, gaps included. Each\n * is laid out as wide as the widest, centred under its candle and moved inwards where\n * that would cross the frame, as the stylesheet draws it; the last is left out if\n * moving it brings it within the gap of the one before.\n *\n * They start from the first period, unless moving its label inwards would bring it\n * within the gap of the next printed one. Then they start from the first period whose\n * label fits between the frame and its candle unmoved, a slot or two in: dropping the\n * second label instead would open a gap of two steps at the start of the axis, and\n * keeping both would let them touch. With one candle and a label wider than the\n * drawing, that label is printed alone, ellipsised.\n */\n protected readonly xLabels = computed(() => {\n const every = this.labelEvery();\n const slots = this.slots();\n const slotPx = this.slotPx();\n const width = slotPx * slots;\n const label = Math.min(this.labelPx(), width);\n const data = this.data();\n /** Where a label's laid-out box starts, in px from the drawing's left. */\n const at = (index: number): number => wrClamp((index + 0.5) * slotPx - label / 2, 0, width - label);\n // A hair of slack on every comparison, so the regular spacing never fails on a rounding.\n const crowds = (start: number, previousEnd: number): boolean => start + 1e-6 < previousEnd + LABEL_GAP;\n const start =\n slots > every && crowds(at(every), at(0) + label) ? Math.max(0, Math.ceil(label / 2 / slotPx - 0.5 - 1e-6)) : 0;\n\n const labels: { readonly index: number; readonly label: string; readonly left: number }[] = [];\n let end = Number.NEGATIVE_INFINITY;\n for (let index = start; index < slots; index += every) {\n const left = at(index);\n if (crowds(left, end)) break;\n labels.push({ index, label: data[index].label, left: percent(((index + 0.5) / slots) * 100) });\n end = left + label;\n }\n return labels;\n });\n\n /** The room each printed label has, as a percentage of the drawing's width: `labelEvery` slots, at most all of it. */\n protected readonly xSlot = computed(() => Math.min(100, percent(this.slot() * this.labelEvery())));\n\n /** The y ticks, top to bottom: each value's label and its gridline's distance from the top, in percent. */\n protected readonly yTicks = computed(() => {\n const { min, max, step, ticks } = this.axis();\n const labels = this.numbers.ticks(ticks, step);\n return ticks.map((value, i) => ({ label: labels[i], top: percent(((max - value) / (max - min)) * 100) }));\n });\n\n /**\n * How many fraction digits an exact price is written with, at most: as many as the\n * most precise finite price in `data` has, and at least as many as the axis step,\n * held to {@link MAX_PRICE_DIGITS}. A ceiling rather than a count, so `120` stays `120`\n * beside `120.25`. The shared `value` writer stops at three, which wrote the four\n * prices of a forex candle — 1.08345, 1.08391, 1.08301, 1.08362 — as two numbers,\n * coarser than the axis beside them.\n */\n private readonly priceDigits = computed(() => {\n let digits = fractionDigits(this.axis().step);\n for (const d of this.data()) {\n for (const price of [d.open, d.high, d.low, d.close]) {\n if (Number.isFinite(price)) digits = Math.max(digits, fractionDigits(price));\n }\n }\n return Math.min(digits, MAX_PRICE_DIGITS);\n });\n\n /** A price as the tooltip and the data table write it: through `valueFormat`, else at the data's precision. */\n private price(value: number): string {\n return this.numbers.exact(value, this.priceDigits());\n }\n\n /**\n * One tooltip for the candle under the pointer: the period as its heading, then a row\n * each for the open, the high, the low and the close, every price written in full. It\n * points at the candle itself, from above its high, and follows it if the data moves\n * it. No swatch: the colour is the candle's direction, and the four prices say it.\n *\n * The candle is found by POSITION — the slot under the pointer, anywhere over the\n * drawing — so a thin candle needs no aim, and a candle under the open chip can still\n * be reached by moving onto it.\n */\n protected readonly tip = useChartTooltip(\n this.tooltip,\n index => {\n const position = this.positions().get(index);\n if (position === undefined) return null;\n const candle = this.candles()[position];\n const anchor = this.candleEls()[position]?.nativeElement;\n if (!candle || !anchor) return null;\n return {\n datum: {\n label: candle.label,\n value: '',\n rows: [\n { label: this.openText(), value: this.price(candle.open) },\n { label: this.highText(), value: this.price(candle.high) },\n { label: this.lowText(), value: this.price(candle.low) },\n { label: this.closeText(), value: this.price(candle.close) },\n ],\n },\n anchor,\n };\n },\n (x, y) => this.slotAt(x, y)\n );\n\n /** The slot the tooltip is reading, marked by a band behind its candle. */\n protected readonly activeSlot = computed(() => {\n const index = this.tip.active();\n return index === null ? null : { left: percent((index / Math.max(1, this.slots())) * 100) };\n });\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a row per period headed\n * by its label, and the open, high, low and close written as the tooltip writes them.\n * A period with no candle keeps its row, with an empty cell for each price that is not\n * a finite number.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const cell = (value: number): string => (Number.isFinite(value) ? this.price(value) : '');\n return {\n caption: this.resolvedAriaLabel(),\n columns: [this.openText(), this.highText(), this.lowText(), this.closeText()],\n groups: [\n {\n rows: this.data().map(d => ({\n header: d.label,\n cells: [cell(d.open), cell(d.high), cell(d.low), cell(d.close)],\n })),\n },\n ],\n };\n });\n\n /**\n * The candle under the pointer. A MOUSE event, as every chart's is: a tap fires the\n * compatibility `mousemove` and no `pointermove`. Over a slot with no candle, the open\n * tooltip starts its grace period.\n */\n protected onPointerMove(event: MouseEvent): void {\n if (!this.tooltip()) return;\n const index = this.slotAt(event.clientX, event.clientY);\n if (index === null) this.tip.leave(event);\n else this.tip.enter(index);\n }\n\n /**\n * The slot under a viewport position, if a candle is drawn there: across the drawing's\n * width, and anywhere down the plot, its padding included. A drawing with no box\n * (nothing laid out yet) answers nothing.\n */\n private slotAt(clientX: number, clientY: number): number | null {\n const drawing = this.drawing()?.nativeElement;\n const plot = this.plot()?.nativeElement;\n const slots = this.slots();\n if (!drawing || !plot || slots === 0) return null;\n const box = drawing.getBoundingClientRect();\n const frame = plot.getBoundingClientRect();\n if (box.width <= 0 || box.height <= 0) return null;\n if (clientX < box.left || clientX > box.right || clientY < frame.top || clientY > frame.bottom) return null;\n const index = wrClamp(Math.floor(((clientX - box.left) / box.width) * slots), 0, slots - 1);\n return this.positions().has(index) ? index : null;\n }\n\n /**\n * Read the drawing's width, the widest label's and one body's off the layout. A\n * hidden chart measures 0 and keeps its last reading rather than thin to nothing; a\n * label or a body with nothing to measure — no period, no candle — reads 0 and leaves\n * the estimate in charge of what it decides.\n */\n private measure(): void {\n const drawing = this.drawing()?.nativeElement;\n if (!drawing) return;\n const width = drawing.getBoundingClientRect().width;\n if (width <= 0) return;\n const label = this.probe()?.nativeElement.getBoundingClientRect().width ?? 0;\n const body = this.candleEls()[0]?.nativeElement.getBoundingClientRect().width ?? 0;\n const last = this.measured();\n if (last?.width === width && last.label === label && last.body === body) return;\n this.measured.set({ width, label, body });\n }\n\n /** Whether a period can be drawn: all four prices finite. */\n private static drawable(d: WrCandlestickDatum): boolean {\n return Number.isFinite(d.open) && Number.isFinite(d.high) && Number.isFinite(d.low) && Number.isFinite(d.close);\n }\n}\n\nexport type { WrCandlestickDatum } from './types';\n","@let active = activeSlot();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (showGrid()) {\n <!-- HTML beside the drawing, in flow, so the column is exactly as wide as the longest\n label; each one hands the stylesheet the y of its own gridline. Hidden, as the\n drawing is one image: its name is what is announced, and the prices are the data\n table's. -->\n <div class=\"wr-candlestick-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-candlestick-chart__y-tick\" [style.--wr-candlestick-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-candlestick-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n <!-- Boxes placed by percentage rather than an SVG stretched to the plot: a body's\n width is a share of its slot held between 1px and a ceiling, which CSS can say\n and a stretched viewBox cannot. Hidden as well as presentational: `img` already\n makes it so, and a tree of hundreds of empty boxes is work for nothing. -->\n <div #drawing class=\"wr-candlestick-chart__drawing\" aria-hidden=\"true\" [style.--wr-candlestick-chart-slot]=\"slot()\">\n @if (active) {\n <!-- The slot being read, behind its candle, so the reading is marked by more than\n the tooltip's arrow. Before the gridlines, so they are drawn over it. -->\n <div class=\"wr-candlestick-chart__cursor\" [style.left.%]=\"active.left\"></div>\n }\n\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <div class=\"wr-candlestick-chart__grid-line\" [style.top.%]=\"tick.top\"></div>\n }\n }\n\n @for (candle of candles(); track candle.index) {\n <!-- The candle's box runs from its high to its low, as wide as its body. The wicks\n are its two pseudo-elements, above and below the body, so a hollow body is\n empty rather than crossed by the wick. -->\n <div\n #candleEl\n class=\"wr-candlestick-chart__candle\"\n [class.wr-candlestick-chart__candle--increase]=\"candle.increase\"\n [class.wr-candlestick-chart__candle--decrease]=\"!candle.increase\"\n [style.left.%]=\"candle.left\"\n [style.top.%]=\"candle.top\"\n [style.height.%]=\"candle.height\"\n [style.--wr-candlestick-chart-upper]=\"candle.upper\"\n [style.--wr-candlestick-chart-lower]=\"candle.lower\"\n [attr.data-index]=\"candle.index\"\n [attr.data-open]=\"candle.open\"\n [attr.data-high]=\"candle.high\"\n [attr.data-low]=\"candle.low\"\n [attr.data-close]=\"candle.close\"\n >\n <div class=\"wr-candlestick-chart__candle-body\"></div>\n </div>\n }\n </div>\n </div>\n\n <!-- The time axis, with or without the grid: the strip is as wide as the plot, and hands\n the stylesheet the room each label has; each label hands it the x of its candle, as\n a percentage of the drawing's width. The hidden copy of every label, a line each, is\n what that room is measured against: it is as wide as the widest. -->\n <div class=\"wr-candlestick-chart__x-axis\" aria-hidden=\"true\" [style.--wr-candlestick-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-candlestick-chart__x-probe\">{{ probeText() }}</span>\n @for (label of xLabels(); track label.index) {\n <span class=\"wr-candlestick-chart__x-label\" [style.--wr-candlestick-chart-x]=\"label.left\">{{ label.label }}</span>\n }\n </div>\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AAsCA,MAAM,gBAAgB;AAGtB,MAAM,aAAa;AAGnB,MAAM,WAAW;AAMjB,MAAM,cAAc;AAGpB,MAAM,aAAa;AAGnB,MAAM,YAAY;AAG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../projects/lib/charts/candlestick-chart/internal/merge.ts","../../../projects/lib/charts/candlestick-chart/candlestick-chart.ts","../../../projects/lib/charts/candlestick-chart/candlestick-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** How many candles a pixel of the drawing holds before the candles are merged. */\nconst DENSITY = 2;\n\n/** How wide the room of one merged candle is, in px: a 1px body and the gap beside it. */\nconst COLUMN = 2;\n\n/** The four prices a candle is drawn from. */\ninterface Prices {\n readonly open: number;\n readonly high: number;\n readonly low: number;\n readonly close: number;\n}\n\n/** Whether a period can be drawn: all four prices finite. */\nfunction drawable(d: Prices): boolean {\n return Number.isFinite(d.open) && Number.isFinite(d.high) && Number.isFinite(d.low) && Number.isFinite(d.close);\n}\n\n/**\n * How many fraction digits the shortest decimal that reads back as `value` has: 5 for\n * 1.08345, 0 for 120, 8 for 1.2e-7. `toString()` is that shortest form, written with an\n * exponent past 1e21 and below 1e-6, which this reads too.\n */\nfunction fractionDigits(value: number): number {\n const [mantissa, exponent = '0'] = Math.abs(value).toString().split('e');\n return Math.max(0, (mantissa.split('.')[1]?.length ?? 0) - Number(exponent));\n}\n\n/**\n * One candle as it is drawn: the periods `start` up to `end` of the data, and the four\n * prices they come to. Unmerged, one period.\n *\n * @internal\n */\nexport interface WrCandlestickMerged extends Prices {\n /** The first period it stands for, as a position in the data. */\n readonly start: number;\n /** One past the last period it stands for. */\n readonly end: number;\n}\n\n/**\n * How many periods one drawn candle stands for on a drawing `width` px wide: 1 while\n * `count` periods are at most two a pixel, which is every chart of ordinary size. Past\n * that the candles overlap into one smear whatever is drawn, and each costs two elements,\n * so the periods are merged {@link COLUMN} px at a time: enough of them per drawn candle\n * that no more than one candle is drawn per two pixels, a 1px body with a gap beside it.\n *\n * A number of periods rather than a width, so a resize that leaves it alone rebuilds\n * nothing.\n *\n * @internal\n */\nexport function wrCandlestickPer(count: number, width: number): number {\n if (!(width > 0) || count <= width * DENSITY) return 1;\n return Math.ceil(count / Math.max(1, Math.floor(width / COLUMN)));\n}\n\n/**\n * The candles drawn for `data`, `per` periods to each, in order: a period that cannot be\n * drawn - a price that is not a finite number - is left out, and a run of `per` with\n * none that can draws nothing.\n *\n * A merged candle is the candle of the longer period its run covers: it opens where its\n * first period opened and closes where its last one closed, and its high and low are the\n * highest high and the lowest low among them. So the chart's highest high and lowest\n * low, its first open and its last close all survive, each in the candle of its own run,\n * and the axis fitted to the merged candles is the one fitted to the data.\n *\n * `per` at 1 or less keeps every period as its own candle.\n *\n * @internal\n */\nexport function wrCandlestickMerge(data: readonly Prices[], per: number): WrCandlestickMerged[] {\n const size = per > 1 ? Math.floor(per) : 1;\n const merged: WrCandlestickMerged[] = [];\n for (let start = 0; start < data.length; start += size) {\n const end = Math.min(data.length, start + size);\n let open = Number.NaN;\n let close = Number.NaN;\n let high = Number.NEGATIVE_INFINITY;\n let low = Number.POSITIVE_INFINITY;\n let found = false;\n for (let i = start; i < end; i++) {\n const d = data[i];\n if (!drawable(d)) continue;\n if (!found) {\n open = d.open;\n found = true;\n }\n close = d.close;\n if (d.high > high) high = d.high;\n if (d.low < low) low = d.low;\n }\n if (found) merged.push({ start, end, open, high, low, close });\n }\n return merged;\n}\n\n/**\n * The most fraction digits any finite price of `data` is written with, at least `least`\n * and at most `most`: what an exact price is written to.\n *\n * One pass that stops at `most`, and that reads a price's digits off its text only when\n * the price does not already round-trip at the digits found so far - which, once the\n * first few periods have set them, is none of the rest. Reading every price's text was\n * forty thousand strings for ten thousand candles, on every change to the data.\n *\n * @internal\n */\nexport function wrCandlestickDigits(data: readonly Prices[], least: number, most: number): number {\n let digits = Math.min(Math.max(0, least), most);\n let factor = 10 ** digits;\n const read = (price: number): void => {\n if (!Number.isFinite(price) || Math.round(price * factor) / factor === price) return;\n digits = Math.min(most, Math.max(digits, fractionDigits(price)));\n factor = 10 ** digits;\n };\n for (const d of data) {\n if (digits >= most) return most;\n read(d.open);\n read(d.high);\n read(d.low);\n read(d.close);\n }\n return digits;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\n\nimport {\n WrChartState,\n WrChartTable,\n type WrChartTableData,\n useChartNumbers,\n useChartSize,\n useChartState,\n wrChartAxis,\n wrChartLongest,\n wrChartRound,\n} from 'ngwr/charts/core';\nimport { wrReadI18nText, useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip, wrCoerceChartTooltip } from 'ngwr/popover';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\nimport { wrCandlestickDigits, wrCandlestickMerge, wrCandlestickPer } from './internal/merge';\nimport type { WrCandlestickDatum } from './types';\n\n/**\n * The drawing's width, in px, before a browser has measured it: what the server and the\n * first paint decide the body width and the x labels against. A phone's plot is about\n * 300px and a desktop column's about 700px.\n */\nconst ASSUMED_WIDTH = 560;\n\n/** How much of its slot a body takes: the stylesheet's own share, which this mirrors. */\nconst BODY_SHARE = 0.7;\n\n/** The widest a body is drawn, in px: `--wr-candlestick-chart-body-max-width`'s default, which this mirrors. */\nconst BODY_MAX = 24;\n\n/**\n * Below this width, in px, a hollow body has no inside to show: two 1px edges and at\n * most a pixel between them read as one bar. The chart is drawn `--dense` then, which\n * under `hollow` dots a rising body instead.\n */\nconst DENSE_BELOW = 4;\n\n/** A label's width per character, in px, before a browser has measured the widest one. */\nconst CHAR_WIDTH = 7;\n\n/** The least room, in px, between two neighbouring x labels. */\nconst LABEL_GAP = 12;\n\n/** How many of the longest period labels the room for the x labels is measured from. */\nconst PROBES = 3;\n\n/** A percentage to three decimals, so an attribute stays short. */\nconst percent = (value: number): number => wrChartRound(value, 3);\n\n/** A candle's classes, by its direction: one binding for its own class and the modifier. */\nconst INCREASE = 'wr-candlestick-chart__candle wr-candlestick-chart__candle--increase';\nconst DECREASE = 'wr-candlestick-chart__candle wr-candlestick-chart__candle--decrease';\n\n/**\n * The most fraction digits a price is written with by default: past it a decimal is\n * float noise — 0.1 + 0.2 is 0.30000000000000004 — rather than precision, and every\n * instrument quotes fewer. Crypto's eight places fit.\n */\nconst MAX_PRICE_DIGITS = 10;\n\n/**\n * What a browser measured, in px: the drawing's width, the widest x label's, one body's,\n * and the plot's padding above the drawing, which the pointer is read against.\n */\ninterface Measured {\n readonly width: number;\n readonly label: number;\n readonly body: number;\n readonly inset: number;\n}\n\n/** One candle as the chart draws it: where it sits, and what it stands for. */\ninterface DrawnCandle {\n /**\n * The position in `data` of its period, or of the first of the periods merged into it:\n * its slot on the x axis and what it is tracked by.\n */\n readonly index: number;\n /** Its classes, by its direction: the increase colour for a close at or above the open, else the decrease one. */\n readonly classes: string;\n /** Its position and its four prices, `index open high low close`: what the test harness reads. */\n readonly figures: string;\n /** Its centre, as a percentage of the drawing's width from the left. */\n readonly left: number;\n /** Its top — the higher of the high and the body — as a percentage of the drawing's height from the top. */\n readonly top: number;\n /** How far it reaches down from `top`, as a percentage of the drawing's height. */\n readonly height: number;\n /** How much of its own height the upper wick takes, from its top to the body, in percent. */\n readonly upper: number;\n /** How much of its own height the lower wick takes, from the body to its bottom, in percent. */\n readonly lower: number;\n}\n\n/**\n * Prices over time as candles: one per period, its wick from the low to the high and its\n * body from the open to the close. No external dependency, and no SVG: every candle is a\n * box placed by percentage, so its width can be a share of its slot held between 1px and\n * a ceiling.\n *\n * @example\n * ```html\n * <wr-candlestick-chart\n * ariaLabel=\"ACME, daily\"\n * [data]=\"[\n * { label: 'Mon', open: 102, high: 108, low: 99, close: 106 },\n * { label: 'Tue', open: 106, high: 107, low: 98, close: 100 }\n * ]\"\n * />\n * ```\n *\n * **A rise and a fall.** A rising candle, one that closed at or above its open, is drawn\n * in the increase colour, success by default; a falling one in the decrease colour,\n * danger by default - the words, the modifiers and the hooks the waterfall chart uses\n * for a change up and a change down. Both bodies are SOLID: a hollow rising body was two\n * 1px edges, which read thin beside every other chart's marks. The two intents sit\n * within 1.004:1 of each other in luminance, so on the drawing alone the direction is\n * colour; the tooltip gives the open and the close, `dataTable` gives every price, and\n * `hollow` draws a rising body as an outline again, the cue that survives greyscale and\n * print. `increaseColor` and `decreaseColor` swap the colours, for a market that draws\n * rises in red. Every body is drawn at least 4px tall (5px while dense), growing into its\n * own wicks, so the high and the low stay put and a candle that barely moved is still a\n * body rather than a line.\n *\n * **Many candles thin out rather than pile up.** A body takes 70% of its slot, between\n * 1px and `--wr-candlestick-chart-body-max-width`, so the gaps close as the candles\n * crowd. Once a body is under 4px wide the chart is drawn `--dense`, which under\n * `hollow` dots a rising body rather than outlining it. Past two candles a pixel the\n * periods are merged (`decimate`, on by default): each drawn candle then stands for a\n * run of periods - the open of the first, the close of the last, the highest high and\n * the lowest low - one every two pixels, while the tooltip and the data table keep every\n * period. The x labels are thinned to every n-th, the smallest n that keeps the widest\n * label clear of its neighbours. All of it is decided on the drawing's measured width,\n * after render, so the server and the first paint assume a 560px drawing.\n *\n * **Grid, axis and states.** Gridlines cross the plot at every tick of the price axis\n * (`showGrid`) with the scale beside it (`showAxis`), both on by default. With nothing\n * to draw the chart keeps that frame and says \"No data\"; `loading` and `error` put\n * their own message there in place of the candles.\n *\n * The y axis is fitted to the lows and highs shown with no zero forced in, since a price\n * has no baseline, and snapped outward to a readable step, so no wick ends on the frame.\n *\n * The drawing is one named `role=\"img\"` and takes no tab stop; the tooltip, the period\n * with its open, high, low and close, is pointer only. `dataTable` renders every price\n * as a table only assistive technology reaches.\n *\n * @see https://ngwr.dev/charts/candlestick-chart\n */\n@Component({\n selector: 'wr-candlestick-chart',\n templateUrl: './candlestick-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-candlestick-chart',\n '[class.wr-candlestick-chart--axis]': 'showAxis()',\n // A rising body drawn as an outline; one too narrow for that is dotted, see `dense`.\n '[class.wr-candlestick-chart--hollow]': 'hollow()',\n '[class.wr-candlestick-chart--dense]': 'dense()',\n // Variables of their own rather than the hooks, which an author sets from outside: a\n // `null` binding wipes a value of its own name from the host's `style` attribute.\n '[style.--wr-candlestick-chart-input-increase-color]': 'increaseColor()',\n '[style.--wr-candlestick-chart-input-decrease-color]': 'decreaseColor()',\n },\n imports: [WrChartState, WrChartTable],\n})\nexport class WrCandlestickChart {\n /**\n * The periods, oldest first: one evenly spaced slot each. A period whose four prices\n * are not all finite keeps its slot and its label, and draws no candle.\n */\n readonly data = input<readonly WrCandlestickDatum[]>([]);\n\n /**\n * Accessible name of the chart. The prices are nowhere in text unless `dataTable`\n * puts them there, so say what the chart shows: the instrument and the period.\n * Falls back to `candlestickChart.label` (\"Candlestick chart\"). It is also the data\n * table's caption.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'candlestickChart.label', 'Candlestick chart');\n\n /**\n * The colour of a rising candle, any CSS colour. `null` keeps\n * `--wr-candlestick-chart-increase-color`, which is `var(--wr-color-success)`.\n * @default null\n */\n readonly increaseColor = input<string | null>(null);\n\n /**\n * The colour of a falling candle, any CSS colour. `null` keeps\n * `--wr-candlestick-chart-decrease-color`, which is `var(--wr-color-danger)`.\n * @default null\n */\n readonly decreaseColor = input<string | null>(null);\n\n /**\n * Writes every price the chart shows: the y-axis ticks, the tooltip and the data\n * table. `null` uses `Intl.NumberFormat` in `LOCALE_ID`: compact ticks (`1.2K`) unless\n * the full numbers are shorter, and in the tooltip and the table every price at the\n * data's own precision — as many fraction digits as the most precise price given, up\n * to ten, and never fewer than the axis step needs — so a forex quote of 1.08345 is\n * not written `1.083`.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The axis' compact ticks and the prices at the data's own precision, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n /** The plot's height in px, at least 80. @default 240 */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /**\n * Draw the gridlines: one across the plot at every tick of the price axis. Their colour\n * is `--wr-candlestick-chart-grid-color`, which defaults to the chart theme's\n * `--wr-chart-grid`. @default true\n */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Draw the price axis' scale: a number beside the plot at every tick. The period labels\n * under the candles are the time axis, so they stay either way, as the line chart's\n * `xLabels` do. @default true\n */\n readonly showAxis = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Draw a rising body as an outline rather than solid, so a rise and a fall are told\n * apart by fill as well as by colour: the cue that survives greyscale, print and\n * red-green colour blindness. A body too narrow to show an inside (under 4px) is dotted\n * instead. A falling body is solid either way. @default false\n */\n readonly hollow = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Merge the periods once there are more than two a pixel of the drawing: each drawn\n * candle then stands for a run of them, with the open of the first, the close of the\n * last, the highest high and the lowest low, so the chart's extremes, its first open\n * and its last close are all still drawn, at one candle every two pixels instead of\n * two elements a period. The tooltip reads the period under the pointer and the data\n * table lists every one, merged or not. Off draws a candle per period whatever their\n * number. @default true\n */\n readonly decimate = input(true, { transform: coerceBooleanProperty });\n\n /**\n * A request for the chart's data is in flight: the candles give way to the loading\n * message, over the grid and the axis the chart keeps. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The chart's data failed to load: the candles give way to the error message. `loading`\n * comes first when both are set. @default false\n */\n readonly error = input(false, { transform: coerceBooleanProperty });\n\n /** The message shown with nothing to draw. Falls back to `chart.empty`, then `'No data'`. */\n readonly emptyLabel = input<string | null>(null);\n\n /** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */\n readonly loadingLabel = input<string | null>(null);\n\n /** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */\n readonly errorLabel = input<string | null>(null);\n\n /**\n * Show a tooltip with the period's open, high, low and close under the pointer.\n * Pointer only.\n *\n * By default the pointer passes under the chip to the chart, so the next section\n * answers at once and the chip closes off the chart; `'hoverable'` lets the pointer\n * rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true\n */\n readonly tooltip = input<boolean | 'hoverable', unknown>(true, { transform: wrCoerceChartTooltip });\n\n /**\n * Render every period's prices as a table only assistive technology reaches, beside\n * the drawing: a row per period, headed by its label, and a column each for the open,\n * the high, the low and the close. A price that is not a finite number is an empty\n * cell. The drawing is one named image, so without it the prices are nowhere a screen\n * reader can walk. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /** The words for the four prices, from the catalog: in the tooltip and as the data table's columns. */\n private readonly openText = wrReadI18nText('candlestickChart.open', 'Open');\n private readonly highText = wrReadI18nText('candlestickChart.high', 'High');\n private readonly lowText = wrReadI18nText('candlestickChart.low', 'Low');\n private readonly closeText = wrReadI18nText('candlestickChart.close', 'Close');\n\n private readonly plot = viewChild<ElementRef<HTMLElement>>('plot');\n\n private readonly drawing = viewChild<ElementRef<HTMLElement>>('drawing');\n\n private readonly probe = viewChild<ElementRef<HTMLElement>>('probe');\n\n private readonly candleEls = viewChildren<ElementRef<HTMLElement>>('candleEl');\n\n /**\n * What a browser measured, once it has: `null` on the server and until the first\n * render, which decide against {@link ASSUMED_WIDTH} instead.\n */\n private readonly measured = signal<Measured | null>(null);\n\n /** The drawing's box, on the observer every chart shares: what a resize re-measures on. */\n private readonly drawingSize = useChartSize(this.drawing);\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/candlestick-chart');\n // Measured after render, in a browser: when the drawing changes size, when the labels\n // measured change, and when the number of candles drawn does, which is what moves a\n // body's width. Not on every change to the prices: a live chart ticks its last candle\n // many times a second, and each tick forced a layout. Never on the server - said here\n // as well as by the render hooks, which a server-platform test still runs.\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const destroyRef = inject(DestroyRef);\n\n afterRenderEffect(() => {\n this.probes();\n this.drawnSlots();\n this.drawingSize();\n untracked(() => this.measure());\n });\n\n // The pointer, heard natively on the plot: a template listener would run a change\n // detection pass over the chart for every pixel the pointer crosses.\n afterNextRender(() => {\n const plot = this.plot()?.nativeElement;\n if (!plot) return;\n const move = (event: MouseEvent): void => this.onPointerMove(event);\n const leave = (event: MouseEvent): void => this.tip.leave(event);\n plot.addEventListener('mousemove', move);\n plot.addEventListener('mouseleave', leave);\n destroyRef.onDestroy(() => {\n plot.removeEventListener('mousemove', move);\n plot.removeEventListener('mouseleave', leave);\n });\n });\n }\n\n /** How many slots the x axis has: one per period, drawn or not. */\n protected readonly slots = computed(() => this.data().length);\n\n /**\n * How many periods one drawn candle stands for: 1 until there are more than two a pixel\n * of the drawing, measured or assumed, and `decimate` is on. A number of periods rather\n * than the width, so a resize that leaves it alone rebuilds no candle.\n */\n private readonly per = computed(() =>\n this.decimate() ? wrCandlestickPer(this.slots(), this.measured()?.width ?? ASSUMED_WIDTH) : 1\n );\n\n /** The candles to draw, each one period or a run of `per` merged: every one whose prices are finite. */\n private readonly merged = computed(() => wrCandlestickMerge(this.data(), this.per()));\n\n /** How many slots the candles drawn share the axis among: the periods, or the runs they are merged into. */\n private readonly drawnSlots = computed(() => Math.ceil(this.slots() / this.per()));\n\n /**\n * One drawn candle's share of the drawing's width, in percent: what the stylesheet sizes\n * a body and the hover band against.\n */\n protected readonly slot = computed(() => (this.slots() === 0 ? 100 : percent((100 * this.per()) / this.slots())));\n\n /**\n * The y axis, from `wrChartAxis` over every candle drawn: fitted from the lowest of the\n * lows to the highest of the highs with no zero forced in, since a price has no\n * baseline, snapped outward at both ends and lifted a step at either end a wick would\n * end on (`symmetric`). A single price is centred with a step either side. With\n * nothing to draw, the 0 to 1 frame.\n *\n * A high below the body or a low above it counts as the body's edge, so nothing is\n * drawn outside the frame. Read off the merged candles, which keep the data's extremes.\n */\n protected readonly axis = computed(() => {\n let lo = Number.POSITIVE_INFINITY;\n let hi = Number.NEGATIVE_INFINITY;\n for (const d of this.merged()) {\n lo = Math.min(lo, d.low, d.open, d.close);\n hi = Math.max(hi, d.high, d.open, d.close);\n }\n return wrChartAxis(lo, hi, { symmetric: true });\n });\n\n /**\n * The candles as drawn: placed on the middle of the slots each stands for and on the\n * axis, with its wicks as shares of its own height so the stylesheet can draw both and\n * the body between them.\n */\n protected readonly candles = computed<readonly DrawnCandle[]>(() => {\n const { min, max } = this.axis();\n const slots = this.slots();\n const range = max - min;\n return this.merged().map(d => {\n const top = Math.max(d.high, d.open, d.close);\n const bottom = Math.min(d.low, d.open, d.close);\n const span = top - bottom;\n const y = ((max - top) / range) * 100;\n return {\n index: d.start,\n classes: d.close >= d.open ? INCREASE : DECREASE,\n figures: `${d.start} ${d.open} ${d.high} ${d.low} ${d.close}`,\n left: percent(((d.start + d.end) / 2 / slots) * 100),\n top: percent(y),\n height: percent(((max - bottom) / range) * 100 - y),\n upper: span > 0 ? percent(((top - Math.max(d.open, d.close)) / span) * 100) : 0,\n lower: span > 0 ? percent(((Math.min(d.open, d.close) - bottom) / span) * 100) : 0,\n };\n });\n });\n\n /**\n * Where the candle of each drawn slot is in {@link candles}, or -1 for a slot that draws\n * none: how the tooltip finds the element of the candle a period is drawn in.\n */\n private readonly positions = computed(() => {\n const per = this.per();\n const positions = new Int32Array(this.drawnSlots()).fill(-1);\n this.merged().forEach((candle, position) => (positions[Math.floor(candle.start / per)] = position));\n return positions;\n });\n\n /** The position in {@link candles} of the candle period `index` is drawn in, or -1 where it has none of its own. */\n private drawnAt(index: number): number {\n const d = this.data()[index];\n if (!d || !WrCandlestickChart.drawable(d)) return -1;\n return this.positions()[Math.floor(index / this.per())] ?? -1;\n }\n\n /** One drawn slot's width in px: measured, or against the assumed drawing. */\n private readonly slotPx = computed(() => (this.measured()?.width ?? ASSUMED_WIDTH) / Math.max(1, this.drawnSlots()));\n\n /** One period's width in px, merged or not: what the x labels are spaced against. */\n private readonly periodPx = computed(() => (this.measured()?.width ?? ASSUMED_WIDTH) / Math.max(1, this.slots()));\n\n /**\n * Whether a body is too narrow to show an inside - under 4px wide, measured off the\n * first candle, or worked out from the assumed drawing before a browser has measured\n * it. Under `hollow` a dense chart dots its rising bodies instead (see the stylesheet).\n * A chart with no candle is never dense.\n */\n protected readonly dense = computed(() => {\n if (this.candles().length === 0) return false;\n const measured = this.measured()?.body ?? 0;\n const body = measured > 0 ? measured : wrClamp(this.slotPx() * BODY_SHARE, 1, BODY_MAX);\n return body < DENSE_BELOW;\n });\n\n /** The longest period label, by its characters: what the room for the x labels is estimated from before a browser has measured. */\n private readonly longestLabel = computed(() =>\n this.data().reduce((longest, d) => (d.label.length > longest.length ? d.label : longest), '')\n );\n\n /**\n * The longest few period labels, a line each: the hidden copy the x labels' room is\n * measured against. Laid out as wide as its widest line, so among those few it measures\n * the widest rather than the one with the most characters - `WWWWWWW` is wider than\n * `iiiiiiii`. A few and not every label: ten thousand periods were ten thousand lines\n * to shape on every change to the labels. A line break inside a label is a space here,\n * as the printed label shows it.\n */\n protected readonly probes = computed(() =>\n wrChartLongest(\n this.data().map(d => d.label.replace(/\\r\\n?|\\n/g, ' ')),\n PROBES\n ).join('\\n')\n );\n\n /**\n * How wide a period label is taken to be, in px: the widest one as a browser measured\n * it, or seven pixels a character of the longest before it has. Every label is spaced as\n * if it were that wide.\n */\n private readonly labelPx = computed(() => {\n const measured = this.measured()?.label ?? 0;\n return measured > 0 ? measured : this.longestLabel().length * CHAR_WIDTH;\n });\n\n /**\n * Every how many slots a period label is printed: 1 while the widest label and a gap\n * fit one slot, else the smallest n whose n slots hold them.\n */\n protected readonly labelEvery = computed(() =>\n Math.max(1, Math.ceil((this.labelPx() + LABEL_GAP) / this.periodPx()))\n );\n\n /**\n * The period labels printed, left to right: every `labelEvery`-th, gaps included. Each\n * is laid out as wide as the widest, centred under its candle and moved inwards where\n * that would cross the frame, as the stylesheet draws it; the last is left out if\n * moving it brings it within the gap of the one before.\n *\n * They start from the first period, unless moving its label inwards would bring it\n * within the gap of the next printed one. Then they start from the first period whose\n * label fits between the frame and its candle unmoved, a slot or two in: dropping the\n * second label instead would open a gap of two steps at the start of the axis, and\n * keeping both would let them touch. With one candle and a label wider than the\n * drawing, that label is printed alone, ellipsised.\n */\n protected readonly xLabels = computed(() => {\n const every = this.labelEvery();\n const slots = this.slots();\n const slotPx = this.periodPx();\n const width = slotPx * slots;\n const label = Math.min(this.labelPx(), width);\n const data = this.data();\n /** Where a label's laid-out box starts, in px from the drawing's left. */\n const at = (index: number): number => wrClamp((index + 0.5) * slotPx - label / 2, 0, width - label);\n // A hair of slack on every comparison, so the regular spacing never fails on a rounding.\n const crowds = (start: number, previousEnd: number): boolean => start + 1e-6 < previousEnd + LABEL_GAP;\n const start =\n slots > every && crowds(at(every), at(0) + label) ? Math.max(0, Math.ceil(label / 2 / slotPx - 0.5 - 1e-6)) : 0;\n\n const labels: { readonly index: number; readonly label: string; readonly left: number }[] = [];\n let end = Number.NEGATIVE_INFINITY;\n for (let index = start; index < slots; index += every) {\n const left = at(index);\n if (crowds(left, end)) break;\n labels.push({ index, label: data[index].label, left: percent(((index + 0.5) / slots) * 100) });\n end = left + label;\n }\n return labels;\n });\n\n /** The room each printed label has, as a percentage of the drawing's width: `labelEvery` slots, at most all of it. */\n protected readonly xSlot = computed(() =>\n Math.min(100, percent((this.slots() === 0 ? 100 : percent(100 / this.slots())) * this.labelEvery()))\n );\n\n /**\n * The y ticks, top to bottom: each value's label, its gridline's distance from the top\n * in percent, and whether it is zero, whose line is drawn stronger. The labels are\n * written only for the scale: with `showAxis` off nothing prints them.\n */\n protected readonly yTicks = computed(() => {\n const { min, max, step, ticks } = this.axis();\n const labels = this.showAxis() ? this.numbers.ticks(ticks, step) : [];\n return ticks.map((value, i) => ({\n label: labels[i] ?? '',\n top: percent(((max - value) / (max - min)) * 100),\n zero: value === 0,\n }));\n });\n\n /** How many fraction digits the axis step is written with. */\n private readonly stepDigits = computed(() => {\n const step = this.axis().step;\n return wrCandlestickDigits([{ open: step, high: step, low: step, close: step }], 0, MAX_PRICE_DIGITS);\n });\n\n /**\n * How many fraction digits an exact price is written with, at most: as many as the\n * most precise finite price in `data` has, and at least as many as the axis step,\n * held to {@link MAX_PRICE_DIGITS}. A ceiling rather than a count, so `120` stays `120`\n * beside `120.25`. The shared `value` writer stops at three, which wrote the four\n * prices of a forex candle — 1.08345, 1.08391, 1.08301, 1.08362 — as two numbers,\n * coarser than the axis beside them.\n */\n private readonly priceDigits = computed(() => wrCandlestickDigits(this.data(), this.stepDigits(), MAX_PRICE_DIGITS));\n\n /** A price as the tooltip and the data table write it: through `valueFormat`, else at the data's precision. */\n private price(value: number): string {\n return this.numbers.exact(value, this.priceDigits());\n }\n\n /**\n * One tooltip for the candle under the pointer: the period as its heading, then a row\n * each for the open, the high, the low and the close, every price written in full. It\n * points at the candle itself, from above its high, and follows it if the data moves\n * it. No swatch: the colour is the candle's direction, and the four prices say it.\n *\n * The candle is found by POSITION — the slot under the pointer, anywhere over the\n * drawing — so a thin candle needs no aim, and a candle under the open chip can still\n * be reached by moving onto it.\n */\n protected readonly tip = useChartTooltip(\n this.tooltip,\n index => {\n const position = this.drawnAt(index);\n const candle = this.data()[index];\n const anchor = this.candleEls()[position]?.nativeElement;\n if (position < 0 || !candle || !anchor || this.state()) return null;\n return {\n datum: {\n label: candle.label,\n value: '',\n rows: [\n { label: this.openText(), value: this.price(candle.open) },\n { label: this.highText(), value: this.price(candle.high) },\n { label: this.lowText(), value: this.price(candle.low) },\n { label: this.closeText(), value: this.price(candle.close) },\n ],\n },\n anchor,\n };\n },\n (x, y) => this.slotAt(x, y)\n );\n\n /**\n * The slot the tooltip is reading, marked by a band behind its candle: the period's\n * own slot, or the whole of the run it is merged into.\n */\n protected readonly activeSlot = computed(() => {\n const index = this.tip.active();\n if (index === null) return null;\n const per = this.per();\n return { left: percent(((Math.floor(index / per) * per) / Math.max(1, this.slots())) * 100) };\n });\n\n /** Whether the chart has nothing to draw: no period, or none whose four prices are finite. */\n private readonly empty = computed(() => this.merged().length === 0);\n\n /** What the chart shows in place of its candles, or `null` while it draws them. */\n protected readonly state = useChartState({\n loading: this.loading,\n error: this.error,\n empty: this.empty,\n emptyLabel: this.emptyLabel,\n loadingLabel: this.loadingLabel,\n errorLabel: this.errorLabel,\n });\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a row per period headed\n * by its label, and the open, high, low and close written as the tooltip writes them.\n * A period with no candle keeps its row, with an empty cell for each price that is not\n * a finite number.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const cell = (value: number): string => (Number.isFinite(value) ? this.price(value) : '');\n return {\n caption: this.resolvedAriaLabel(),\n columns: [this.openText(), this.highText(), this.lowText(), this.closeText()],\n groups: [\n {\n rows: this.data().map(d => ({\n header: d.label,\n cells: [cell(d.open), cell(d.high), cell(d.low), cell(d.close)],\n })),\n },\n ],\n };\n });\n\n /**\n * The pointer over the plot, while no chip is up: an open chip follows the pointer by\n * itself, through `slotAt`, so each move is measured once. A MOUSE event, as every\n * chart's is: a tap fires the compatibility `mousemove` and no `pointermove`. Over a\n * slot with no candle, the open tooltip starts its grace period.\n */\n private onPointerMove(event: MouseEvent): void {\n if (!this.tooltip() || this.tip.active() !== null) return;\n const index = this.slotAt(event.clientX, event.clientY);\n if (index === null) this.tip.leave(event);\n else this.tip.enter(index);\n }\n\n /**\n * The slot under a viewport position, if a candle is drawn there: across the drawing's\n * width, and anywhere down the plot, its padding included. A drawing with no box\n * (nothing laid out yet) answers nothing. One layout read: the plot's box is the\n * drawing's, taller by the padding last measured.\n */\n private slotAt(clientX: number, clientY: number): number | null {\n const drawing = this.drawing()?.nativeElement;\n const slots = this.slots();\n if (!drawing || slots === 0 || this.state()) return null;\n const box = drawing.getBoundingClientRect();\n if (box.width <= 0 || box.height <= 0) return null;\n const inset =\n this.measured()?.inset ?? box.top - (this.plot()?.nativeElement.getBoundingClientRect().top ?? box.top);\n if (clientX < box.left || clientX > box.right || clientY < box.top - inset || clientY > box.bottom + inset) {\n return null;\n }\n const index = wrClamp(Math.floor(((clientX - box.left) / box.width) * slots), 0, slots - 1);\n return this.drawnAt(index) < 0 ? null : index;\n }\n\n /**\n * Read the drawing's width, the widest label's, one body's and the plot's padding off\n * the layout. A hidden chart measures 0 and keeps its last reading rather than thin to\n * nothing; a label or a body with nothing to measure - no period, no candle - reads 0\n * and leaves the estimate in charge of what it decides.\n */\n private measure(): void {\n const drawing = this.drawing()?.nativeElement;\n if (!drawing) return;\n const box = drawing.getBoundingClientRect();\n const width = box.width;\n if (width <= 0) return;\n const label = this.probe()?.nativeElement.getBoundingClientRect().width ?? 0;\n const body = this.candleEls()[0]?.nativeElement.getBoundingClientRect().width ?? 0;\n const inset = Math.max(0, box.top - (this.plot()?.nativeElement.getBoundingClientRect().top ?? box.top));\n const last = this.measured();\n if (last?.width === width && last.label === label && last.body === body && last.inset === inset) return;\n this.measured.set({ width, label, body, inset });\n }\n\n /** Whether a period can be drawn: all four prices finite. */\n private static drawable(d: WrCandlestickDatum): boolean {\n return Number.isFinite(d.open) && Number.isFinite(d.high) && Number.isFinite(d.low) && Number.isFinite(d.close);\n }\n}\n\nexport type { WrCandlestickDatum } from './types';\n","@let active = activeSlot();\n@let shown = state();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (showAxis()) {\n <!-- HTML beside the drawing, in flow, so the column is exactly as wide as the longest\n label; each one hands the stylesheet the y of its own gridline. Hidden, as the\n drawing is one image: its name is what is announced, and the prices are the data\n table's. -->\n <div class=\"wr-candlestick-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-candlestick-chart__y-tick\" [style.--wr-candlestick-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-candlestick-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n >\n <!-- Boxes placed by percentage rather than an SVG stretched to the plot: a body's\n width is a share of its slot held between 1px and a ceiling, which CSS can say\n and a stretched viewBox cannot. Hidden as well as presentational: `img` already\n makes it so, and a tree of hundreds of empty boxes is work for nothing. -->\n <div #drawing class=\"wr-candlestick-chart__drawing\" aria-hidden=\"true\" [style.--wr-candlestick-chart-slot]=\"slot()\">\n @if (active) {\n <!-- The slot being read, behind its candle, so the reading is marked by more than\n the tooltip's arrow. Before the gridlines, so they are drawn over it. -->\n <div class=\"wr-candlestick-chart__cursor\" [style.left.%]=\"active.left\"></div>\n }\n\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <div\n class=\"wr-candlestick-chart__grid-line\"\n [class.wr-candlestick-chart__grid-line--zero]=\"tick.zero\"\n [style.top.%]=\"tick.top\"\n ></div>\n }\n }\n\n @if (!shown) {\n @for (candle of candles(); track candle.index) {\n <!-- The candle's box runs from its high to its low, as wide as its body. The\n wicks are its two pseudo-elements, above and below the body, so a hollow\n body is empty rather than crossed by the wick. One class binding for its\n class and its direction, and one attribute for the figures the test harness reads: a\n chart of thousands pays for every binding thousands of times. -->\n <div\n #candleEl\n [class]=\"candle.classes\"\n [style.left.%]=\"candle.left\"\n [style.top.%]=\"candle.top\"\n [style.height.%]=\"candle.height\"\n [style.--wr-candlestick-chart-upper]=\"candle.upper\"\n [style.--wr-candlestick-chart-lower]=\"candle.lower\"\n [attr.data-candle]=\"candle.figures\"\n >\n <div class=\"wr-candlestick-chart__candle-body\"></div>\n </div>\n }\n }\n </div>\n </div>\n\n @if (shown) {\n <!-- Empty, loading or failed: the message, over the grid and the axis the chart\n keeps. Beside the plot in its own grid cell rather than inside it: the plot is\n an `img`, which makes everything it holds presentational, and this is a live\n region. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n }\n\n <!-- The time axis, with or without the grid: the strip is as wide as the plot, and hands\n the stylesheet the room each label has; each label hands it the x of its candle, as\n a percentage of the drawing's width. The hidden copy of the longest few, a line each, is\n what that room is measured against: it is as wide as the widest. -->\n <div class=\"wr-candlestick-chart__x-axis\" aria-hidden=\"true\" [style.--wr-candlestick-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-candlestick-chart__x-probe\">{{ probes() }}</span>\n @for (label of xLabels(); track label.index) {\n <span class=\"wr-candlestick-chart__x-label\" [style.--wr-candlestick-chart-x]=\"label.left\">{{ label.label }}</span>\n }\n </div>\n</div>\n\n@if (dataTable() && (!shown || shown.kind === 'empty')) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. Kept with nothing to draw: a\n period with one price missing draws no candle and still has three to read. Not\n while loading or failed, when the figures are not the chart's to give. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,MAAM,UAAU;AAGhB,MAAM,SAAS;AAWf,SAAS,SAAS,GAAS;CACzB,OAAO,OAAO,SAAS,EAAE,IAAI,KAAK,OAAO,SAAS,EAAE,IAAI,KAAK,OAAO,SAAS,EAAE,GAAG,KAAK,OAAO,SAAS,EAAE,KAAK;AAChH;AAOA,SAAS,eAAe,OAAa;CACnC,MAAM,CAAC,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK,CAAC,CAAC,SAAQ,CAAE,CAAC,MAAM,GAAG;CACvE,OAAO,KAAK,IAAI,IAAI,SAAS,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,UAAU,KAAK,OAAO,QAAQ,CAAC;AAC7E;AA2BA,SAAgB,iBAAiB,OAAe,OAAa;CAC3D,IAAI,EAAE,QAAQ,MAAM,SAAS,QAAQ,SAAS,OAAO;CACrD,OAAO,KAAK,KAAK,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,MAAM,CAAC,CAAC;AAClE;AAiBA,SAAgB,mBAAmB,MAAyB,KAAW;CACrE,MAAM,OA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GAAA,MAAA,CAEH,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEX,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEA,YAAU,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -76,11 +76,14 @@ const WR_CHART_LEGEND_BLOCK = new InjectionToken("WR_CHART_LEGEND_BLOCK");
|
|
|
76
76
|
* Use of this source code is governed by an MIT-style license that can be
|
|
77
77
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
78
78
|
*/
|
|
79
|
+
const MARKER_RADIUS = 5;
|
|
80
|
+
const LINE_MARKER_RADIUS = 3.5;
|
|
79
81
|
var WrChartLegend = class WrChartLegend {
|
|
80
82
|
constructor() {
|
|
81
83
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/chart-legend");
|
|
82
84
|
}
|
|
83
85
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
86
|
+
position = input("bottom", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
84
87
|
toggleable = input(false, {
|
|
85
88
|
...ngDevMode ? { debugName: "toggleable" } : /* istanbul ignore next */ {},
|
|
86
89
|
transform: coerceBooleanProperty
|
|
@@ -100,12 +103,25 @@ var WrChartLegend = class WrChartLegend {
|
|
|
100
103
|
isHidden(index) {
|
|
101
104
|
return this.hidden().has(index);
|
|
102
105
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
106
|
+
parts = {
|
|
107
|
+
item: this.block ? `${this.block}__legend-item` : "",
|
|
108
|
+
swatch: this.block ? `${this.block}__swatch` : "",
|
|
109
|
+
label: this.block ? `${this.block}__legend-label` : "",
|
|
110
|
+
value: this.block ? `${this.block}__legend-value` : ""
|
|
111
|
+
};
|
|
112
|
+
rows = computed(() => this.items().map((item) => {
|
|
113
|
+
const marker = item.marker ?? null;
|
|
114
|
+
const key = item.dash !== void 0 ? "line" : marker ? "marker" : "dot";
|
|
115
|
+
return {
|
|
116
|
+
label: item.label,
|
|
117
|
+
color: item.color,
|
|
118
|
+
key,
|
|
119
|
+
dash: item.dash === void 0 || item.dash === "" ? null : item.dash,
|
|
120
|
+
marker,
|
|
121
|
+
path: marker ? wrChartMarkerPath(marker, key === "line" ? LINE_MARKER_RADIUS : MARKER_RADIUS) : null,
|
|
122
|
+
value: item.value ?? null
|
|
123
|
+
};
|
|
124
|
+
}), ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
109
125
|
toggle(index) {
|
|
110
126
|
const current = this.hiddenSeries();
|
|
111
127
|
const hide = !current.includes(index);
|
|
@@ -138,6 +154,13 @@ var WrChartLegend = class WrChartLegend {
|
|
|
138
154
|
isRequired: false,
|
|
139
155
|
transformFunction: null
|
|
140
156
|
},
|
|
157
|
+
position: {
|
|
158
|
+
classPropertyName: "position",
|
|
159
|
+
publicName: "position",
|
|
160
|
+
isSignal: true,
|
|
161
|
+
isRequired: false,
|
|
162
|
+
transformFunction: null
|
|
163
|
+
},
|
|
141
164
|
toggleable: {
|
|
142
165
|
classPropertyName: "toggleable",
|
|
143
166
|
publicName: "toggleable",
|
|
@@ -175,12 +198,17 @@ var WrChartLegend = class WrChartLegend {
|
|
|
175
198
|
attributes: { "role": "list" },
|
|
176
199
|
properties: {
|
|
177
200
|
"class.wr-chart-legend--toggleable": "toggleable()",
|
|
201
|
+
"class.wr-chart-legend--top": "position() === 'top'",
|
|
202
|
+
"class.wr-chart-legend--bottom": "position() === 'bottom'",
|
|
203
|
+
"class.wr-chart-legend--start": "position() === 'start'",
|
|
204
|
+
"class.wr-chart-legend--end": "position() === 'end'",
|
|
205
|
+
"class.wr-chart-legend--none": "position() === 'none'",
|
|
178
206
|
"attr.aria-label": "label()"
|
|
179
207
|
},
|
|
180
208
|
classAttribute: "wr-chart-legend"
|
|
181
209
|
},
|
|
182
210
|
ngImport: i0,
|
|
183
|
-
template: "@for (
|
|
211
|
+
template: "@for (row of rows(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [attr.data-wr-series]=\"$index\"\n [wrChartLegendPart]=\"parts.item\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"key\" [ngTemplateOutletContext]=\"{ $implicit: row, index: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"key\" [ngTemplateOutletContext]=\"{ $implicit: row, index: $index }\" />\n }\n </li>\n}\n\n<!-- Every binding here reads the row the component built from its item, never the item:\n which key to draw and the marker's path are worked out once, when `items` changes. -->\n<ng-template #key let-row let-index=\"index\">\n @switch (row.key) {\n @case ('line') {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"parts.swatch\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"row.marker\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"row.color\"\n [attr.stroke-dasharray]=\"row.dash\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (row.path) {\n <path [attr.d]=\"row.path\" transform=\"translate(8 1)\" [attr.fill]=\"row.color\" />\n }\n </svg>\n }\n @case ('marker') {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"parts.swatch\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"row.marker\"\n >\n <path [attr.d]=\"row.path\" [attr.fill]=\"row.color\" />\n </svg>\n }\n @default {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"parts.swatch\"\n aria-hidden=\"true\"\n [style.background]=\"row.color\"\n ></span>\n }\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"parts.label\">{{ row.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ resolvedHiddenLabel() }} </span>\n }\n @if (row.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"parts.value\">{{ row.value }}</span>\n }\n</ng-template>\n",
|
|
184
212
|
dependencies: [{
|
|
185
213
|
kind: "directive",
|
|
186
214
|
type: NgTemplateOutlet,
|
|
@@ -213,10 +241,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
213
241
|
class: "wr-chart-legend",
|
|
214
242
|
role: "list",
|
|
215
243
|
"[class.wr-chart-legend--toggleable]": "toggleable()",
|
|
244
|
+
"[class.wr-chart-legend--top]": "position() === 'top'",
|
|
245
|
+
"[class.wr-chart-legend--bottom]": "position() === 'bottom'",
|
|
246
|
+
"[class.wr-chart-legend--start]": "position() === 'start'",
|
|
247
|
+
"[class.wr-chart-legend--end]": "position() === 'end'",
|
|
248
|
+
"[class.wr-chart-legend--none]": "position() === 'none'",
|
|
216
249
|
"[attr.aria-label]": "label()"
|
|
217
250
|
},
|
|
218
251
|
imports: [NgTemplateOutlet, WrChartLegendPart],
|
|
219
|
-
template: "@for (
|
|
252
|
+
template: "@for (row of rows(); track $index) {\n <li\n class=\"wr-chart-legend__item\"\n [class.wr-chart-legend__item--hidden]=\"isHidden($index)\"\n [attr.data-wr-series]=\"$index\"\n [wrChartLegendPart]=\"parts.item\"\n >\n @if (toggleable()) {\n <!-- Pressed means SHOWN: the button's name is the series, and pressing it turns\n that series on. The name never changes with the state, as the toggle-button\n pattern requires; the state is `aria-pressed` and the struck-through label. -->\n <button\n type=\"button\"\n class=\"wr-chart-legend__toggle\"\n [attr.aria-pressed]=\"!isHidden($index)\"\n (click)=\"toggle($index)\"\n >\n <ng-container [ngTemplateOutlet]=\"key\" [ngTemplateOutletContext]=\"{ $implicit: row, index: $index }\" />\n </button>\n } @else {\n <ng-container [ngTemplateOutlet]=\"key\" [ngTemplateOutletContext]=\"{ $implicit: row, index: $index }\" />\n }\n </li>\n}\n\n<!-- Every binding here reads the row the component built from its item, never the item:\n which key to draw and the marker's path are worked out once, when `items` changes. -->\n<ng-template #key let-row let-index=\"index\">\n @switch (row.key) {\n @case ('line') {\n <!-- The key draws the series' own dash, not a solid block. A legend that pairs a\n coloured square with a name leaves the reader to match the square to the LINE,\n and matching by colour is the step the patterns exist to remove. -->\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--line\"\n [wrChartLegendPart]=\"parts.swatch\"\n viewBox=\"0 0 16 2\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"row.marker\"\n >\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"16\"\n y2=\"1\"\n [attr.stroke]=\"row.color\"\n [attr.stroke-dasharray]=\"row.dash\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n @if (row.path) {\n <path [attr.d]=\"row.path\" transform=\"translate(8 1)\" [attr.fill]=\"row.color\" />\n }\n </svg>\n }\n @case ('marker') {\n <svg\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--marker\"\n [wrChartLegendPart]=\"parts.swatch\"\n viewBox=\"-6 -6 12 12\"\n aria-hidden=\"true\"\n [attr.data-marker]=\"row.marker\"\n >\n <path [attr.d]=\"row.path\" [attr.fill]=\"row.color\" />\n </svg>\n }\n @default {\n <span\n class=\"wr-chart-legend__swatch wr-chart-legend__swatch--dot\"\n [wrChartLegendPart]=\"parts.swatch\"\n aria-hidden=\"true\"\n [style.background]=\"row.color\"\n ></span>\n }\n }\n <span class=\"wr-chart-legend__label\" [wrChartLegendPart]=\"parts.label\">{{ row.label }}</span>\n @if (!toggleable() && isHidden(index)) {\n <!-- A toggle says hidden through aria-pressed. A row that is not one has nothing but\n the strike-through and the faded key, which reach no one who cannot see them. -->\n <span class=\"wr-chart-legend__sr-only\"> {{ resolvedHiddenLabel() }} </span>\n }\n @if (row.value !== null) {\n <span class=\"wr-chart-legend__value\" [wrChartLegendPart]=\"parts.value\">{{ row.value }}</span>\n }\n</ng-template>\n"
|
|
220
253
|
}]
|
|
221
254
|
}],
|
|
222
255
|
ctorParameters: () => [],
|
|
@@ -229,6 +262,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
229
262
|
required: false
|
|
230
263
|
}]
|
|
231
264
|
}],
|
|
265
|
+
position: [{
|
|
266
|
+
type: i0.Input,
|
|
267
|
+
args: [{
|
|
268
|
+
isSignal: true,
|
|
269
|
+
alias: "position",
|
|
270
|
+
required: false
|
|
271
|
+
}]
|
|
272
|
+
}],
|
|
232
273
|
toggleable: [{
|
|
233
274
|
type: i0.Input,
|
|
234
275
|
args: [{
|
|
@@ -270,6 +311,167 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
270
311
|
}]
|
|
271
312
|
}
|
|
272
313
|
});
|
|
273
|
-
|
|
314
|
+
/**
|
|
315
|
+
* @license
|
|
316
|
+
*
|
|
317
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
318
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
319
|
+
*/
|
|
320
|
+
var WrChartScale = class WrChartScale {
|
|
321
|
+
constructor() {
|
|
322
|
+
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/chart-legend");
|
|
323
|
+
}
|
|
324
|
+
steps = input([], ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
|
|
325
|
+
minLabel = input(null, ...ngDevMode ? [{ debugName: "minLabel" }] : /* istanbul ignore next */ []);
|
|
326
|
+
maxLabel = input(null, ...ngDevMode ? [{ debugName: "maxLabel" }] : /* istanbul ignore next */ []);
|
|
327
|
+
position = input("bottom", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
328
|
+
block = input(null, ...ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []);
|
|
329
|
+
parts = computed(() => {
|
|
330
|
+
const block = this.block();
|
|
331
|
+
return {
|
|
332
|
+
label: block ? `${block}__legend-label` : "",
|
|
333
|
+
ramp: block ? `${block}__scale` : "",
|
|
334
|
+
step: block ? `${block}__swatch` : ""
|
|
335
|
+
};
|
|
336
|
+
}, ...ngDevMode ? [{ debugName: "parts" }] : /* istanbul ignore next */ []);
|
|
337
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
338
|
+
minVersion: "12.0.0",
|
|
339
|
+
version: "22.2.6",
|
|
340
|
+
ngImport: i0,
|
|
341
|
+
type: WrChartScale,
|
|
342
|
+
deps: [],
|
|
343
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
344
|
+
});
|
|
345
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
346
|
+
minVersion: "17.0.0",
|
|
347
|
+
version: "22.2.6",
|
|
348
|
+
type: WrChartScale,
|
|
349
|
+
isStandalone: true,
|
|
350
|
+
selector: "wr-chart-scale",
|
|
351
|
+
inputs: {
|
|
352
|
+
steps: {
|
|
353
|
+
classPropertyName: "steps",
|
|
354
|
+
publicName: "steps",
|
|
355
|
+
isSignal: true,
|
|
356
|
+
isRequired: false,
|
|
357
|
+
transformFunction: null
|
|
358
|
+
},
|
|
359
|
+
minLabel: {
|
|
360
|
+
classPropertyName: "minLabel",
|
|
361
|
+
publicName: "minLabel",
|
|
362
|
+
isSignal: true,
|
|
363
|
+
isRequired: false,
|
|
364
|
+
transformFunction: null
|
|
365
|
+
},
|
|
366
|
+
maxLabel: {
|
|
367
|
+
classPropertyName: "maxLabel",
|
|
368
|
+
publicName: "maxLabel",
|
|
369
|
+
isSignal: true,
|
|
370
|
+
isRequired: false,
|
|
371
|
+
transformFunction: null
|
|
372
|
+
},
|
|
373
|
+
position: {
|
|
374
|
+
classPropertyName: "position",
|
|
375
|
+
publicName: "position",
|
|
376
|
+
isSignal: true,
|
|
377
|
+
isRequired: false,
|
|
378
|
+
transformFunction: null
|
|
379
|
+
},
|
|
380
|
+
block: {
|
|
381
|
+
classPropertyName: "block",
|
|
382
|
+
publicName: "block",
|
|
383
|
+
isSignal: true,
|
|
384
|
+
isRequired: false,
|
|
385
|
+
transformFunction: null
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
host: {
|
|
389
|
+
properties: {
|
|
390
|
+
"class.wr-chart-scale--top": "position() === 'top'",
|
|
391
|
+
"class.wr-chart-scale--bottom": "position() === 'bottom'",
|
|
392
|
+
"class.wr-chart-scale--start": "position() === 'start'",
|
|
393
|
+
"class.wr-chart-scale--end": "position() === 'end'",
|
|
394
|
+
"class.wr-chart-scale--none": "position() === 'none'"
|
|
395
|
+
},
|
|
396
|
+
classAttribute: "wr-chart-scale"
|
|
397
|
+
},
|
|
398
|
+
ngImport: i0,
|
|
399
|
+
template: "@let part = parts();\n@if (minLabel() !== null) {\n <span class=\"wr-chart-scale__label\" [wrChartLegendPart]=\"part.label\">{{ minLabel() }}</span>\n}\n@if (steps().length > 0) {\n <span class=\"wr-chart-scale__ramp\" [wrChartLegendPart]=\"part.ramp\">\n @for (step of steps(); track $index) {\n <span class=\"wr-chart-scale__step\" [wrChartLegendPart]=\"part.step\" [style.background]=\"step\"></span>\n }\n </span>\n}\n@if (maxLabel() !== null) {\n <span class=\"wr-chart-scale__label\" [wrChartLegendPart]=\"part.label\">{{ maxLabel() }}</span>\n}\n<!-- What the chart keys beside the ramp: a heatmap's empty cell. -->\n<ng-content />\n",
|
|
400
|
+
dependencies: [{
|
|
401
|
+
kind: "directive",
|
|
402
|
+
type: WrChartLegendPart,
|
|
403
|
+
selector: "[wrChartLegendPart]",
|
|
404
|
+
inputs: ["wrChartLegendPart"]
|
|
405
|
+
}],
|
|
406
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
410
|
+
minVersion: "12.0.0",
|
|
411
|
+
version: "22.2.6",
|
|
412
|
+
ngImport: i0,
|
|
413
|
+
type: WrChartScale,
|
|
414
|
+
decorators: [{
|
|
415
|
+
type: Component,
|
|
416
|
+
args: [{
|
|
417
|
+
selector: "wr-chart-scale",
|
|
418
|
+
encapsulation: ViewEncapsulation.None,
|
|
419
|
+
host: {
|
|
420
|
+
class: "wr-chart-scale",
|
|
421
|
+
"[class.wr-chart-scale--top]": "position() === 'top'",
|
|
422
|
+
"[class.wr-chart-scale--bottom]": "position() === 'bottom'",
|
|
423
|
+
"[class.wr-chart-scale--start]": "position() === 'start'",
|
|
424
|
+
"[class.wr-chart-scale--end]": "position() === 'end'",
|
|
425
|
+
"[class.wr-chart-scale--none]": "position() === 'none'"
|
|
426
|
+
},
|
|
427
|
+
imports: [WrChartLegendPart],
|
|
428
|
+
template: "@let part = parts();\n@if (minLabel() !== null) {\n <span class=\"wr-chart-scale__label\" [wrChartLegendPart]=\"part.label\">{{ minLabel() }}</span>\n}\n@if (steps().length > 0) {\n <span class=\"wr-chart-scale__ramp\" [wrChartLegendPart]=\"part.ramp\">\n @for (step of steps(); track $index) {\n <span class=\"wr-chart-scale__step\" [wrChartLegendPart]=\"part.step\" [style.background]=\"step\"></span>\n }\n </span>\n}\n@if (maxLabel() !== null) {\n <span class=\"wr-chart-scale__label\" [wrChartLegendPart]=\"part.label\">{{ maxLabel() }}</span>\n}\n<!-- What the chart keys beside the ramp: a heatmap's empty cell. -->\n<ng-content />\n"
|
|
429
|
+
}]
|
|
430
|
+
}],
|
|
431
|
+
ctorParameters: () => [],
|
|
432
|
+
propDecorators: {
|
|
433
|
+
steps: [{
|
|
434
|
+
type: i0.Input,
|
|
435
|
+
args: [{
|
|
436
|
+
isSignal: true,
|
|
437
|
+
alias: "steps",
|
|
438
|
+
required: false
|
|
439
|
+
}]
|
|
440
|
+
}],
|
|
441
|
+
minLabel: [{
|
|
442
|
+
type: i0.Input,
|
|
443
|
+
args: [{
|
|
444
|
+
isSignal: true,
|
|
445
|
+
alias: "minLabel",
|
|
446
|
+
required: false
|
|
447
|
+
}]
|
|
448
|
+
}],
|
|
449
|
+
maxLabel: [{
|
|
450
|
+
type: i0.Input,
|
|
451
|
+
args: [{
|
|
452
|
+
isSignal: true,
|
|
453
|
+
alias: "maxLabel",
|
|
454
|
+
required: false
|
|
455
|
+
}]
|
|
456
|
+
}],
|
|
457
|
+
position: [{
|
|
458
|
+
type: i0.Input,
|
|
459
|
+
args: [{
|
|
460
|
+
isSignal: true,
|
|
461
|
+
alias: "position",
|
|
462
|
+
required: false
|
|
463
|
+
}]
|
|
464
|
+
}],
|
|
465
|
+
block: [{
|
|
466
|
+
type: i0.Input,
|
|
467
|
+
args: [{
|
|
468
|
+
isSignal: true,
|
|
469
|
+
alias: "block",
|
|
470
|
+
required: false
|
|
471
|
+
}]
|
|
472
|
+
}]
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
export { WR_CHART_LEGEND_BLOCK, WrChartLegend, WrChartScale };
|
|
274
476
|
|
|
275
477
|
//# sourceMappingURL=ngwr-charts-chart-legend.mjs.map
|