@ids-group-ltd/ids-design-system 0.13.2 → 0.13.3
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/CHANGELOG.md +265 -0
- package/components.md +12 -16
- package/docs/agent/INDEX.md +1 -2
- package/docs/agent/charts/ds-column-chart.md +3 -2
- package/docs/agent/feedback/ds-bar.md +13 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +9 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +70 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +141 -120
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +42 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +16 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +14 -83
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +163 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.3.json +211 -0
- package/package.json +17 -17
- package/styles/_chart-frame.scss +16 -6
- package/styles/_tokens-charts.scss +29 -5
- package/styles/_tokens.scss +1 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +7 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +95 -38
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +15 -2
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -18
- package/types/ids-group-ltd-ids-design-system-components.d.ts +58 -9
- package/types/ids-group-ltd-ids-design-system-core.d.ts +55 -4
- package/types/ids-group-ltd-ids-design-system.d.ts +4 -4
- package/docs/agent/feedback/ds-meter.md +0 -11
- package/docs/agent/feedback/ds-progress.md +0 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +0 -61
- package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +0 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -65
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
- package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +0 -36
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart.mjs","sources":["../../../src/lib/components/chart/chart.math.ts","../../../src/lib/components/chart/chart-scales.token.ts","../../../src/lib/components/chart/chart.component.ts","../../../src/lib/components/chart/chart.component.html","../../../src/lib/components/chart/column-series.component.ts","../../../src/lib/components/chart/column-series.component.html","../../../src/lib/components/chart/line-series.component.ts","../../../src/lib/components/chart/line-series.component.html","../../../src/lib/components/chart/reference-label.component.ts","../../../src/lib/components/chart/reference-label.component.html","../../../src/lib/components/chart/reference-line.component.ts","../../../src/lib/components/chart/reference-line.component.html","../../../src/lib/components/chart/ids-group-ltd-ids-design-system-components-chart.ts"],"sourcesContent":["import {\n domainMinOf,\n linearScale,\n niceDomain,\n roundStepAtLeast,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { NiceDomain } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ChartAxisMode,\n ChartStackMode,\n ChartThreshold,\n ChartThresholdDash,\n} from '@ids-group-ltd/ids-design-system/core';\n\nexport const CHART_DEFAULT_TICK_COUNT = 5;\nexport const CHART_AXIS_LABEL_GAP = 8;\nexport const CHART_CATEGORY_LABEL_OFFSET = 18;\nexport const CHART_BAND_PADDING = 0.3;\n\n/** What the chart lays out at while it measures zero: under SSR, while the host is\n * `display: none`, and for the frame before the first `ResizeObserver` callback. Without it the\n * plot is `0 - axisGutter - EDGE_GUTTER` wide, which clamps to zero and stacks every category on\n * one x rather than leaving a blank space that the measurement then fills.\n *\n * The client cost is one frame drawn at this width and scaled to fit - measured at a 400px card\n * in Chrome 153: `viewBox=\"0 0 640 310\"` at t=242ms, `\"0 0 358 310\"` at t=260ms.\n *\n * @internal */\nexport const CHART_FALLBACK_WIDTH = 640;\n\nexport const CHART_DEFAULT_PLOT_HEIGHT = 240;\nexport const CHART_DEFAULT_AXIS_GUTTER = 46;\nexport const CHART_DEFAULT_VALUE_SPACE = 20;\n\n/** Room past the last band, so a mark centred on it is not cut by the viewBox edge. */\nexport const CHART_EDGE_GUTTER = 12;\n\n/** Blank between two stacked plots: enough for the lower plot's top tick label to clear the upper\n * plot's category-free bottom edge. */\nexport const CHART_STACKED_PLOT_GAP = 34;\n\n/** Height of the category-label row under the plot: one line plus its descenders. */\nconst CATEGORY_GUTTER = 30;\n\n/** The drawable rectangle, in the same CSS pixels the container was measured in.\n *\n * `measuredWidth` is the `<svg>`'s own rendered width, which is what makes every coordinate\n * derived from this an exact CSS pixel: the viewBox is sized to match, so one user unit is one\n * pixel and a mark capped at 48 is 48 pixels wide at every card width.\n *\n * @internal */\nexport function chartPlot(\n measuredWidth: number,\n plotHeight: number,\n axisGutter: number,\n valueSpace: number,\n rightGutter: number = CHART_EDGE_GUTTER,\n): { left: number; top: number; width: number; height: number } {\n return {\n left: axisGutter,\n top: valueSpace,\n width: Math.max(0, measuredWidth - axisGutter - rightGutter),\n height: Math.max(0, plotHeight),\n };\n}\n\n/** The viewBox's height, and the `<svg>`'s rendered height in pixels - the two are the same\n * number, which is what holds the 1:1 scale on the vertical axis too.\n *\n * `valueSpace` is always budgeted above the plot, for a value label over the tallest mark. It is\n * budgeted a SECOND time below the baseline only when the domain reaches under zero, where a\n * negative mark's label would otherwise print into the category labels: reserving it for every\n * chart costs the all-positive ones - the common case - that much height for nothing.\n *\n * @internal */\nexport function chartViewHeight(\n plotHeight: number,\n valueSpace: number,\n reservesBelowBaseline = false,\n): number {\n const below = reservesBelowBaseline ? valueSpace : 0;\n\n return valueSpace + Math.max(0, plotHeight) + below + CATEGORY_GUTTER;\n}\n\n/** The domain the value axis draws: the union of every reported set, always reaching zero,\n * widened by the pins and snapped to a round tick step.\n *\n * Zero is always in it because a bar measured against a floating floor misstates its own size,\n * and a pin only ever widens because a maximum under the data would push readings off the plot\n * rather than rescale them.\n *\n * @internal */\nexport function axisDomain(\n reported: Iterable<readonly number[]>,\n tickCount: number,\n pinnedMinimum: number | null = null,\n pinnedMaximum: number | null = null,\n): NiceDomain {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n if (\n pinnedMinimum !== null &&\n Number.isFinite(pinnedMinimum) &&\n pinnedMinimum < minimum\n ) {\n minimum = pinnedMinimum;\n }\n if (\n pinnedMaximum !== null &&\n Number.isFinite(pinnedMaximum) &&\n pinnedMaximum > maximum\n ) {\n maximum = pinnedMaximum;\n }\n\n return niceDomain(minimum, maximum, tickCount);\n}\n\n/** Where a value sits vertically, clamped inside the plot. An unplottable value lands on the\n * baseline rather than becoming a `NaN`, which would void the whole coordinate attribute it was\n * written into and take the mark off screen with nothing logged.\n *\n * @internal */\nexport function valueScale(\n domain: NiceDomain,\n top: number,\n height: number,\n): (value: number) => number {\n const baseline = top + height;\n const scale = linearScale(domain.min, domain.max, height);\n\n return (value) => {\n const y = baseline - scale(value);\n\n return Number.isFinite(y) ? Math.min(Math.max(y, top), baseline) : baseline;\n };\n}\n\n/** Distance from a reference line, or a band's upper edge, to its label's baseline. */\nconst THRESHOLD_LABEL_GAP = 5;\n\n/** Inset from the plot's LEFT edge. The label sits at the start of the line rather than its end\n * because a value label is centred on its column, and the last column's is the one nearest the\n * edge the line stops at - measured on the docs demo, a right-anchored \"Escalation\" printed over\n * the last column's own value. */\nconst THRESHOLD_LABEL_INSET = 4;\n\n/** @internal */\nexport interface ThresholdMark {\n /** Position in the list, not the reading: two thresholds may legitimately name the same value -\n * a target and the floor of the band around it - and keying on the value would collapse them\n * into one drawn line. */\n readonly key: number;\n readonly label: string;\n readonly color: string | null;\n readonly dash: ChartThresholdDash;\n readonly band: boolean;\n readonly left: number;\n readonly right: number;\n readonly width: number;\n readonly y: number;\n readonly top: number;\n readonly height: number;\n readonly labelX: number;\n readonly labelY: number;\n}\n\n/** Every drawable coordinate of a chart's reference lines and bands, so the strokes and the labels\n * - which paint in different layers, under the marks and over them - are laid out by one\n * calculation rather than by two that can disagree.\n *\n * @internal */\nexport function thresholdMarks(\n thresholds: readonly ChartThreshold[],\n plot: { left: number; top: number; width: number; height: number },\n toY: (value: number) => number,\n): readonly ThresholdMark[] {\n return thresholds.map((threshold, index) => {\n const y = toY(threshold.value);\n const far = threshold.to == null ? y : toY(threshold.to);\n const top = Math.min(y, far);\n\n return {\n key: index,\n label: threshold.label ?? '',\n color: threshold.color ?? null,\n dash: threshold.dash ?? 'dashed',\n band: threshold.to != null,\n left: plot.left,\n right: plot.left + plot.width,\n width: plot.width,\n y,\n top,\n height: Math.abs(y - far),\n labelX: plot.left + THRESHOLD_LABEL_INSET,\n labelY: top - THRESHOLD_LABEL_GAP,\n };\n });\n}\n\n/** A tick row's index for the value zero, or `null` when the rows do not carry one.\n *\n * Two axes share gridlines only if they also share a zero: a second scale hung on the first's\n * rows has to put its own zero on the same row, or a reading above the line on one axis sits\n * below it on the other. */\nfunction zeroRow(ticks: readonly number[]): number | null {\n if (ticks.length < 2) {\n return null;\n }\n const step = ticks[1] - ticks[0];\n if (!Number.isFinite(step) || step === 0) {\n return null;\n }\n const row = (0 - ticks[0]) / step;\n const rounded = Math.round(row);\n\n return Math.abs(row - rounded) < 1e-9 &&\n rounded >= 0 &&\n rounded < ticks.length\n ? rounded\n : null;\n}\n\n/** @internal */\nexport interface SecondaryAxis {\n readonly domain: NiceDomain;\n readonly ticks: readonly number[];\n /** True when the labels below belong on the PRIMARY axis's own tick rows, so the plot carries\n * one set of gridlines rather than two crossing each other. */\n readonly aligned: boolean;\n}\n\n/** The second value axis, as the four modes define it.\n *\n * `'rounded'` and `'exact'` hang the second scale on the first's tick rows and differ only in the\n * step: `'rounded'` snaps it up to a round number and overshoots the data, `'exact'` takes the\n * step the data needs and lands on it. `'independent'` and `'stacked'` nice the second domain on\n * its own - stacked plots sit one above the other, so there is nothing to align.\n *\n * Falls back to an independent scale wherever alignment is not available: fewer than two rows, no\n * shared zero row, or a domain whose sign has no rows on its side of that zero.\n *\n * @internal */\nexport function secondaryAxis(\n primaryTicks: readonly number[],\n reported: Iterable<readonly number[]>,\n tickCount: number,\n mode: ChartAxisMode,\n): SecondaryAxis {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n const independent = (): SecondaryAxis => ({\n domain: niceDomain(minimum, maximum, tickCount),\n ticks: tickValues(minimum, maximum, tickCount),\n aligned: false,\n });\n\n if (mode !== 'rounded' && mode !== 'exact') {\n return independent();\n }\n const zero = zeroRow(primaryTicks);\n if (zero === null) {\n return independent();\n }\n const rowsAbove = primaryTicks.length - 1 - zero;\n const rowsBelow = zero;\n if ((maximum > 0 && rowsAbove === 0) || (minimum < 0 && rowsBelow === 0)) {\n return independent();\n }\n const needed = Math.max(\n rowsAbove > 0 ? maximum / rowsAbove : 0,\n rowsBelow > 0 ? -minimum / rowsBelow : 0,\n );\n const step = mode === 'rounded' ? roundStepAtLeast(needed) : needed;\n if (!Number.isFinite(step) || step <= 0) {\n return {\n domain: { min: 0, max: 0 },\n ticks: primaryTicks.map(() => 0),\n aligned: true,\n };\n }\n\n return {\n domain: { min: -rowsBelow * step, max: rowsAbove * step },\n ticks: primaryTicks.map((_, row) => roundTick((row - zero) * step)),\n aligned: true,\n };\n}\n\n/** A step multiplied back out rarely lands on itself, and an axis label that prints\n * `149.99999999999997` is the visible form of that. */\nfunction roundTick(value: number): number {\n return Number(value.toFixed(6));\n}\n\n/** Where one series' segment starts and ends on the value axis, in the axis's own unit - or in\n * shares of the category total under `'normalized'`.\n *\n * @internal */\nexport interface ChartStackOffset {\n readonly from: number;\n readonly to: number;\n}\n\n/** Every segment's span on the value axis, series-major: `offsets[series][category]`.\n *\n * `'none'` and `'grouped'` give every series the same span it would have alone - the two differ in\n * where the band puts them, which is geometry rather than value. The stacking modes run a\n * POSITIVE and a NEGATIVE pile per category, so a negative segment hangs below the baseline\n * instead of being subtracted from the positive pile it sits in.\n *\n * `'normalized'` divides a running SUM rather than each share in turn: adding 20/60 to 40/60\n * lands on 0.9999999999999999, which draws a category that visibly falls short of full.\n *\n * @internal */\nexport function stackOffsets(\n series: readonly (readonly number[])[],\n mode: ChartStackMode,\n): readonly (readonly ChartStackOffset[])[] {\n const reading = (value: number): number =>\n Number.isFinite(value) ? value : 0;\n if (mode === 'none' || mode === 'grouped') {\n return series.map((values) =>\n values.map((value) => ({ from: 0, to: reading(value) })),\n );\n }\n const magnitude: number[] = [];\n if (mode === 'normalized') {\n for (const values of series) {\n values.forEach((value, category) => {\n magnitude[category] =\n (magnitude[category] ?? 0) + Math.abs(reading(value));\n });\n }\n }\n const risen: number[] = [];\n const fallen: number[] = [];\n\n return series.map((values) =>\n values.map((raw, category) => {\n const value = reading(raw);\n const pile = value < 0 ? fallen : risen;\n const from = pile[category] ?? 0;\n const to = from + value;\n pile[category] = to;\n const total = mode === 'normalized' ? (magnitude[category] ?? 0) : 1;\n\n return total > 0\n ? { from: from / total, to: to / total }\n : { from: 0, to: 0 };\n }),\n );\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport type { ChartAxis } from '@ids-group-ltd/ids-design-system/core';\n\n/** The drawable rectangle inside `ds-chart`, in CSS pixels: the container measures itself and\n * sizes its `viewBox` so one user unit is one pixel. A length written into a mark is therefore\n * the length it says it is, at every card width. The gutters outside it carry the axis labels. */\nexport interface ChartPlot {\n readonly width: number;\n readonly height: number;\n readonly left: number;\n readonly top: number;\n}\n\n/** What `ds-chart` offers the marks projected into it: one shared coordinate space, one shared\n * value domain, and one shared idea of which category the reader is on.\n *\n * A mark injects the token, reports the values it intends to draw, and reads its coordinates\n * back. It never sees the other marks, and the container never learns what kind of mark it is\n * holding - which is what lets a reference line, a bar series and an annotation share an axis\n * without any of them importing the others. */\nexport interface ChartScales {\n readonly categories: Signal<readonly string[]>;\n readonly plot: Signal<ChartPlot>;\n /** The CENTRE of a category's band. A mark with a width of its own subtracts half of\n * `bandWidth` to reach its leading edge. */\n readonly xPosition: Signal<(index: number) => number>;\n /** Clamped into the plot, so a value outside the drawn domain lands on an edge rather than\n * over the axis labels. */\n readonly yPosition: Signal<(value: number) => number>;\n readonly bandWidth: Signal<number>;\n /** The rectangle a secondary-axis mark draws in. The same one as `plot` unless the two axes are\n * stacked, where it is the lower of the two plots. */\n readonly secondaryPlot: Signal<ChartPlot>;\n /** `yPosition` for the second value axis. Identical to it while no mark has reported against\n * that axis, so a mark may read it without first asking whether one exists. */\n readonly secondaryYPosition: Signal<(value: number) => number>;\n readonly hasSecondaryAxis: Signal<boolean>;\n /** The y of value zero, which is the baseline a bar grows from and the line a signed domain\n * is read against. */\n readonly zeroOffset: Signal<number>;\n /** The category under the pointer or the keyboard, or `-1` for none. */\n readonly activeIndex: Signal<number>;\n setActiveIndex(index: number): void;\n /** Contributes values to the shared domain under an id the caller owns. Reporting again with\n * the same id replaces that contribution.\n *\n * Call it from an `effect`: a mark whose values come from a required `input` cannot read them\n * in its constructor, and the effect is also what re-reports when they change. */\n reportDomain(id: string, values: readonly number[], axis?: ChartAxis): void;\n /** Withdraws a contribution, which a mark does in `ngOnDestroy`. */\n releaseDomain(id: string): void;\n}\n\nexport const CHART_SCALES = new InjectionToken<ChartScales>('CHART_SCALES');\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Signal,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport {\n bandScale,\n defaultChartFormat,\n elementWidth,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartAxisMode,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n CHART_AXIS_LABEL_GAP,\n CHART_BAND_PADDING,\n CHART_CATEGORY_LABEL_OFFSET,\n CHART_DEFAULT_AXIS_GUTTER,\n CHART_DEFAULT_PLOT_HEIGHT,\n CHART_DEFAULT_TICK_COUNT,\n CHART_DEFAULT_VALUE_SPACE,\n CHART_EDGE_GUTTER,\n CHART_FALLBACK_WIDTH,\n CHART_STACKED_PLOT_GAP,\n axisDomain,\n chartPlot,\n chartViewHeight,\n secondaryAxis,\n valueScale,\n} from './chart.math';\nimport {\n CHART_SCALES,\n type ChartPlot,\n type ChartScales,\n} from './chart-scales.token';\n\n@Component({\n selector: 'ds-chart',\n standalone: true,\n imports: [SkeletonComponent],\n templateUrl: './chart.component.html',\n styleUrl: './chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n '[class.measuring]': '!settled()',\n '[style.--_chart-view-height]': \"viewHeight() + 'px'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: CHART_SCALES,\n useExisting: forwardRef(() => ChartComponent),\n },\n ],\n})\nexport class ChartComponent implements ChartScales {\n /** The category axis. Every projected mark is positioned against this list, so its length is\n * what decides how many bands the plot has. */\n readonly categories = input<readonly string[]>([]);\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks snap to a round step, so\n * the axis may carry one more or one fewer. */\n readonly tickCount = input(CHART_DEFAULT_TICK_COUNT, {\n transform: numberAttribute,\n });\n\n /** Pins the floor of the value axis instead of deriving it from the marks. It only ever opens\n * the axis further: a floor above the data would push readings off the plot. */\n readonly min = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Pins the ceiling of the value axis. See `min`. Two charts drawn one subject at a time are\n * only comparable when both are pinned. */\n readonly max = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Height of the plot itself, in CSS pixels, axis labels and value headroom excluded. Real\n * pixels rather than a share of the width: one viewBox unit is one pixel, so a card that\n * widens spreads the categories further apart and leaves the plot exactly this tall. */\n readonly plotHeight = input(CHART_DEFAULT_PLOT_HEIGHT, {\n transform: numberAttribute,\n });\n\n /** Width in CSS pixels of the gutter down the left that carries the value-axis labels. Widen it\n * for long tick labels; the plot takes whatever is left. */\n readonly axisGutter = input(CHART_DEFAULT_AXIS_GUTTER, {\n transform: numberAttribute,\n });\n\n /** Pixels reserved for a value label at each end of the plot: above the top tick for a mark at\n * the ceiling, and below the baseline for a negative mark, whose label would otherwise print\n * over the category labels. Reserved whether or not a mark draws one, because a chart that\n * gains a label on one value must not change height. */\n readonly valueSpace = input(CHART_DEFAULT_VALUE_SPACE, {\n transform: numberAttribute,\n });\n\n /** Printed above the plot as the chart's visible title. */\n readonly caption = input<string | null>(null);\n\n /** Whether the projected marks answer to the pointer and the keyboard. The container draws no\n * marks of its own and only reads this for the plot's role: a group of controls to step\n * through, against a single image to be described. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Accessible name for the plot. The container holds no readings of its own, so a chart that\n * needs its numbers described supplies the sentence here - `describeSeries` is what the five\n * presets build it with. It is the whole label in the static case, where nothing else is\n * reachable. */\n readonly summary = input<string | null>(null);\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves it bare, for one placed inside a card the page has already drawn. Unset\n * falls back to `DS_CONFIG.chart.frame`, then `'auto'`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Draws a placeholder in place of the plot, at the plot's own height, so the page does not\n * resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `categories` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty\n * `categories`, because \"the request failed\" and \"there is nothing to show\" read the same to a\n * reader and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats the value-axis ticks. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the\n * browser's locale grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** How the second value axis relates to the first, once a mark has reported against it. The\n * same four words `ds-line-chart` takes. */\n readonly secondaryAxisMode = input<ChartAxisMode>('rounded');\n\n /** Paints the first axis's tick labels in the colour of the marks measured against it. A\n * two-scale plot is ambiguous without it - nothing on the canvas says which of two lines is\n * read against which set of numbers - and it is the author, not the container, who knows which\n * colour an axis belongs to, because several marks can share one. */\n readonly axisColor = input<string | null>(null);\n\n /** `axisColor` for the second axis. */\n readonly secondaryAxisColor = input<string | null>(null);\n\n readonly frameResolved = resolveWithConfig(\n this.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n );\n protected readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n protected readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n protected readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultChartFormat,\n );\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The `<svg>`'s own rendered width: `:host(.framed)` carries the frame padding, so the host's\n * CONTENT box - which is what a `ResizeObserver` reports - is the box the canvas fills at\n * `inline-size: 100%`. Measuring the host is therefore measuring the canvas. */\n private readonly measuredWidth = elementWidth(this.host);\n\n protected readonly viewWidth = computed(\n () => this.measuredWidth() || CHART_FALLBACK_WIDTH,\n );\n\n /** Whether the marks may animate yet. The first frame draws at `CHART_FALLBACK_WIDTH` scaled to\n * fit, so the measurement that follows moves every mark - and a mark that transitions its\n * geometry would play that correction as an animated slide on every load, hydration included.\n *\n * Two frames, not one. A transition starts when the property changes in a style that also\n * enables it, so the enabling must not land in the same style recalculation as the correction.\n * One `requestAnimationFrame` is not enough: scheduled from the change detection that writes\n * the corrected geometry, it runs at the START of the next frame, still before that geometry\n * has been through a recalculation. Measured with one frame: `transitionrun` on `x` and\n * `width`, both marks, on the same tick the class cleared. */\n protected readonly settled = signal(false);\n\n constructor() {\n effect((onCleanup) => {\n if (this.settled() || this.measuredWidth() === 0) {\n return;\n }\n let second = 0;\n const first = requestAnimationFrame(() => {\n second = requestAnimationFrame(() => this.settled.set(true));\n });\n onCleanup(() => {\n cancelAnimationFrame(first);\n cancelAnimationFrame(second);\n });\n });\n\n // The read phase, so every `getComputedTextLength` lands in one batch before any write:\n // interleaving them forces a synchronous layout per label.\n afterRenderEffect({\n read: () => {\n this.measuredLabelWidth.set(this.widestLabel('.axis-label.is-primary'));\n this.measuredSecondaryLabelWidth.set(\n this.widestLabel('.axis-label.is-secondary'),\n );\n },\n });\n }\n\n private widestLabel(selector: string): number {\n const labels =\n this.host.nativeElement.querySelectorAll<SVGTextElement>(selector);\n let widest = 0;\n for (const label of labels) {\n widest = Math.max(widest, label.getComputedTextLength());\n }\n\n return Math.ceil(widest);\n }\n\n /** Two plots, one above the other, sharing the category axis: the only mode whose second axis\n * is a second PLOT rather than a second scale over the first. */\n protected readonly stacked = computed(\n () => this.secondaryAxisMode() === 'stacked' && this.hasSecondaryAxis(),\n );\n\n protected readonly viewHeight = computed(\n () =>\n chartViewHeight(\n this.plotHeight(),\n this.valueSpace(),\n this.reachesBelowZero(),\n ) + (this.stacked() ? this.plotHeight() + CHART_STACKED_PLOT_GAP : 0),\n );\n\n /** One viewBox unit is one CSS pixel, in both axes. That is the whole point of measuring: a\n * radius, a gutter or a width cap set anywhere inside the plot is then the length it says it\n * is, at every card width, instead of a share of one that a fixed viewBox stretches. */\n protected readonly viewBox = computed(\n () => `0 0 ${this.viewWidth()} ${this.viewHeight()}`,\n );\n\n /** Widest tick label actually rendered, in the CSS pixels the canvas is drawn in. Zero until the\n * first read, and zero under SSR, where `axisGutter` alone decides. */\n private readonly measuredLabelWidth = signal(0);\n\n /** `axisGutter` is the FLOOR, not the answer: a compact number is far wider in some locales than\n * in others - `3,5 тыс.` against `3.5k` - and an SVG canvas CLIPS what a DOM column merely\n * overflowed, so a fixed gutter silently eats the leading digit. The gutter takes whichever is\n * larger, so setting the token still guarantees at least that much room.\n *\n * This converges rather than oscillating: a tick's TEXT is decided by the domain and the tick\n * count, neither of which the gutter feeds, so widening it moves the labels without rewriting\n * them and the second measurement equals the first. */\n protected readonly effectiveAxisGutter = computed(() =>\n Math.max(\n this.axisGutter(),\n this.measuredLabelWidth() + CHART_AXIS_LABEL_GAP,\n ),\n );\n\n /** Widest secondary tick label, measured the same way and for the same reason as the primary\n * one: those labels sit OUTSIDE the plot's right edge and an SVG canvas clips what a DOM\n * column merely overflowed. */\n private readonly measuredSecondaryLabelWidth = signal(0);\n\n /** The plot gives the right-hand labels room only when they are drawn there - a stacked second\n * axis puts both label columns down the left, so the plot keeps the full width. */\n protected readonly rightGutter = computed(() =>\n this.hasSecondaryAxis() && !this.stacked()\n ? Math.max(\n this.axisGutter(),\n this.measuredSecondaryLabelWidth() + CHART_AXIS_LABEL_GAP,\n )\n : CHART_EDGE_GUTTER,\n );\n\n readonly plot: Signal<ChartPlot> = computed(() =>\n chartPlot(\n this.viewWidth(),\n this.plotHeight(),\n this.effectiveAxisGutter(),\n this.valueSpace(),\n this.rightGutter(),\n ),\n );\n\n readonly secondaryPlot: Signal<ChartPlot> = computed(() => {\n const plot = this.plot();\n\n return this.stacked()\n ? { ...plot, top: plot.top + plot.height + CHART_STACKED_PLOT_GAP }\n : plot;\n });\n\n private readonly reportedDomains = signal<\n ReadonlyMap<\n string,\n { readonly axis: ChartAxis; readonly values: readonly number[] }\n >\n >(new Map());\n\n reportDomain(\n id: string,\n values: readonly number[],\n axis: ChartAxis = 'primary',\n ): void {\n this.reportedDomains.update((reported) =>\n new Map(reported).set(id, { axis, values }),\n );\n }\n\n private valuesOn(axis: ChartAxis): readonly (readonly number[])[] {\n const found: (readonly number[])[] = [];\n for (const report of this.reportedDomains().values()) {\n if (report.axis === axis) {\n found.push(report.values);\n }\n }\n\n return found;\n }\n\n releaseDomain(id: string): void {\n this.reportedDomains.update((reported) => {\n const next = new Map(reported);\n next.delete(id);\n\n return next;\n });\n }\n\n /** Compared by value, which is what stops a mark that reports AND reads `yPosition()` in one\n * effect from running forever: every report allocates a fresh `Map` and `niceDomain` a fresh\n * object, so identity always differs and the read would re-arm the write. Measured without it:\n * 97507 effect runs in 45 seconds, no Angular loop error, renderer unresponsive. */\n protected readonly domain = computed(\n () =>\n axisDomain(\n this.valuesOn('primary'),\n this.tickCount(),\n this.min(),\n this.max(),\n ),\n { equal: (a, b) => a.min === b.min && a.max === b.max },\n );\n\n readonly hasSecondaryAxis = computed(\n () => this.valuesOn('secondary').length > 0,\n );\n\n protected readonly secondary = computed(\n () =>\n secondaryAxis(\n this.ticks().map((tick) => tick.value),\n this.valuesOn('secondary'),\n this.tickCount(),\n this.secondaryAxisMode(),\n ),\n {\n equal: (a, b) =>\n a.aligned === b.aligned &&\n a.domain.min === b.domain.min &&\n a.domain.max === b.domain.max &&\n a.ticks.length === b.ticks.length &&\n a.ticks.every((tick, index) => tick === b.ticks[index]),\n },\n );\n\n readonly secondaryYPosition = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return this.yPosition();\n }\n const plot = this.secondaryPlot();\n\n return valueScale(this.secondary().domain, plot.top, plot.height);\n });\n\n protected readonly secondaryTicks = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return [];\n }\n const toY = this.secondaryYPosition();\n const format = this.valueFormatResolved();\n\n return this.secondary().ticks.map((value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }));\n });\n\n /** A second set of gridlines only where the two scales do NOT share rows: drawn against an\n * aligned axis they would land on the primary's own lines and double every stroke. */\n protected readonly showSecondaryGridlines = computed(\n () =>\n this.hasSecondaryAxis() &&\n (this.stacked() || !this.secondary().aligned) &&\n this.secondaryTicks().length > 1,\n );\n\n protected readonly secondaryLabelX = computed(() =>\n this.stacked()\n ? this.plot().left - CHART_AXIS_LABEL_GAP\n : this.plot().left + this.plot().width + CHART_AXIS_LABEL_GAP,\n );\n\n protected readonly secondaryLabelAnchor = computed(() =>\n this.stacked() ? 'end' : 'start',\n );\n\n protected readonly secondaryPlotBottom = computed(\n () => this.secondaryPlot().top + this.secondaryPlot().height,\n );\n\n /** No tint on a single-scale plot: one axis needs no telling apart, and colouring it would only\n * restate the marks' own colour in the furniture. */\n protected readonly axisLabelFill = computed(() =>\n this.hasSecondaryAxis() ? this.axisColor() : null,\n );\n\n protected readonly secondaryAxisLabelFill = computed(() =>\n this.secondaryAxisColor(),\n );\n\n private readonly bands = computed(() =>\n bandScale(this.categories().length, this.plot().width, CHART_BAND_PADDING),\n );\n\n readonly bandWidth = computed(() => this.bands().bandWidth);\n\n readonly xPosition = computed(() => {\n const plot = this.plot();\n const bands = this.bands();\n\n return (index: number) =>\n plot.left + bands.position(index) + bands.bandWidth / 2;\n });\n\n readonly yPosition = computed(() => {\n const plot = this.plot();\n\n return valueScale(this.domain(), plot.top, plot.height);\n });\n\n readonly zeroOffset = computed(() => this.yPosition()(0));\n\n readonly activeIndex = signal(-1);\n\n setActiveIndex(index: number): void {\n const last = this.categories().length - 1;\n this.activeIndex.set(\n Number.isFinite(index)\n ? Math.min(Math.max(Math.trunc(index), -1), last)\n : -1,\n );\n }\n\n protected readonly plotRight = computed(\n () => this.plot().left + this.plot().width,\n );\n protected readonly plotBottom = computed(\n () => this.plot().top + this.plot().height,\n );\n protected readonly axisLabelX = computed(\n () => this.plot().left - CHART_AXIS_LABEL_GAP,\n );\n /** Clears the same reservation the view height budgets, and only when it is there: adding it\n * unconditionally would drop the labels past a viewBox that no longer holds the space. */\n protected readonly categoryLabelY = computed(\n () =>\n this.secondaryPlotBottom() +\n (this.reachesBelowZero() ? this.valueSpace() : 0) +\n CHART_CATEGORY_LABEL_OFFSET,\n );\n\n protected readonly ticks = computed(() => {\n const domain = this.domain();\n const toY = this.yPosition();\n const format = this.valueFormatResolved();\n\n return tickValues(domain.min, domain.max, this.tickCount()).map(\n (value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }),\n );\n });\n\n protected readonly categoryLabels = computed(() => {\n const toX = this.xPosition();\n\n return this.categories().map((text, index) => ({ x: toX(index), text }));\n });\n\n protected readonly reachesBelowZero = computed(() => this.domain().min < 0);\n\n /** Empty is read off `categories` alone, never off the reported domains: the marks are\n * projected INTO the branch that this decides, so a container that waited for a report before\n * rendering them would never receive one. */\n protected readonly isEmpty = computed(() => this.categories().length === 0);\n\n protected readonly accessibleName = computed(\n () => this.summary() ?? this.caption() ?? 'Chart',\n );\n}\n","<figure class=\"chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_chart-view-height)\" />\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [style.block-size.px]=\"viewHeight()\"\n [attr.viewBox]=\"viewBox()\">\n <!-- Hidden as a group rather than on the svg: a projected mark may be focusable, and an\n aria-hidden ancestor would leave it reachable by Tab and invisible to a reader. -->\n <g\n class=\"axes\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"plotBottom()\"\n [attr.y2]=\"plotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"plot().top\"\n [attr.y2]=\"plotBottom()\" />\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track tick.value) {\n <line\n class=\"grid-line is-secondary\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n }\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryPlotBottom()\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"secondaryPlot().top\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n }\n\n @if (reachesBelowZero()) {\n <line\n class=\"zero-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"zeroOffset()\"\n [attr.y2]=\"zeroOffset()\" />\n }\n </g>\n\n <!-- Two slots, one group: a reference line has to paint UNDER the marks whatever order the\n consumer wrote it in, and a selected slot is what decides that instead of the author.\n Both stay inside `.marks`, which is what the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\n\n <g\n class=\"labels\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <text\n class=\"axis-label is-primary\"\n text-anchor=\"end\"\n [style.fill]=\"axisLabelFill()\"\n [attr.x]=\"axisLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track tick.value) {\n <text\n class=\"axis-label is-secondary\"\n [style.fill]=\"secondaryAxisLabelFill()\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n\n <!-- Over the marks, where `.marks` is under them: an annotation's LINE is furniture and\n belongs below the readings, its NAME has to survive a column drawn through it. -->\n <ng-content select=\"[dsReferenceLabel]\" />\n </g>\n </svg>\n </div>\n }\n</figure>\n","import {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport {\n CHART_SERIES_COLORS,\n defaultChartFormat,\n describeShare,\n focusMark,\n nextRovingIndex,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { ICONS } from '@ids-group-ltd/ids-design-system/core';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport { chartActiveMark } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { chartViewHeight } from './chart.math';\nimport type { ChartStackOffset } from './chart.math';\n\n/** @internal */\nexport interface ColumnSeriesPoint {\n id?: string;\n label: string;\n value: number;\n color?: string;\n fill?: 'solid' | 'hatched';\n}\n\n/** The disc's radius, and half the glyph's box, in the same CSS pixels the plot is drawn in. */\nconst PIN_DISC_RADIUS = 11;\nconst PIN_GLYPH_SIZE = 14;\n\n/** Distance from a mark's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/** Blank left at a stacked segment's lower end, so the boundary between two segments is a gap in\n * the surface colour rather than a drawn rule. A rule is a third ink the palette has to stay\n * legible against and it vanishes in print; a gap survives both, and it is the secondary encoding\n * the palette's 6-8 dE separation band asks for. */\nconst STACK_SEGMENT_GAP = 2;\n\nlet nextSeriesId = 0;\n\n/**\n * One column per datum, drawn against the scales `ds-chart` supplies.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants, so `<ds-column-series>` inside the\n * container's canvas would draw nothing. Written as `<svg:g dsColumnSeries>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas: an element the SVG specification does not know is not rendered, and neither\n // are its children. Measured in Chrome 153 - a rect under an HTML host and under an\n // SVG-namespaced unknown host both report a 0x0 box, the same rect under a `<g>` reports 80x80.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsColumnSeries]',\n standalone: true,\n exportAs: 'dsColumnSeries',\n templateUrl: './column-series.component.html',\n styleUrl: './column-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnSeriesComponent implements OnDestroy {\n private readonly scales = inject(CHART_SCALES);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this same\n * element, and a required input throws NG0950 for the pass before its own value is written. */\n readonly data = input<readonly ColumnSeriesPoint[]>([]);\n\n readonly showValues = input(true, { transform: booleanAttribute });\n\n readonly interactive = input(false, { transform: booleanAttribute });\n\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n readonly partOfWhole = input(false, { transform: booleanAttribute });\n\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n readonly tooltipLingerMs = input(0, { transform: numberAttribute });\n\n readonly valueFormat = input<ChartValueFormat>(defaultChartFormat);\n\n /** The mark's share of its category's own slot, before the maximum width caps it. Measured off\n * the slot rather than off `bandWidth()`, which has the container's own padding already taken\n * out of it - applying both would narrow every uncapped column twice. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** This series' position among the slots a category's band is divided into. */\n readonly slot = input(0, { transform: numberAttribute });\n\n /** How many slots the band is divided into - the number of series drawn side by side. One, the\n * default, is the whole band, which is what a single series has always taken. */\n readonly slotCount = input(1, { transform: numberAttribute });\n\n /** Where each mark starts and ends on the value axis, one entry per point. Unset, every mark\n * runs from zero to its own value, which is the unstacked case. */\n readonly offsets = input<readonly ChartStackOffset[] | null>(null);\n\n /** One colour for the whole series, which is what several series drawn together need. Unset,\n * each mark takes the categorical palette by its own position - the right reading when the\n * marks ARE the categories, which is the single-series case. A point's own colour wins over\n * both. */\n readonly seriesColor = input<string | null>(null);\n\n /** `seriesColor` for the fill pattern. A point's own `fill` wins. */\n readonly seriesFill = input<'solid' | 'hatched' | null>(null);\n\n /** Names the series in the tooltip, where the category then becomes the panel's heading. Unset,\n * the panel names the category instead, which is what a chart of one series has to say. */\n readonly seriesLabel = input<string | null>(null);\n\n readonly pointClicked = output<ColumnSeriesPoint>();\n\n private readonly seriesId = nextSeriesId++;\n\n private readonly domainId = `column-series-${this.seriesId}`;\n\n /** Per instance: two charts on one page would otherwise share the first `<pattern>` to reach the\n * document, and every hatched mark would take that chart's colour. */\n protected readonly hatchId = `ds-column-hatch-${this.seriesId}`;\n\n /** Where each mark actually spans, which is what the axis has to hold: a stacked segment's top\n * is its category's running total, not its own reading. */\n private readonly spans = computed<readonly ChartStackOffset[]>(() => {\n const given = this.offsets();\n\n return this.data().map(\n (point, index) =>\n given?.[index] ?? {\n from: 0,\n to: Number.isFinite(point.value) ? point.value : 0,\n },\n );\n });\n\n constructor() {\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.spans().flatMap((span) => [span.from, span.to]),\n ),\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseDomain(this.domainId);\n }\n\n readonly activeMark = chartActiveMark(() => this.tooltipLingerMs());\n\n /** One SERIES' slot inside a category's band: the whole band while a chart draws one series,\n * a share of it per series when several are grouped. The box that catches the pointer is sized\n * from this rather than from the drawn column, so a short column stays reachable. */\n private readonly slotStep = computed(() => {\n const count = this.data().length;\n const slots = Math.max(1, this.slotCount());\n\n return count > 0 ? this.scales.plot().width / count / slots : 0;\n });\n\n protected readonly slotStepPx = computed(() => `${this.slotStep()}px`);\n\n protected readonly markWidthPx = computed(\n () => `${this.slotStep() * this.columnWidthRatio()}px`,\n );\n\n /** The whole canvas, reserved end included. Overshooting when the container drops that\n * reservation costs nothing - the outer `<svg>` clips it - while falling short would leave a\n * strip under the plot that answers no pointer. */\n protected readonly hitHeight = computed(() => {\n const plot = this.scales.plot();\n\n return chartViewHeight(plot.height, plot.top, true);\n });\n\n protected readonly pinDiscRadius = PIN_DISC_RADIUS;\n protected readonly pinGlyphSize = PIN_GLYPH_SIZE;\n protected readonly pinGlyphOffset = -PIN_GLYPH_SIZE / 2;\n protected readonly pinGlyph: SafeHtml = inject(\n DomSanitizer,\n ).bypassSecurityTrustHtml(ICONS.pin);\n\n protected readonly marks = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const spans = this.spans();\n const format = this.valueFormat();\n\n return this.data().map((point, index) => {\n const span = spans[index];\n const foot = toY(span.from);\n const tip = toY(span.to);\n const below = tip > foot;\n // Only a segment that has one under it gives up the gap: taking it off the baseline segment\n // would lift the whole stack off the axis.\n const gap =\n span.from === 0 ? 0 : Math.min(STACK_SEGMENT_GAP, Math.abs(tip - foot));\n const baseline = below ? foot + gap : foot - gap;\n const color =\n point.color ??\n this.seriesColor() ??\n CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n\n return {\n key: point.id ?? String(index),\n point,\n x: toX(index),\n tip,\n below,\n baseline,\n top: Math.min(tip, baseline),\n height: Math.abs(tip - baseline),\n labelY: below ? tip + VALUE_LABEL_GAP : tip - VALUE_LABEL_GAP,\n pinY: Math.min(tip, baseline) + PIN_DISC_RADIUS,\n // Growing from the baseline, never the mark's own tip - a column below zero grows\n // downward, so its transform-origin flips to the top edge it hangs from.\n origin: below ? 'top' : 'bottom',\n formattedValue: format(point.value, 'tooltip'),\n color,\n hatched: (point.fill ?? this.seriesFill()) === 'hatched',\n };\n });\n });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n protected onMarkClick(\n payload: ColumnSeriesPoint,\n index: number,\n event: Event,\n ): void {\n this.pointClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(\n index,\n event,\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n }\n }\n\n protected onMarkEnter(index: number, event: Event): void {\n this.activeMark.enter(\n index,\n event,\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n }\n\n /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable, and that is what keeps a\n * twenty-five mark chart from being twenty-five stops in the page's tab order. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.marks().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.onMarkEnter(index, event);\n }\n\n protected onMarkNavigation(event: KeyboardEvent, index: number): void {\n const next = nextRovingIndex(event.key, index, this.marks().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.columns'), next);\n }\n\n protected onPointKey(point: ColumnSeriesPoint, event: Event): void {\n // Only the column's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.pointClicked.emit(point);\n }\n\n protected entryLabel(mark: {\n point: ColumnSeriesPoint;\n formattedValue: string;\n }): string {\n return `${mark.point.label}, ${mark.formattedValue}`;\n }\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n const mark = this.marks()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !mark) {\n return null;\n }\n\n const series = this.seriesLabel();\n\n return {\n category: series ? mark.point.label : '',\n entries: [\n {\n label: series ?? mark.point.label,\n value: mark.point.value,\n formatted: mark.formattedValue,\n color: mark.color,\n detail: this.partOfWhole()\n ? describeShare(\n this.data().map((point) => point.value),\n this.activeMark.index(),\n )\n : undefined,\n },\n ],\n };\n });\n}\n","<svg:g\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [style.--_column-chart-column-share]=\"markWidthPx()\"\n [style.--_column-chart-slot-step]=\"slotStepPx()\"\n [style.--_column-slot]=\"slot()\"\n [style.--_column-slots]=\"slotCount()\">\n <!-- `userSpaceOnUse`, so the stripe pitch is the same on a tall column and a short one: with the\n default object bounding box it would scale with each mark and read as a different texture\n per bar. -->\n <svg:defs>\n <svg:pattern\n class=\"hatch\"\n patternUnits=\"userSpaceOnUse\"\n width=\"8\"\n height=\"8\"\n patternTransform=\"rotate(45)\"\n [attr.id]=\"hatchId\">\n <svg:rect\n class=\"hatch-ground\"\n width=\"8\"\n height=\"8\" />\n\n <svg:line\n class=\"hatch-stripe\"\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"8\" />\n </svg:pattern>\n </svg:defs>\n\n @for (mark of marks(); track mark.key; let index = $index) {\n <svg:g\n class=\"column\"\n animate.leave=\"mark-leave\"\n [class.interactive]=\"interactive()\"\n [class.below-baseline]=\"mark.below\"\n [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [style.--_column-mark-height]=\"mark.height + 'px'\"\n [style.--_column-baseline-y]=\"mark.baseline + 'px'\"\n [style.--_column-x]=\"mark.x + 'px'\"\n [attr.data-mark-index]=\"index\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.aria-label]=\"interactive() ? entryLabel(mark) : null\"\n (pointerenter)=\"onMarkEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"onMarkClick(mark.point, index, $event)\"\n (keydown.enter)=\"onPointKey(mark.point, $event)\"\n (keydown.space)=\"onPointKey(mark.point, $event)\">\n <!-- The box that catches the pointer is the whole category slot, not the drawn column: a\n column two pixels tall is otherwise unreachable, and a pointer that has to find the\n mark is a pointer that misses it. -->\n <svg:rect\n class=\"hit-area\"\n y=\"0\"\n [attr.height]=\"hitHeight()\" />\n\n <svg:g\n class=\"bar\"\n animate.enter=\"mark-enter\"\n [style.transform-origin]=\"mark.origin\">\n <!-- Under the capped rect, not beside it: `rx` rounds all four corners, and the cap\n belongs on the free end alone. This one fills the two corners at the baseline back\n in, and both keep `y` and `height` a plain interpolable length, which a `<path>`\n would not. -->\n <svg:rect\n class=\"bar-base\"\n [attr.fill]=\"mark.color\" />\n\n <svg:rect\n class=\"bar-cap\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"mark.color\" />\n\n <!-- Stripes OVER the painted mark, not a pattern in place of its fill: a pattern carries\n its own colour, so one shared definition cannot take each mark's. Painting the surface\n colour through it leaves the mark's own hue showing between the stripes. -->\n @if (mark.hatched) {\n <svg:rect\n class=\"bar-hatch\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"'url(#' + hatchId + ')'\" />\n }\n </svg:g>\n\n @if (showValues()) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.y]=\"mark.labelY\">\n {{ mark.formattedValue }}\n </svg:text>\n }\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <svg:g\n class=\"pin-marker\"\n aria-hidden=\"true\"\n [attr.transform]=\"'translate(0,' + mark.pinY + ')'\">\n <svg:circle\n class=\"pin-disc\"\n [attr.r]=\"pinDiscRadius\" />\n\n <svg:svg\n class=\"pin-glyph\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.x]=\"pinGlyphOffset\"\n [attr.y]=\"pinGlyphOffset\"\n [attr.width]=\"pinGlyphSize\"\n [attr.height]=\"pinGlyphSize\"\n [innerHTML]=\"pinGlyph\" />\n </svg:g>\n }\n </svg:g>\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n areaPath,\n defaultChartFormat,\n focusMark,\n lineSegments,\n nextRovingIndex,\n polylinePoints,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { LinePoint } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ChartAxis,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { chartActiveMark } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\n\n/** @internal */\nexport interface LineSeriesData {\n id: string;\n label: string;\n /** One reading per category. A `null` is a missing reading, and `gaps` decides what it draws. */\n data: readonly (number | null)[];\n /** Which value axis the readings are measured against. Defaults to `'primary'`. */\n axis?: ChartAxis;\n /** Fills the band between the line and its axis baseline. */\n area?: boolean;\n /** Any CSS colour. Unset takes the categorical palette slot for the series' position. */\n color?: string;\n}\n\n/** What a `null` reading draws: a hole in the line, or a point at zero.\n *\n * @internal */\nexport type LineSeriesGaps = 'break' | 'zero';\n\nlet nextSeriesId = 0;\n\n/**\n * One line per series, drawn against the scales `ds-chart` supplies, on either of its two value\n * axes.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsLineSeries>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsLineSeries]',\n standalone: true,\n exportAs: 'dsLineSeries',\n templateUrl: './line-series.component.html',\n styleUrl: './line-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineSeriesComponent implements OnDestroy {\n private readonly scales = inject(CHART_SCALES);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this same\n * element, and a required input throws NG0950 for the pass before its own value is written. */\n readonly data = input<readonly LineSeriesData[]>([]);\n\n readonly showMarkers = input(true, { transform: booleanAttribute });\n\n readonly interactive = input(false, { transform: booleanAttribute });\n\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n readonly gaps = input<LineSeriesGaps>('break');\n\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n readonly tooltipLingerMs = input(0, { transform: numberAttribute });\n\n readonly valueFormat = input<ChartValueFormat>(defaultChartFormat);\n\n readonly pointClicked = output<{\n series: LineSeriesData;\n categoryIndex: number;\n value: number;\n }>();\n\n private readonly domainId = `line-series-${nextSeriesId++}`;\n\n constructor() {\n effect(() => {\n this.scales.reportDomain(\n `${this.domainId}-primary`,\n this.valuesOn('primary'),\n 'primary',\n );\n this.scales.reportDomain(\n `${this.domainId}-secondary`,\n this.valuesOn('secondary'),\n 'secondary',\n );\n });\n }\n\n ngOnDestroy(): void {\n this.scales.releaseDomain(`${this.domainId}-primary`);\n this.scales.releaseDomain(`${this.domainId}-secondary`);\n }\n\n readonly activeMark = chartActiveMark(() => this.tooltipLingerMs());\n\n private valuesOn(axis: ChartAxis): number[] {\n return this.data()\n .filter((series) => (series.axis ?? 'primary') === axis)\n .flatMap((series) =>\n series.data.filter((value): value is number => value !== null),\n );\n }\n\n /** A `null` past the end is the same missing reading as a `null` inside the run, so a series\n * shorter than `categories` ends its line rather than running off the plot's edge. */\n private readingsOf(series: LineSeriesData, count: number): (number | null)[] {\n const zeroed = this.gaps() === 'zero';\n const readings: (number | null)[] = [];\n for (let index = 0; index < count; index++) {\n const raw = series.data[index];\n const reading =\n typeof raw === 'number' && Number.isFinite(raw) ? raw : null;\n readings.push(reading === null && zeroed ? 0 : reading);\n }\n\n return readings;\n }\n\n protected readonly plotted = computed(() => {\n const toX = this.scales.xPosition();\n const primaryY = this.scales.yPosition();\n const secondaryY = this.scales.secondaryYPosition();\n const categories = this.scales.categories();\n let markerIndex = 0;\n\n return this.data().map((series, index) => {\n const secondary = (series.axis ?? 'primary') === 'secondary';\n const toY = secondary ? secondaryY : primaryY;\n const color =\n series.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n const points: (LinePoint | null)[] = this.readingsOf(\n series,\n categories.length,\n ).map((value, categoryIndex) =>\n value === null\n ? null\n : {\n categoryIndex,\n x: toX(categoryIndex),\n y: toY(value),\n value,\n },\n );\n const segments = lineSegments(points);\n const format = this.valueFormat();\n\n return {\n series,\n color,\n seriesIndex: index,\n polylines: segments.map((segment) => polylinePoints(segment)),\n areaPaths: series.area\n ? segments.map((segment) => areaPath(segment, toY(0)))\n : [],\n markers: points\n .filter((point): point is LinePoint => point !== null)\n .map((point) => ({\n key: `${series.id}-${point.categoryIndex}`,\n markIndex: markerIndex++,\n x: point.x,\n y: point.y,\n value: point.value,\n category: categories[point.categoryIndex] ?? '',\n formattedValue: format(point.value, 'tooltip'),\n seriesLabel: series.label,\n seriesId: series.id,\n categoryIndex: point.categoryIndex,\n color,\n })),\n };\n });\n });\n\n private readonly allMarkers = computed(() =>\n this.plotted().flatMap((entry) => entry.markers),\n );\n\n protected seriesStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.allMarkers().length - 1)),\n );\n\n protected onMarkerEnter(markIndex: number, event: Event): void {\n this.activeMark.enter(markIndex, event);\n }\n\n protected onMarkerFocus(markIndex: number, event: FocusEvent): void {\n this.rovingIndex.set(markIndex);\n this.onMarkerEnter(markIndex, event);\n }\n\n protected onMarkerNavigation(event: KeyboardEvent, markIndex: number): void {\n const next = nextRovingIndex(\n event.key,\n markIndex,\n this.allMarkers().length,\n );\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.lines'), next);\n }\n\n protected onMarkerClick(markIndex: number): void {\n const marker = this.allMarkers()[markIndex];\n const series = this.data().find((entry) => entry.id === marker?.seriesId);\n if (marker && series) {\n this.pointClicked.emit({\n series,\n categoryIndex: marker.categoryIndex,\n value: marker.value,\n });\n }\n }\n\n protected markerLabel(marker: {\n seriesLabel: string;\n category: string;\n formattedValue: string;\n }): string {\n return `${marker.seriesLabel}, ${marker.category}, ${marker.formattedValue}`;\n }\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n const marker = this.allMarkers()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !marker) {\n return null;\n }\n\n return {\n category: marker.category,\n entries: [\n {\n label: marker.seriesLabel,\n value: marker.value,\n formatted: marker.formattedValue,\n color: marker.color,\n },\n ],\n };\n });\n}\n","<svg:g class=\"lines\">\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.areaPaths; track $index) {\n <svg:path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (entry of plotted(); track entry.series.id) {\n @for (points of entry.polylines; track $index) {\n <svg:polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (entry of plotted(); track entry.series.id) {\n @for (marker of entry.markers; track marker.key) {\n <svg:circle\n class=\"series-marker\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.markIndex === activeMark.index()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.data-mark-index]=\"marker.markIndex\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (marker.markIndex === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.aria-label]=\"interactive() ? markerLabel(marker) : null\"\n (pointerenter)=\"onMarkerEnter(marker.markIndex, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkerFocus(marker.markIndex, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkerNavigation($event, marker.markIndex)\"\n (click)=\"onMarkerClick(marker.markIndex)\"\n (keydown.enter)=\"onMarkerClick(marker.markIndex)\"\n (keydown.space)=\"onMarkerClick(marker.markIndex)\" />\n }\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\n/**\n * The names of a chart's reference lines, laid out by the same geometry that draws them.\n *\n * A second element rather than part of `g[dsReferenceLine]`: the strokes belong under the marks\n * and the names over them, and a projected element lands in exactly one of the container's slots.\n * Reports no domain - the line it names already did.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLabel]',\n standalone: true,\n templateUrl: './reference-label.component.html',\n styleUrl: './reference-label.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLabelComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ).filter((mark) => mark.label !== ''),\n );\n}\n","<svg:g class=\"reference-labels\">\n @for (line of lines(); track line.key) {\n <svg:text\n class=\"threshold-label\"\n text-anchor=\"start\"\n [style.--_chart-threshold-color]=\"line.color\"\n [attr.x]=\"line.labelX\"\n [attr.y]=\"line.labelY\">\n {{ line.label }}\n </svg:text>\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\nlet nextReferenceId = 0;\n\n/**\n * Reference lines and bands across the plot, drawn against the scales `ds-chart` supplies.\n *\n * Strokes only: the LABELS are a second element, `g[dsReferenceLabel]`, because the two belong in\n * different layers of the canvas - a line reads as furniture under the marks, a label has to stay\n * legible over them - and one projected element can only land in one of the container's slots.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsReferenceLine>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLine]',\n standalone: true,\n templateUrl: './reference-line.component.html',\n styleUrl: './reference-line.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLineComponent implements OnDestroy {\n private readonly scales = inject(CHART_SCALES);\n\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n private readonly domainId = `reference-line-${nextReferenceId++}`;\n\n constructor() {\n // Reported like a series: a target above every reading is the one the reader most needs to\n // see, and an axis derived from the data alone would draw it off the plot.\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.thresholds().flatMap((threshold) =>\n threshold.to == null\n ? [threshold.value]\n : [threshold.value, threshold.to],\n ),\n ),\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseDomain(this.domainId);\n }\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ),\n );\n}\n","<svg:g\n class=\"references\"\n aria-hidden=\"true\">\n @for (line of lines(); track line.key) {\n <svg:g\n class=\"reference\"\n [style.--_chart-threshold-color]=\"line.color\">\n @if (line.band) {\n <svg:rect\n class=\"threshold-band\"\n [attr.x]=\"line.left\"\n [attr.y]=\"line.top\"\n [attr.width]=\"line.width\"\n [attr.height]=\"line.height\" />\n } @else {\n <svg:line\n class=\"threshold-line\"\n [class.is-dashed]=\"line.dash === 'dashed'\"\n [class.is-dotted]=\"line.dash === 'dotted'\"\n [attr.x1]=\"line.left\"\n [attr.x2]=\"line.right\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\" />\n }\n </svg:g>\n }\n</svg:g>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextSeriesId"],"mappings":";;;;;;;;AAeO,MAAM,wBAAwB,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC;AAC9B,MAAM,2BAA2B,GAAG,EAAE;AACtC,MAAM,kBAAkB,GAAG,GAAG;AAErC;;;;;;;;AAQgB;AACT,MAAM,oBAAoB,GAAG,GAAG;AAEhC,MAAM,yBAAyB,GAAG,GAAG;AACrC,MAAM,yBAAyB,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