@ojiepermana/angular 21.1.9 → 21.1.12
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/README.md +13 -0
- package/brand/etos/README.md +16 -69
- package/etos/styles/color.css +52 -0
- package/etos/styles/layout.css +0 -165
- package/fesm2022/ojiepermana-angular-brand-etos.mjs +398 -234
- package/fesm2022/ojiepermana-angular-brand-etos.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-chart.mjs +72 -72
- package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component.mjs +306 -296
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout.mjs +75 -56
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +279 -258
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme.mjs +3 -3
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/generator/api/README.md +17 -10
- package/generator/api/bin/schematics/sdk/index.js +18 -0
- package/generator/api/bin/src/layout/per-domain.js +15 -7
- package/generator/api/bin/src/writer/index.js +24 -11
- package/package.json +1 -1
- package/theme/styles/themes/taildwind.css +3 -0
- package/types/ojiepermana-angular-brand-etos.d.ts +30 -53
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-layout.d.ts +18 -11
- package/types/ojiepermana-angular-navigation.d.ts +28 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-chart.mjs","sources":["../../../projects/angular/chart/src/lib/core/chart-config.ts","../../../projects/angular/chart/src/lib/core/chart-context.ts","../../../projects/angular/chart/src/lib/core/chart-style.ts","../../../projects/angular/chart/src/lib/core/chart-container.ts","../../../projects/angular/chart/src/lib/core/cartesian-context.ts","../../../projects/angular/chart/src/lib/core/ticks.ts","../../../projects/angular/chart/src/lib/core/viewport.ts","../../../projects/angular/chart/src/lib/primitives/chart-axis-x.ts","../../../projects/angular/chart/src/lib/primitives/chart-axis-y.ts","../../../projects/angular/chart/src/lib/primitives/chart-grid.ts","../../../projects/angular/chart/src/lib/primitives/chart-crosshair.ts","../../../projects/angular/chart/src/lib/core/categorical-viewport-context.ts","../../../projects/angular/chart/src/lib/core/scatter-viewport-context.ts","../../../projects/angular/chart/src/lib/core/pointer-util.ts","../../../projects/angular/chart/src/lib/primitives/chart-brush.ts","../../../projects/angular/chart/src/lib/primitives/chart-pointer-tracker.ts","../../../projects/angular/chart/src/lib/primitives/chart-tooltip.ts","../../../projects/angular/chart/src/lib/primitives/chart-legend.ts","../../../projects/angular/chart/src/lib/primitives/chart-zoom-controls.ts","../../../projects/angular/chart/src/lib/primitives/pie-center.ts","../../../projects/angular/chart/src/lib/primitives/radial-center.ts","../../../projects/angular/chart/src/lib/charts/bar/bar-layout.ts","../../../projects/angular/chart/src/lib/charts/bar/bar-chart.ts","../../../projects/angular/chart/src/lib/charts/line/line-layout.ts","../../../projects/angular/chart/src/lib/charts/line/cartesian-adapter.ts","../../../projects/angular/chart/src/lib/charts/line/line-chart.ts","../../../projects/angular/chart/src/lib/charts/area/area-chart.ts","../../../projects/angular/chart/src/lib/charts/pie/pie-layout.ts","../../../projects/angular/chart/src/lib/charts/pie/pie-chart.ts","../../../projects/angular/chart/src/lib/charts/radar/radar-layout.ts","../../../projects/angular/chart/src/lib/charts/radar/radar-chart.ts","../../../projects/angular/chart/src/lib/charts/radial/radial-layout.ts","../../../projects/angular/chart/src/lib/charts/radial/radial-chart.ts","../../../projects/angular/chart/src/lib/charts/scatter/scatter-layout.ts","../../../projects/angular/chart/src/lib/charts/scatter/scatter-chart.ts","../../../projects/angular/chart/public-api.ts","../../../projects/angular/chart/ojiepermana-angular-chart.ts"],"sourcesContent":["import type { Type } from '@angular/core';\n\n/**\n * Theme-aware color definition for a chart series.\n *\n * Either:\n * - a single `color` string (raw CSS color — hex, hsl, oklch, CSS var ref), or\n * - a `theme` map whose keys match the document color scheme (`light` / `dark`).\n *\n * Values are injected verbatim into a scoped `<style>` block as\n * `--color-<key>: <value>;`, so any valid CSS color works.\n *\n * Defaults reference the theme tokens from `@ojiepermana/angular/theme`\n * (e.g. `'hsl(var(--chart-1))'`).\n */\nexport interface ChartSeriesConfig {\n /** Human-readable label (shown in legend, tooltip). */\n readonly label?: string;\n /** Optional icon component rendered next to the label. */\n readonly icon?: Type<unknown>;\n /** Raw color. Mutually exclusive with `theme`. */\n readonly color?: string;\n /** Theme-aware colors — keyed by color scheme. */\n readonly theme?: Readonly<Record<ChartThemeKey, string>>;\n}\n\n/** Supported color scheme keys. */\nexport type ChartThemeKey = 'light' | 'dark';\n\n/** Map of series-key → config. */\nexport type ChartConfig = Readonly<Record<string, ChartSeriesConfig>>;\n\n/** CSS selector under which a chart instance is scoped. */\nexport const CHART_DATA_ATTRIBUTE = 'data-chart';\n\n/** Default color schemes supported by the generated `<style>` block. */\nexport const CHART_THEMES: ReadonlyArray<{\n readonly key: ChartThemeKey;\n readonly selector: string;\n}> = [\n { key: 'light', selector: '' },\n { key: 'dark', selector: '[data-mode=\"dark\"]' },\n];\n\n/**\n * Generate the CSS rule-set for a chart instance: one `--color-<key>` per\n * series, scoped to the owning `[data-chart]` element, with optional dark\n * variant via `[data-mode=\"dark\"] [data-chart=\"…\"]`.\n *\n * Series without any color are skipped (consumer can fall back to a default).\n *\n * @param chartId Unique chart id (used as attribute value).\n * @param config Series configuration map.\n */\nexport function buildChartCss(chartId: string, config: ChartConfig): string {\n const entries = Object.entries(config).filter(([, cfg]) => cfg.color || cfg.theme);\n if (entries.length === 0) {\n return '';\n }\n\n return CHART_THEMES.map(({ key, selector }) => {\n const vars = entries\n .map(([seriesKey, cfg]) => {\n const value = cfg.theme?.[key] ?? cfg.color;\n return value ? ` --color-${escapeCssIdent(seriesKey)}: ${value};` : '';\n })\n .filter(Boolean)\n .join('\\n');\n\n if (!vars) {\n return '';\n }\n\n const scope = selector\n ? `${selector} [${CHART_DATA_ATTRIBUTE}=\"${chartId}\"]`\n : `[${CHART_DATA_ATTRIBUTE}=\"${chartId}\"]`;\n return `${scope} {\\n${vars}\\n}`;\n })\n .filter(Boolean)\n .join('\\n');\n}\n\n/**\n * Escape a string so it is safe to use as a CSS custom-property identifier.\n * Allows `[A-Za-z0-9_-]`; everything else becomes `_`.\n */\nfunction escapeCssIdent(input: string): string {\n return input.replace(/[^a-zA-Z0-9_-]/g, '_');\n}\n\n/** Resolve the `var(--color-<key>)` reference for a given series. */\nexport function seriesColorVar(seriesKey: string): string {\n return `var(--color-${seriesKey.replace(/[^a-zA-Z0-9_-]/g, '_')})`;\n}\n","import { Injectable, signal, computed, type Signal } from '@angular/core';\nimport type { ChartConfig } from './chart-config';\n\n/** Pixel dimensions of the chart render area. */\nexport interface ChartDimensions {\n readonly width: number;\n readonly height: number;\n}\n\n/** Active data point (for tooltip / crosshair) shared across primitives. */\nexport interface ChartActivePoint {\n readonly index: number;\n readonly datumIndex?: number;\n readonly seriesKey?: string;\n readonly clientX?: number;\n readonly clientY?: number;\n}\n\n/**\n * Shared chart state provided by `ChartContainer` to all nested chart\n * components (axes, grid, tooltip, legend, chart types).\n *\n * All state is exposed as signals so consumers can derive computed state\n * (scales, visible series, tooltip position) without manual subscriptions.\n */\n@Injectable()\nexport class ChartContext {\n /** Stable instance id — used in the `data-chart` attribute and CSS scope. */\n readonly id = signal<string>('');\n\n /** User-provided series config. */\n readonly config = signal<ChartConfig>({});\n\n /** Measured render-area dimensions (ResizeObserver-driven). */\n readonly dimensions = signal<ChartDimensions>({ width: 0, height: 0 });\n\n /** Currently highlighted data point (tooltip / crosshair). */\n readonly activePoint = signal<ChartActivePoint | null>(null);\n\n /** Series keys the user has toggled off via legend. */\n readonly hiddenSeries = signal<ReadonlySet<string>>(new Set());\n\n /** Ordered list of series keys (from `config`). */\n readonly seriesKeys: Signal<readonly string[]> = computed(() => Object.keys(this.config()));\n\n /** Series keys currently visible (config order minus `hiddenSeries`). */\n readonly visibleSeriesKeys: Signal<readonly string[]> = computed(() => {\n const hidden = this.hiddenSeries();\n return this.seriesKeys().filter((k) => !hidden.has(k));\n });\n\n /** Toggle visibility of a series. */\n toggleSeries(key: string): void {\n this.hiddenSeries.update((set) => {\n const next = new Set(set);\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n return next;\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, Renderer2, computed, effect, inject } from '@angular/core';\nimport { ChartContext } from './chart-context';\nimport { buildChartCss } from './chart-config';\n\n/**\n * Emits a scoped `<style>` block mapping every series key in the current\n * `ChartConfig` to a `--color-<key>` CSS custom property, scoped to\n * `[data-chart=\"<id>\"]`. Dark-mode values are scoped under `[data-mode=\"dark\"]`.\n *\n * Implemented as an empty component that injects a real `<style>` element\n * into its host via `Renderer2`. We avoid rendering `<style>` directly in a\n * template — Angular hoists those into component CSS and strips\n * interpolations from them.\n *\n * Consumers never instantiate this directly — `ChartContainer` renders it.\n */\n@Component({\n selector: 'ui-chart-style',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '',\n})\nexport class ChartStyle {\n private readonly ctx = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly renderer = inject(Renderer2);\n private styleEl: HTMLStyleElement | null = null;\n\n protected readonly css = computed(() => buildChartCss(this.ctx.id(), this.ctx.config()));\n\n constructor() {\n effect(() => {\n const css = this.css();\n if (!this.styleEl) {\n this.styleEl = this.renderer.createElement('style');\n this.renderer.appendChild(this.host.nativeElement, this.styleEl);\n }\n this.styleEl!.textContent = css;\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ChartContext } from './chart-context';\nimport { ChartStyle } from './chart-style';\nimport { CHART_DATA_ATTRIBUTE, type ChartConfig } from './chart-config';\n\nlet chartIdCounter = 0;\n\n/**\n * Root of every chart. Provides `ChartContext` to descendants, reflects the\n * chart id via `data-chart`, injects the per-instance CSS-variable\n * `<style>` block, and tracks its render-area dimensions via\n * `ResizeObserver`.\n *\n * Usage:\n * ```html\n * <ui-chart-container [config]=\"cfg\">\n * <ui-bar-chart [data]=\"data\" />\n * </ui-chart-container>\n * ```\n */\n@Component({\n selector: 'ui-chart-container',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ChartContext],\n imports: [ChartStyle],\n host: {\n '[attr.data-chart]': 'ctx.id()',\n '[class]': 'hostClass()',\n },\n template: `\n <ui-chart-style />\n <ng-content />\n `,\n})\nexport class ChartContainer {\n protected readonly ctx = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly zone = inject(NgZone);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Series configuration. Required for color / label resolution. */\n readonly config = input.required<ChartConfig>();\n\n /**\n * Tailwind aspect-ratio utility for the container. Defaults to `aspect-video`\n * for cartesian charts; override with `aspect-square` for radial / pie layouts.\n */\n readonly aspect = input<string>('aspect-video');\n\n protected readonly hostClass = computed(() => `relative flex ${this.aspect()} justify-center text-xs`);\n\n /**\n * Optional explicit id override. When omitted, a stable auto-id is\n * generated (`chart-<n>`), unique across the document.\n */\n readonly chartId = input<string | null>(null);\n\n constructor() {\n const autoId = `chart-${++chartIdCounter}`;\n\n // Sync id + config into the shared context.\n effect(() => {\n this.ctx.id.set(this.chartId() ?? autoId);\n });\n effect(() => {\n this.ctx.config.set(this.config());\n });\n\n // Observe host size (browser only; client-only is a confirmed constraint).\n if (isPlatformBrowser(this.platformId)) {\n afterNextRender(() => this.observeSize());\n }\n }\n\n private observeSize(): void {\n const el = this.host.nativeElement;\n if (typeof ResizeObserver === 'undefined') {\n const rect = el.getBoundingClientRect();\n this.ctx.dimensions.set({ width: rect.width, height: rect.height });\n return;\n }\n\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect;\n // Avoid NgZone churn — dimensions signal drives CD on its own.\n this.zone.run(() => this.ctx.dimensions.set({ width, height }));\n }\n });\n observer.observe(el);\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n}\n\n/**\n * Re-export the `data-chart` attribute constant for primitives that want to\n * target the same scope in their own templates.\n */\nexport { CHART_DATA_ATTRIBUTE };\n","import { Injectable, signal, type Signal } from '@angular/core';\nimport type { ScaleBand, ScaleLinear } from 'd3-scale';\n\n/** A single row of chart data — one categorical key + N numeric series. */\nexport type ChartDatum = Readonly<Record<string, unknown>>;\n\n/** Render-area margins inside the chart's SVG (px). */\nexport interface ChartMargin {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\n/** Axis orientation for cartesian charts. */\nexport type ChartOrientation = 'vertical' | 'horizontal';\n\n/** Primary axis scale — band for categorical, linear for numeric. */\nexport type CategoryScale = ScaleBand<string>;\nexport type ValueScale = ScaleLinear<number, number>;\n\n/**\n * Cartesian plotting frame shared between a chart type (Bar, Line, Area…)\n * and its axis / grid primitives.\n *\n * The owning chart component provides an instance and publishes its scales;\n * descendants read them via signals and re-render when dimensions or data\n * change.\n */\n@Injectable()\nexport class CartesianContext {\n /** Inner width (outer width − margin.left − margin.right). */\n readonly innerWidth = signal<number>(0);\n\n /** Inner height (outer height − margin.top − margin.bottom). */\n readonly innerHeight = signal<number>(0);\n\n /** Margins around the plotting area. */\n readonly margin = signal<ChartMargin>({ top: 8, right: 8, bottom: 24, left: 40 });\n\n /** Layout orientation (drives which axis holds the band scale). */\n readonly orientation = signal<ChartOrientation>('vertical');\n\n /** Band (categorical) scale. */\n readonly categoryScale = signal<CategoryScale | null>(null);\n\n /** Linear (numeric) scale. */\n readonly valueScale = signal<ValueScale | null>(null);\n\n /** Ordered category domain (e.g. x labels for vertical, y labels for horizontal). */\n readonly categories = signal<readonly string[]>([]);\n}\n\n/** Resolve the scale that maps to the X axis for a given orientation. */\nexport function xScale(\n ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>,\n): Signal<CategoryScale | ValueScale | null> {\n return ctx.orientation() === 'vertical' ? ctx.categoryScale : ctx.valueScale;\n}\n\n/** Resolve the scale that maps to the Y axis for a given orientation. */\nexport function yScale(\n ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>,\n): Signal<CategoryScale | ValueScale | null> {\n return ctx.orientation() === 'vertical' ? ctx.valueScale : ctx.categoryScale;\n}\n","import type { ScaleBand, ScaleLinear } from 'd3-scale';\n\n/** A tick descriptor for rendering axes. */\nexport interface ChartTick {\n readonly value: string | number;\n /** Offset (px) along the axis. For band scales this is the band center. */\n readonly offset: number;\n /** Display label. */\n readonly label: string;\n}\n\n/** Produce evenly-spaced ticks for a band (categorical) scale. */\nexport function bandTicks(scale: ScaleBand<string>): ChartTick[] {\n const half = scale.bandwidth() / 2;\n return scale.domain().map((value) => ({\n value,\n offset: (scale(value) ?? 0) + half,\n label: value,\n }));\n}\n\n/**\n * Produce ticks for a linear scale.\n *\n * @param scale The linear scale.\n * @param count Approximate number of ticks (hint, d3 may return fewer/more).\n * @param formatter Label formatter.\n */\nexport function linearTicks(\n scale: ScaleLinear<number, number>,\n count = 5,\n formatter: (value: number) => string = (v) => String(v),\n): ChartTick[] {\n return scale.ticks(count).map((value) => ({\n value,\n offset: scale(value),\n label: formatter(value),\n }));\n}\n","export interface ChartIndexRange {\n readonly startIndex: number;\n readonly endIndex: number;\n}\n\nexport type NumericDomain = readonly [number, number];\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport function normalizeIndexRange(start: number, end: number, maxCount: number): ChartIndexRange | null {\n if (maxCount <= 0) {\n return null;\n }\n const lo = clamp(Math.floor(Math.min(start, end)), 0, maxCount - 1);\n const hi = clamp(Math.floor(Math.max(start, end)), 0, maxCount - 1);\n return { startIndex: lo, endIndex: hi };\n}\n\nexport function effectiveIndexRange(range: ChartIndexRange | null, maxCount: number): ChartIndexRange | null {\n if (maxCount <= 0) {\n return null;\n }\n return range\n ? normalizeIndexRange(range.startIndex, range.endIndex, maxCount)\n : { startIndex: 0, endIndex: maxCount - 1 };\n}\n\nexport function indexRangeSize(range: ChartIndexRange | null, maxCount: number): number {\n const effective = effectiveIndexRange(range, maxCount);\n return effective ? effective.endIndex - effective.startIndex + 1 : 0;\n}\n\nexport function sliceByIndexRange<T>(data: readonly T[], range: ChartIndexRange | null): readonly T[] {\n if (!range) {\n return data;\n }\n return data.slice(range.startIndex, range.endIndex + 1);\n}\n\nexport function zoomIndexRange(\n current: ChartIndexRange | null,\n maxCount: number,\n anchorIndex: number,\n factor: number,\n): ChartIndexRange | null {\n const base = effectiveIndexRange(current, maxCount);\n if (!base) {\n return null;\n }\n\n const currentSize = base.endIndex - base.startIndex + 1;\n const nextSize = clamp(Math.round(currentSize * factor), 2, maxCount);\n if (nextSize >= maxCount) {\n return null;\n }\n\n const boundedAnchor = clamp(anchorIndex, base.startIndex, base.endIndex);\n const ratio = currentSize <= 1 ? 0.5 : (boundedAnchor - base.startIndex) / (currentSize - 1);\n\n let start = Math.round(boundedAnchor - ratio * (nextSize - 1));\n start = clamp(start, 0, maxCount - nextSize);\n return { startIndex: start, endIndex: start + nextSize - 1 };\n}\n\nexport function panIndexRange(\n current: ChartIndexRange | null,\n maxCount: number,\n deltaSteps: number,\n): ChartIndexRange | null {\n const base = effectiveIndexRange(current, maxCount);\n if (!base) {\n return null;\n }\n const size = base.endIndex - base.startIndex + 1;\n if (size >= maxCount) {\n return null;\n }\n\n const start = clamp(base.startIndex + deltaSteps, 0, maxCount - size);\n return { startIndex: start, endIndex: start + size - 1 };\n}\n\nexport function normalizeNumericDomain(a: number, b: number): NumericDomain {\n if (a === b) {\n return [a - 1, b + 1];\n }\n return a < b ? [a, b] : [b, a];\n}\n\nexport function zoomNumericDomain(\n current: NumericDomain,\n full: NumericDomain,\n anchor: number,\n factor: number,\n): NumericDomain {\n const currentWidth = current[1] - current[0];\n const fullWidth = full[1] - full[0];\n const nextWidth = clamp(currentWidth * factor, fullWidth / 50, fullWidth);\n if (nextWidth >= fullWidth) {\n return full;\n }\n\n const ratio = currentWidth === 0 ? 0.5 : (anchor - current[0]) / currentWidth;\n let start = anchor - ratio * nextWidth;\n start = clamp(start, full[0], full[1] - nextWidth);\n return [start, start + nextWidth];\n}\n\nexport function panNumericDomain(current: NumericDomain, full: NumericDomain, delta: number): NumericDomain {\n const width = current[1] - current[0];\n const start = clamp(current[0] + delta, full[0], full[1] - width);\n return [start, start + width];\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { bandTicks, linearTicks, type ChartTick } from '../core/ticks';\n\n/**\n * X axis for a cartesian chart. Reads scales from `CartesianContext`.\n *\n * Renders as `<svg:g>` — must be placed inside the owning chart's SVG.\n */\n@Component({\n selector: 'svg:g[ui-chart-axis-x]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-axis chart-axis-x text-muted-foreground',\n '[attr.transform]': 'transform()',\n },\n template: `\n <svg:line class=\"stroke-border\" [attr.x1]=\"0\" [attr.x2]=\"innerWidth()\" y1=\"0\" y2=\"0\" />\n @for (t of ticks(); track t.value) {\n <svg:g [attr.transform]=\"'translate(' + t.offset + ',0)'\">\n @if (tickLine()) {\n <svg:line class=\"stroke-border\" y1=\"0\" y2=\"6\" />\n }\n <svg:text\n class=\"fill-current\"\n y=\"18\"\n text-anchor=\"middle\"\n style=\"font-size: var(--text-xs); font-family: var(--font-sans)\">\n {{ t.label }}\n </svg:text>\n </svg:g>\n }\n `,\n})\nexport class ChartAxisX {\n private readonly ctx = inject(CartesianContext);\n\n /** Approximate tick count for linear (value) scales. */\n readonly tickCount = input<number>(5);\n /** Show 6-px tick marks between the axis line and the labels. */\n readonly tickLine = input<boolean>(true);\n /** Formatter for numeric tick labels. */\n readonly tickFormat = input<(value: number) => string>((v) => String(v));\n\n protected readonly innerWidth = this.ctx.innerWidth;\n protected readonly transform = computed(() => `translate(0,${this.ctx.innerHeight()})`);\n\n protected readonly ticks = computed<ChartTick[]>(() => {\n const horizontal = this.ctx.orientation() === 'horizontal';\n if (horizontal) {\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount(), this.tickFormat()) : [];\n }\n const scale = this.ctx.categoryScale();\n return scale ? bandTicks(scale) : [];\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { bandTicks, linearTicks, type ChartTick } from '../core/ticks';\n\n/**\n * Y axis for a cartesian chart. Reads scales from `CartesianContext`.\n *\n * Renders as `<svg:g>` — must be placed inside the owning chart's SVG.\n */\n@Component({\n selector: 'svg:g[ui-chart-axis-y]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-axis chart-axis-y text-muted-foreground',\n },\n template: `\n <svg:line class=\"stroke-border\" x1=\"0\" x2=\"0\" [attr.y1]=\"0\" [attr.y2]=\"innerHeight()\" />\n @for (t of ticks(); track t.value) {\n <svg:g [attr.transform]=\"'translate(0,' + t.offset + ')'\">\n @if (tickLine()) {\n <svg:line class=\"stroke-border\" x1=\"-6\" x2=\"0\" />\n }\n <svg:text\n class=\"fill-current\"\n x=\"-8\"\n dy=\"0.32em\"\n text-anchor=\"end\"\n style=\"font-size: var(--text-xs); font-family: var(--font-sans)\">\n {{ t.label }}\n </svg:text>\n </svg:g>\n }\n `,\n})\nexport class ChartAxisY {\n private readonly ctx = inject(CartesianContext);\n\n readonly tickCount = input<number>(5);\n readonly tickLine = input<boolean>(true);\n readonly tickFormat = input<(value: number) => string>((v) => String(v));\n\n protected readonly innerHeight = this.ctx.innerHeight;\n\n protected readonly ticks = computed<ChartTick[]>(() => {\n const horizontal = this.ctx.orientation() === 'horizontal';\n if (horizontal) {\n const scale = this.ctx.categoryScale();\n return scale ? bandTicks(scale) : [];\n }\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount(), this.tickFormat()) : [];\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { linearTicks } from '../core/ticks';\n\n/**\n * Horizontal / vertical grid lines for the cartesian plotting area.\n *\n * Reads tick positions from `CartesianContext.valueScale`. Direction of the\n * grid lines follows `orientation`:\n * - vertical → horizontal grid lines (one per y-tick)\n * - horizontal → vertical grid lines (one per x-tick)\n */\n@Component({\n selector: 'svg:g[ui-chart-grid]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-grid text-border',\n },\n template: `\n @for (t of ticks(); track t.value) {\n <svg:line\n class=\"stroke-border\"\n stroke-dasharray=\"3 3\"\n [attr.x1]=\"line(t.offset).x1\"\n [attr.x2]=\"line(t.offset).x2\"\n [attr.y1]=\"line(t.offset).y1\"\n [attr.y2]=\"line(t.offset).y2\" />\n }\n `,\n})\nexport class ChartGrid {\n private readonly ctx = inject(CartesianContext);\n\n readonly tickCount = input<number>(5);\n\n protected readonly ticks = computed(() => {\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount()) : [];\n });\n\n protected readonly line = (offset: number) => {\n if (this.ctx.orientation() === 'vertical') {\n return { x1: 0, x2: this.ctx.innerWidth(), y1: offset, y2: offset };\n }\n return { x1: offset, x2: offset, y1: 0, y2: this.ctx.innerHeight() };\n };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { CartesianContext } from '../core/cartesian-context';\n\n/**\n * Crosshair primitive — a line drawn through the currently active data point\n * perpendicular to the categorical axis. Reads `activePoint` from\n * `ChartContext` and the scales from `CartesianContext`.\n *\n * Place inside a cartesian chart's SVG inner group.\n */\n@Component({\n selector: 'svg:g[ui-chart-crosshair]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'chart-crosshair' },\n template: `\n @if (line(); as l) {\n <svg:line\n class=\"stroke-border\"\n stroke-dasharray=\"3 3\"\n [attr.x1]=\"l.x1\"\n [attr.x2]=\"l.x2\"\n [attr.y1]=\"l.y1\"\n [attr.y2]=\"l.y2\" />\n }\n `,\n})\nexport class ChartCrosshair {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n\n protected readonly line = computed(() => {\n const active = this.root.activePoint();\n const scale = this.cart.categoryScale();\n const categories = this.cart.categories();\n if (!active || !scale || active.index < 0 || active.index >= categories.length) {\n return null;\n }\n const base = scale(categories[active.index]) ?? 0;\n const pos = base + scale.bandwidth() / 2;\n if (this.cart.orientation() === 'vertical') {\n return { x1: pos, x2: pos, y1: 0, y2: this.cart.innerHeight() };\n }\n return { x1: 0, x2: this.cart.innerWidth(), y1: pos, y2: pos };\n });\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport type { ChartIndexRange } from './viewport';\n\n@Injectable()\nexport class CategoricalViewportContext {\n readonly dataCount = signal<number>(0);\n readonly brushRange = signal<ChartIndexRange | null>(null);\n readonly zoomRange = signal<ChartIndexRange | null>(null);\n\n readonly hasZoom = computed(() => {\n const range = this.zoomRange();\n const count = this.dataCount();\n return !!range && count > 0 && (range.startIndex > 0 || range.endIndex < count - 1);\n });\n\n resetZoom(): void {\n this.brushRange.set(null);\n this.zoomRange.set(null);\n }\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport type { ScaleLinear } from 'd3-scale';\nimport type { NumericDomain } from './viewport';\n\n@Injectable()\nexport class ScatterViewportContext {\n readonly innerWidth = signal<number>(0);\n readonly innerHeight = signal<number>(0);\n readonly fullXDomain = signal<NumericDomain | null>(null);\n readonly fullYDomain = signal<NumericDomain | null>(null);\n readonly zoomXDomain = signal<NumericDomain | null>(null);\n readonly zoomYDomain = signal<NumericDomain | null>(null);\n readonly xScale = signal<ScaleLinear<number, number> | null>(null);\n readonly yScale = signal<ScaleLinear<number, number> | null>(null);\n\n readonly hasZoom = computed(() => this.zoomXDomain() !== null || this.zoomYDomain() !== null);\n\n resetZoom(): void {\n this.zoomXDomain.set(null);\n this.zoomYDomain.set(null);\n }\n}\n","import type { CartesianContext } from './cartesian-context';\n\nexport interface ClientPoint {\n readonly clientX: number;\n readonly clientY: number;\n}\n\n/**\n * Given a pointer event's local (x, y) relative to the chart's inner group,\n * resolve the nearest category index along the categorical axis.\n *\n * @returns index into `ctx.categories()` (or −1 if no scale / no data).\n */\nexport function nearestCategoryIndex(\n ctx: Pick<CartesianContext, 'categoryScale' | 'categories' | 'orientation'>,\n localX: number,\n localY: number,\n): number {\n const scale = ctx.categoryScale();\n const categories = ctx.categories();\n if (!scale || categories.length === 0) return -1;\n\n const isVertical = ctx.orientation() === 'vertical';\n const pointerAlong = isVertical ? localX : localY;\n\n const bandwidth = scale.bandwidth();\n // scale.step() is only defined for band scales; fall back to bandwidth.\n const step = (scale as unknown as { step?: () => number }).step?.() ?? bandwidth;\n\n let bestIndex = -1;\n let bestDelta = Infinity;\n for (let i = 0; i < categories.length; i++) {\n const base = scale(categories[i]) ?? 0;\n const center = base + bandwidth / 2;\n const delta = Math.abs(pointerAlong - center);\n if (delta < bestDelta) {\n bestDelta = delta;\n bestIndex = i;\n }\n }\n\n // Ignore clicks far outside any band (> 1 step away).\n if (bestDelta > step) {\n return -1;\n }\n return bestIndex;\n}\n\n/** Resolve the client-space center point of a focused or clicked SVG/HTML element. */\nexport function elementClientCenter(target: EventTarget | null): ClientPoint | null {\n const el = target as Element | null;\n if (!el || typeof el.getBoundingClientRect !== 'function') {\n return null;\n }\n const rect = el.getBoundingClientRect();\n return {\n clientX: rect.left + rect.width / 2,\n clientY: rect.top + rect.height / 2,\n };\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, computed, inject, signal, viewChild } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\nimport { ScatterViewportContext } from '../core/scatter-viewport-context';\nimport {\n indexRangeSize,\n normalizeIndexRange,\n normalizeNumericDomain,\n panIndexRange,\n panNumericDomain,\n zoomIndexRange,\n zoomNumericDomain,\n type ChartIndexRange,\n type NumericDomain,\n} from '../core/viewport';\nimport { nearestCategoryIndex } from '../core/pointer-util';\n\ntype BrushMode = 'category-brush' | 'category-pan' | 'scatter-brush' | 'scatter-pan' | null;\n\ninterface LocalPoint {\n readonly x: number;\n readonly y: number;\n}\n\ninterface ScatterBrushState {\n readonly start: LocalPoint;\n readonly current: LocalPoint;\n}\n\ninterface ScatterPanState {\n readonly start: LocalPoint;\n readonly xDomain: NumericDomain;\n readonly yDomain: NumericDomain;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nfunction sameDomain(a: NumericDomain, b: NumericDomain): boolean {\n return Math.abs(a[0] - b[0]) < 1e-9 && Math.abs(a[1] - b[1]) < 1e-9;\n}\n\n@Component({\n selector: 'svg:g[ui-chart-brush]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-brush',\n '(window:pointermove)': 'onPointerMove($event)',\n '(window:pointerup)': 'onPointerUp($event)',\n '(window:pointercancel)': 'onPointerCancel($event)',\n },\n template: `\n <svg:rect\n #hitbox\n class=\"fill-transparent touch-none\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\"\n (wheel)=\"onWheel($event)\"\n (dblclick)=\"resetZoom()\" />\n\n @if (categoryPreview(); as rect) {\n <svg:rect\n class=\"fill-foreground/10 stroke-foreground/30\"\n [attr.x]=\"rect.x\"\n [attr.y]=\"rect.y\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n stroke-dasharray=\"4 3\" />\n }\n\n @if (scatterPreviewRect(); as rect) {\n <svg:rect\n class=\"fill-foreground/10 stroke-foreground/30\"\n [attr.x]=\"rect.x\"\n [attr.y]=\"rect.y\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n stroke-dasharray=\"4 3\" />\n }\n `,\n})\nexport class ChartBrush {\n private readonly hitbox = viewChild.required<ElementRef<SVGRectElement>>('hitbox');\n private readonly cart = inject(CartesianContext, { optional: true });\n private readonly categorical = inject(CategoricalViewportContext, { optional: true });\n private readonly scatter = inject(ScatterViewportContext, { optional: true });\n\n private readonly mode = signal<BrushMode>(null);\n private readonly activePointerId = signal<number | null>(null);\n private readonly categoryStartIndex = signal<number | null>(null);\n private readonly categoryPanStart = signal<{ coord: number; range: ChartIndexRange | null } | null>(null);\n private readonly scatterBrush = signal<ScatterBrushState | null>(null);\n private readonly scatterPan = signal<ScatterPanState | null>(null);\n\n protected readonly width = computed(() => this.scatter?.innerWidth() ?? this.cart?.innerWidth() ?? 0);\n protected readonly height = computed(() => this.scatter?.innerHeight() ?? this.cart?.innerHeight() ?? 0);\n\n protected readonly categoryPreview = computed(() => {\n const cart = this.cart;\n const viewport = this.categorical;\n const range = viewport?.brushRange();\n const scale = cart?.categoryScale();\n const categories = cart?.categories() ?? [];\n if (!cart || !viewport || !range || !scale || categories.length === 0) {\n return null;\n }\n\n const visibleStart = viewport.zoomRange()?.startIndex ?? 0;\n const startVisible = range.startIndex - visibleStart;\n const endVisible = range.endIndex - visibleStart;\n if (startVisible < 0 || endVisible >= categories.length) {\n return null;\n }\n\n const first = scale(categories[startVisible]) ?? 0;\n const last = (scale(categories[endVisible]) ?? 0) + scale.bandwidth();\n if (cart.orientation() === 'vertical') {\n return { x: Math.min(first, last), y: 0, width: Math.abs(last - first), height: cart.innerHeight() };\n }\n return { x: 0, y: Math.min(first, last), width: cart.innerWidth(), height: Math.abs(last - first) };\n });\n\n protected readonly scatterPreviewRect = computed(() => {\n const preview = this.scatterBrush();\n if (!preview) {\n return null;\n }\n return {\n x: Math.min(preview.start.x, preview.current.x),\n y: Math.min(preview.start.y, preview.current.y),\n width: Math.abs(preview.current.x - preview.start.x),\n height: Math.abs(preview.current.y - preview.start.y),\n };\n });\n\n protected onPointerDown(event: PointerEvent): void {\n if (this.activePointerId() != null) {\n return;\n }\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n\n if (this.scatter) {\n if (!this.scatter.fullXDomain() || !this.scatter.fullYDomain()) {\n return;\n }\n event.preventDefault();\n this.activePointerId.set(event.pointerId);\n this.hitbox().nativeElement.setPointerCapture(event.pointerId);\n this.onScatterPointerDown(event, local);\n return;\n }\n if (!this.cart || !this.categorical) {\n return;\n }\n\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (index < 0) {\n return;\n }\n\n event.preventDefault();\n this.activePointerId.set(event.pointerId);\n this.hitbox().nativeElement.setPointerCapture(event.pointerId);\n\n const visibleStart = this.categorical.zoomRange()?.startIndex ?? 0;\n const absoluteIndex = visibleStart + index;\n if (event.pointerType === 'touch' && this.categorical.hasZoom()) {\n this.mode.set('category-pan');\n this.categoryPanStart.set({ coord: this.pointerAxis(local), range: this.categorical.zoomRange() });\n return;\n }\n\n this.mode.set('category-brush');\n this.categoryStartIndex.set(absoluteIndex);\n this.categorical.brushRange.set({ startIndex: absoluteIndex, endIndex: absoluteIndex });\n }\n\n protected onPointerMove(event: PointerEvent): void {\n if (this.activePointerId() !== event.pointerId) {\n return;\n }\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n\n if (this.mode() === 'category-brush' && this.cart && this.categorical) {\n const startIndex = this.categoryStartIndex();\n if (startIndex == null) {\n return;\n }\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (index < 0) {\n return;\n }\n const visibleStart = this.categorical.zoomRange()?.startIndex ?? 0;\n this.categorical.brushRange.set(\n normalizeIndexRange(startIndex, visibleStart + index, this.categorical.dataCount()),\n );\n return;\n }\n\n if (this.mode() === 'category-pan' && this.cart && this.categorical) {\n const pan = this.categoryPanStart();\n if (!pan) {\n return;\n }\n const scale = this.cart.categoryScale();\n const step = scale?.step?.() ?? scale?.bandwidth() ?? 0;\n if (step <= 0) {\n return;\n }\n const deltaSteps = Math.round((pan.coord - this.pointerAxis(local)) / step);\n this.categorical.zoomRange.set(panIndexRange(pan.range, this.categorical.dataCount(), deltaSteps));\n return;\n }\n\n if (this.mode() === 'scatter-brush') {\n const preview = this.scatterBrush();\n if (!preview) {\n return;\n }\n this.scatterBrush.set({ start: preview.start, current: local });\n return;\n }\n\n if (this.mode() === 'scatter-pan' && this.scatter) {\n const pan = this.scatterPan();\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (!pan || !xScale || !yScale || !fullX || !fullY) {\n return;\n }\n const deltaX = xScale.invert(pan.start.x) - xScale.invert(local.x);\n const deltaY = yScale.invert(pan.start.y) - yScale.invert(local.y);\n this.scatter.zoomXDomain.set(panNumericDomain(pan.xDomain, fullX, deltaX));\n this.scatter.zoomYDomain.set(panNumericDomain(pan.yDomain, fullY, deltaY));\n }\n }\n\n protected onPointerUp(event?: PointerEvent): void {\n if (event && this.activePointerId() !== event.pointerId) {\n return;\n }\n if (this.mode() === 'category-brush' && this.categorical) {\n const range = this.categorical.brushRange();\n if (range && indexRangeSize(range, this.categorical.dataCount()) > 1) {\n this.categorical.zoomRange.set(range);\n }\n this.categorical.brushRange.set(null);\n }\n\n if (this.mode() === 'scatter-brush' && this.scatter) {\n const preview = this.scatterBrush();\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (preview && xScale && yScale && fullX && fullY) {\n const width = Math.abs(preview.current.x - preview.start.x);\n const height = Math.abs(preview.current.y - preview.start.y);\n if (width >= 6 && height >= 6) {\n const nextX = normalizeNumericDomain(xScale.invert(preview.start.x), xScale.invert(preview.current.x));\n const nextY = normalizeNumericDomain(yScale.invert(preview.start.y), yScale.invert(preview.current.y));\n this.scatter.zoomXDomain.set(sameDomain(nextX, fullX) ? null : nextX);\n this.scatter.zoomYDomain.set(sameDomain(nextY, fullY) ? null : nextY);\n }\n }\n this.scatterBrush.set(null);\n }\n\n this.mode.set(null);\n this.categoryStartIndex.set(null);\n this.categoryPanStart.set(null);\n this.scatterPan.set(null);\n if (event && this.hitbox().nativeElement.hasPointerCapture(event.pointerId)) {\n this.hitbox().nativeElement.releasePointerCapture(event.pointerId);\n }\n this.activePointerId.set(null);\n }\n\n protected onPointerCancel(event: PointerEvent): void {\n if (this.activePointerId() !== event.pointerId) {\n return;\n }\n if (this.hitbox().nativeElement.hasPointerCapture(event.pointerId)) {\n this.hitbox().nativeElement.releasePointerCapture(event.pointerId);\n }\n this.mode.set(null);\n this.categorical?.brushRange.set(null);\n this.scatterBrush.set(null);\n this.categoryStartIndex.set(null);\n this.categoryPanStart.set(null);\n this.scatterPan.set(null);\n this.activePointerId.set(null);\n }\n\n protected onWheel(event: WheelEvent): void {\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n event.preventDefault();\n\n if (this.scatter) {\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (!xScale || !yScale || !fullX || !fullY) {\n return;\n }\n const factor = event.deltaY < 0 ? 0.8 : 1.25;\n const currentX = this.scatter.zoomXDomain() ?? fullX;\n const currentY = this.scatter.zoomYDomain() ?? fullY;\n const nextX = zoomNumericDomain(currentX, fullX, xScale.invert(local.x), factor);\n const nextY = zoomNumericDomain(currentY, fullY, yScale.invert(local.y), factor);\n this.scatter.zoomXDomain.set(sameDomain(nextX, fullX) ? null : nextX);\n this.scatter.zoomYDomain.set(sameDomain(nextY, fullY) ? null : nextY);\n return;\n }\n\n if (!this.cart || !this.categorical) {\n return;\n }\n const visibleIndex = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (visibleIndex < 0) {\n return;\n }\n const anchor = (this.categorical.zoomRange()?.startIndex ?? 0) + visibleIndex;\n const factor = event.deltaY < 0 ? 0.75 : 1.25;\n this.categorical.zoomRange.set(\n zoomIndexRange(this.categorical.zoomRange(), this.categorical.dataCount(), anchor, factor),\n );\n this.categorical.brushRange.set(null);\n }\n\n protected resetZoom(): void {\n this.categorical?.resetZoom();\n this.scatter?.resetZoom();\n this.scatterBrush.set(null);\n }\n\n private onScatterPointerDown(event: PointerEvent, local: LocalPoint): void {\n const fullX = this.scatter?.fullXDomain();\n const fullY = this.scatter?.fullYDomain();\n if (!this.scatter || !fullX || !fullY) {\n return;\n }\n\n if (event.pointerType === 'touch' && this.scatter.hasZoom()) {\n this.mode.set('scatter-pan');\n this.scatterPan.set({\n start: local,\n xDomain: this.scatter.zoomXDomain() ?? fullX,\n yDomain: this.scatter.zoomYDomain() ?? fullY,\n });\n return;\n }\n\n this.mode.set('scatter-brush');\n this.scatterBrush.set({ start: local, current: local });\n }\n\n private localPoint(event: { clientX: number; clientY: number }): LocalPoint | null {\n const hitbox = this.hitbox()?.nativeElement;\n const width = this.width();\n const height = this.height();\n if (!hitbox || width <= 0 || height <= 0) {\n return null;\n }\n const rect = hitbox.getBoundingClientRect();\n if (rect.width <= 0 || rect.height <= 0) {\n return null;\n }\n return {\n x: clamp(((event.clientX - rect.left) / rect.width) * width, 0, width),\n y: clamp(((event.clientY - rect.top) / rect.height) * height, 0, height),\n };\n }\n\n private pointerAxis(local: LocalPoint): number {\n return this.cart?.orientation() === 'horizontal' ? local.y : local.x;\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { nearestCategoryIndex } from '../core/pointer-util';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\n\n/**\n * Attach to a chart's `<svg:svg>` to publish pointer-driven active-point\n * state into the surrounding `ChartContext`.\n *\n * Computes the local (x, y) of the pointer relative to the inner plotting\n * area, resolves the nearest category, and updates\n * `ChartContext.activePoint`. Clears it on `pointerleave`.\n */\n@Directive({\n selector: 'svg:svg[uiChartPointerTracker]',\n host: {\n '(pointermove)': 'onMove($event)',\n '(pointerleave)': 'onLeave()',\n },\n})\nexport class ChartPointerTracker {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext, { optional: true });\n\n protected onMove(event: PointerEvent): void {\n const target = event.currentTarget as SVGSVGElement | null;\n if (!target) return;\n const rect = target.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return;\n\n const { width, height } = this.root.dimensions();\n // Map client coords → viewBox coords (SVG uses `0 0 width height`,\n // preserveAspectRatio=\"none\" so axes scale independently).\n const scaleX = width / rect.width;\n const scaleY = height / rect.height;\n const viewX = (event.clientX - rect.left) * scaleX;\n const viewY = (event.clientY - rect.top) * scaleY;\n\n const margin = this.cart.margin();\n const localX = viewX - margin.left;\n const localY = viewY - margin.top;\n\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n localX,\n localY,\n );\n if (index < 0) {\n this.root.activePoint.set(null);\n return;\n }\n this.root.activePoint.set({\n index,\n datumIndex: (this.viewport?.zoomRange()?.startIndex ?? 0) + index,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n }\n\n protected onLeave(): void {\n this.root.activePoint.set(null);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n type Type,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { ChartContext } from '../core/chart-context';\nimport type { ChartDatum } from '../core/cartesian-context';\nimport { seriesColorVar } from '../core/chart-config';\n\n/** Row of data fed to tooltip templates. */\nexport interface ChartTooltipRow {\n readonly seriesKey: string;\n readonly label: string;\n readonly value: unknown;\n readonly color: string;\n readonly icon?: Type<unknown>;\n}\n\n/** Payload available to a user-supplied tooltip template. */\nexport interface ChartTooltipPayload {\n readonly category: string;\n readonly datum: ChartDatum;\n readonly rows: readonly ChartTooltipRow[];\n}\n\n/** Indicator rendered beside each tooltip row. */\nexport type ChartTooltipIndicator = 'dot' | 'line' | 'dashed' | 'none';\n\n/** Signature for the per-row value formatter (string output). */\nexport type ChartTooltipValueFormatter = (value: unknown, row: ChartTooltipRow, payload: ChartTooltipPayload) => string;\n\n/** Signature for the tooltip header (label) formatter. */\nexport type ChartTooltipLabelFormatter = (label: string, payload: ChartTooltipPayload) => string;\n\n/** Locate the chart container DOM in order to position the tooltip. */\nfunction containerRect(el: HTMLElement): DOMRect | null {\n // Climb to the nearest `[data-chart]` (the ChartContainer host).\n let node: HTMLElement | null = el;\n while (node && !node.hasAttribute('data-chart')) {\n node = node.parentElement;\n }\n return node?.getBoundingClientRect() ?? null;\n}\n\n/**\n * Tooltip overlay — renders the default tooltip card (or a user-supplied\n * template) anchored to the currently active data point.\n *\n * Shadcn-compatible knobs:\n * - `indicator=\"line\"` / `\"none\"` / `\"dashed\"` — swap the row glyph\n * - `hideLabel` — drop the header row\n * - `label=\"Activities\"` — override the header text\n * - `labelKey=\"activities\"` — resolve the header from `config[labelKey].label`\n * - `labelFormatter` — transform the header (e.g. ISO date → long date)\n * - `formatter` — format per-row values (e.g. `\"380 kcal\"`)\n * - `valueKey` — for pie/radial/radar, read row value from a single field\n * - Icons are picked up automatically from `config[key].icon`.\n */\n@Component({\n selector: 'ui-chart-tooltip',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, NgComponentOutlet],\n host: {\n class: 'pointer-events-none absolute inset-0 z-10',\n '[attr.aria-hidden]': '!visible()',\n },\n template: `\n @if (payload(); as p) {\n <div\n role=\"tooltip\"\n class=\"pointer-events-none absolute grid min-w-32 max-w-72 -translate-x-1/2 -translate-y-full gap-1.5 rounded-lg border border-border/60 bg-background px-3 py-1.5 text-xs shadow-md\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\">\n @if (customTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: p }\" />\n } @else {\n @if (!hideLabel() && headerText(p); as header) {\n <div class=\"font-medium\">{{ header }}</div>\n }\n <ul class=\"grid gap-1.5\">\n @for (row of p.rows; track row.seriesKey) {\n <li class=\"flex w-full flex-wrap items-stretch gap-2\">\n <span class=\"flex flex-1 items-center gap-1.5\">\n @switch (indicator()) {\n @case ('dot') {\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-sm\"\n [style.background]=\"row.color\"\n [style.borderColor]=\"row.color\"></span>\n }\n @case ('line') {\n <span class=\"h-full min-h-4 w-1 shrink-0 rounded-sm\" [style.background]=\"row.color\"></span>\n }\n @case ('dashed') {\n <span\n class=\"h-0 w-3 shrink-0 self-center border-t-2 border-dashed\"\n [style.borderColor]=\"row.color\"></span>\n }\n }\n @if (row.icon; as icon) {\n <span class=\"mr-1 inline-flex items-center text-muted-foreground\">\n <ng-container *ngComponentOutlet=\"icon\" />\n </span>\n }\n <span class=\"text-muted-foreground\">{{ row.label }}</span>\n </span>\n <span class=\"font-mono font-medium tabular-nums text-foreground\">\n {{ formatRow(row, p) }}\n </span>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Live region — announces category changes to AT. -->\n <div class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n @if (payload(); as p) {\n {{ p.category }}\n }\n </div>\n `,\n})\nexport class ChartTooltip {\n private readonly root = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Data key on each datum whose value is the category label (x-axis). */\n readonly xKey = input<string | null>(null);\n /** Data source (optional — if omitted tooltip reads from chart data via activePoint.datumIndex). */\n readonly data = input<readonly ChartDatum[] | null>(null);\n /**\n * Optional key for per-datum value lookup (pie / radial / radar datasets\n * store values on a single field like `visitors` instead of one field per\n * series). When set and `activePoint.seriesKey` is active, the tooltip row\n * reads `datum[valueKey]` for its value.\n */\n readonly valueKey = input<string | null>(null);\n\n /** Indicator variant next to each row. Default `'dot'`. */\n readonly indicator = input<ChartTooltipIndicator>('dot');\n /** Hide the header label entirely. */\n readonly hideLabel = input<boolean>(false);\n /** Override the header label with a fixed string. Takes precedence over `labelKey`. */\n readonly label = input<string | null>(null);\n /**\n * Resolve the header label from `config[labelKey].label`. Useful when the\n * header should come from a config entry rather than the datum itself\n * (shadcn's \"Custom label\" variant).\n */\n readonly labelKey = input<string | null>(null);\n /** Transform the final header string (e.g. ISO date → long date). */\n readonly labelFormatter = input<ChartTooltipLabelFormatter | null>(null);\n /** Format each row's value (return string — HTML is not interpreted). */\n readonly formatter = input<ChartTooltipValueFormatter | null>(null);\n\n readonly customTpl = contentChild(TemplateRef<{ $implicit: ChartTooltipPayload }>);\n\n protected readonly visible = computed(() => this.root.activePoint() !== null);\n\n protected readonly payload = computed<ChartTooltipPayload | null>(() => {\n const active = this.root.activePoint();\n const rows = this.data();\n if (!active || !rows) return null;\n const dataIndex = active.datumIndex != null && active.datumIndex < rows.length ? active.datumIndex : active.index;\n if (dataIndex < 0 || dataIndex >= rows.length) return null;\n const cfg = this.root.config();\n const visibleKeys = this.root.visibleSeriesKeys();\n const datum = rows[dataIndex];\n const xKey = this.xKey();\n const category = xKey && xKey in datum ? String(datum[xKey]) : String(active.index);\n\n // When the active point targets a single series (pie/radial/radar hover),\n // collapse the tooltip to just that row.\n const activeSeriesKey = active.seriesKey && visibleKeys.includes(active.seriesKey) ? active.seriesKey : null;\n const keys = activeSeriesKey ? [activeSeriesKey] : visibleKeys;\n const valueKey = this.valueKey();\n\n const tooltipRows: ChartTooltipRow[] = keys.map((k) => {\n // For single-slice hover on pie/radial/radar the value lives on a\n // shared `valueKey` field, not on a per-series column.\n const rawValue = valueKey != null && activeSeriesKey === k ? datum[valueKey] : datum[k];\n return {\n seriesKey: k,\n label: cfg[k]?.label ?? k,\n value: rawValue,\n color: seriesColorVar(k),\n icon: cfg[k]?.icon,\n };\n });\n return { category, datum, rows: tooltipRows };\n });\n\n /** Resolve the header string honoring `label`, `labelKey`, then `labelFormatter`. */\n protected headerText(p: ChartTooltipPayload): string | null {\n if (this.hideLabel()) return null;\n const override = this.label();\n const labelKey = this.labelKey();\n const cfg = this.root.config();\n const fromKey = labelKey ? (cfg[labelKey]?.label ?? labelKey) : null;\n const raw = override ?? fromKey ?? p.category;\n const fmt = this.labelFormatter();\n return fmt ? fmt(raw, p) : raw;\n }\n\n /** Apply per-row value formatter (or stringify). */\n protected formatRow(row: ChartTooltipRow, p: ChartTooltipPayload): string {\n const fmt = this.formatter();\n if (fmt) return fmt(row.value, row, p);\n return row.value == null ? '' : String(row.value);\n }\n\n protected readonly position = computed(() => {\n const active = this.root.activePoint();\n if (!active || active.clientX == null || active.clientY == null) {\n return { x: 0, y: 0 };\n }\n // Map client coords → offset within the chart container (the element\n // marked with `data-chart`, which is our positioning ancestor).\n const rect = containerRect(this.host.nativeElement);\n if (!rect) return { x: 0, y: 0 };\n\n const tooltip = this.host.nativeElement.querySelector('[role=\"tooltip\"]') as HTMLElement | null;\n const tooltipWidth = tooltip?.offsetWidth ?? 128;\n const tooltipHeight = tooltip?.offsetHeight ?? 0;\n const padding = 8;\n\n const minX = padding + tooltipWidth / 2;\n const maxX = Math.max(minX, rect.width - padding - tooltipWidth / 2);\n const x = Math.min(maxX, Math.max(minX, active.clientX - rect.left));\n\n // Y is the tooltip's bottom edge because the card is translated upward.\n const minY = padding + tooltipHeight;\n const y = Math.max(minY, active.clientY - rect.top - padding);\n\n return { x, y };\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { seriesColorVar } from '../core/chart-config';\n\n/**\n * Legend — renders a list of series swatches. Clicking an item toggles\n * visibility via `ChartContext.toggleSeries`.\n *\n * Place as a child of `<ui-chart-container>`:\n * ```html\n * <ui-chart-container [config]=\"cfg\">\n * <ui-bar-chart ... />\n * <ui-chart-legend />\n * </ui-chart-container>\n * ```\n */\n@Component({\n selector: 'ui-chart-legend',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block pt-3' },\n template: `\n <ul class=\"flex flex-wrap items-center justify-center gap-3 text-xs\" aria-label=\"Toggle chart series visibility\">\n @for (item of items(); track item.seriesKey) {\n <li>\n <button\n type=\"button\"\n class=\"inline-flex min-h-11 items-center gap-2 rounded-md px-2.5 py-1.5 outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n [class.opacity-50]=\"item.hidden\"\n [attr.aria-pressed]=\"!item.hidden\"\n [attr.aria-label]=\"(item.hidden ? 'Show ' : 'Hide ') + item.label\"\n (click)=\"toggle(item.seriesKey)\">\n <span class=\"inline-block h-2.5 w-2.5 rounded-sm\" [style.background]=\"item.color\"></span>\n <span class=\"text-muted-foreground\">{{ item.label }}</span>\n </button>\n </li>\n }\n </ul>\n `,\n})\nexport class ChartLegend {\n private readonly root = inject(ChartContext);\n\n protected readonly items = computed(() => {\n const cfg = this.root.config();\n const hidden = this.root.hiddenSeries();\n return this.root.seriesKeys().map((key) => ({\n seriesKey: key,\n label: cfg[key]?.label ?? key,\n color: seriesColorVar(key),\n hidden: hidden.has(key),\n }));\n });\n\n protected toggle(key: string): void {\n this.root.toggleSeries(key);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\nimport { ScatterViewportContext } from '../core/scatter-viewport-context';\n\nfunction formatNumber(value: number): string {\n return Math.abs(value) >= 10 ? value.toFixed(0) : value.toFixed(1);\n}\n\n@Component({\n selector: 'ui-chart-zoom-controls',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'mt-3 flex flex-wrap items-center justify-between gap-3 text-xs text-muted-foreground' },\n template: `\n <p>{{ hint() }}</p>\n\n @if (status(); as currentStatus) {\n <div class=\"flex flex-wrap items-center gap-2\">\n <span class=\"rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n {{ currentStatus }}\n </span>\n <button\n type=\"button\"\n class=\"inline-flex min-h-11 items-center rounded-md border border-border bg-background px-3 text-foreground transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n (click)=\"resetZoom()\">\n Reset zoom\n </button>\n </div>\n }\n `,\n})\nexport class ChartZoomControls {\n private readonly categorical = inject(CategoricalViewportContext, { optional: true });\n private readonly scatter = inject(ScatterViewportContext, { optional: true });\n\n protected readonly status = computed(() => {\n if (this.categorical?.hasZoom()) {\n const range = this.categorical.zoomRange();\n const count = this.categorical.dataCount();\n if (!range) {\n return null;\n }\n return `Showing ${range.startIndex + 1}-${range.endIndex + 1} of ${count}`;\n }\n\n if (this.scatter?.hasZoom()) {\n const xDomain = this.scatter.zoomXDomain() ?? this.scatter.fullXDomain();\n const yDomain = this.scatter.zoomYDomain() ?? this.scatter.fullYDomain();\n if (!xDomain || !yDomain) {\n return null;\n }\n return `X ${formatNumber(xDomain[0])}-${formatNumber(xDomain[1])} · Y ${formatNumber(yDomain[0])}-${formatNumber(yDomain[1])}`;\n }\n\n return null;\n });\n\n protected readonly hint = computed(() => {\n if (this.scatter) {\n return 'Drag to brush a region. Use the wheel to zoom and one-finger touch drag to pan while zoomed.';\n }\n return 'Drag to select a category range. Use the wheel to zoom and one-finger touch drag to pan while zoomed.';\n });\n\n protected resetZoom(): void {\n this.categorical?.resetZoom();\n this.scatter?.resetZoom();\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ui-pie-center',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex max-w-[10rem] flex-col items-center justify-center text-center',\n },\n template: `<ng-content />`,\n})\nexport class PieCenter {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ui-radial-center',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex max-w-[10rem] flex-col items-center justify-center text-center',\n },\n template: `<ng-content />`,\n})\nexport class RadialCenter {}\n","import { scaleBand, scaleLinear } from 'd3-scale';\nimport { max as d3max, min as d3min } from 'd3-array';\nimport { stack as d3stack, type Series, type SeriesPoint } from 'd3-shape';\nimport type { ChartDatum, ChartOrientation } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\n/** Bar-chart layout variant. */\nexport type BarVariant = 'grouped' | 'stacked';\n\n/** A single bar rectangle ready to render. */\nexport interface BarRect {\n readonly key: string; // unique per cell for @for tracking\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly color: string;\n readonly active: boolean;\n}\n\n/** Inputs required to compute bar-chart geometry. */\nexport interface BarLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly seriesKeys: readonly string[];\n readonly variant: BarVariant;\n readonly orientation: ChartOrientation;\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly bandPadding: number;\n readonly groupPadding: number;\n readonly colorKey?: string;\n readonly activeKey?: string;\n readonly activeValue?: string | number;\n}\n\n/** Computed layout: bars + scales. */\nexport interface BarLayoutResult {\n readonly bars: readonly BarRect[];\n readonly categoryScale: ReturnType<typeof scaleBand<string>>;\n readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;\n readonly categories: readonly string[];\n}\n\n/** Read a numeric value from a datum, tolerating strings. */\nfunction readNumber(datum: ChartDatum, key: string): number {\n const raw = datum[key];\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === 'string') {\n const n = Number(raw);\n return Number.isFinite(n) ? n : 0;\n }\n return 0;\n}\n\nfunction resolveBarColor(datum: ChartDatum, seriesKey: string, colorKey?: string): string {\n if (!colorKey) {\n return seriesColorVar(seriesKey);\n }\n\n const raw = datum[colorKey];\n if (typeof raw !== 'string' || raw.length === 0) {\n return seriesColorVar(seriesKey);\n }\n\n if (\n raw.startsWith('var(') ||\n raw.startsWith('#') ||\n raw.startsWith('rgb') ||\n raw.startsWith('hsl') ||\n raw.includes('(')\n ) {\n return raw;\n }\n\n return seriesColorVar(raw);\n}\n\nfunction isActiveBar(datum: ChartDatum, activeKey?: string, activeValue?: string | number): boolean {\n if (!activeKey || activeValue === undefined) {\n return false;\n }\n\n const value = datum[activeKey];\n if (typeof value === 'number' && typeof activeValue === 'number') {\n return value === activeValue;\n }\n\n return String(value ?? '') === String(activeValue);\n}\n\n/** Build all bar rectangles for the given config. */\nexport function computeBarLayout(input: BarLayoutInput): BarLayoutResult {\n const {\n data,\n xKey,\n seriesKeys,\n variant,\n orientation,\n innerWidth,\n innerHeight,\n bandPadding,\n groupPadding,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const categories = data.map((d) => String(d[xKey] ?? ''));\n const isVertical = orientation === 'vertical';\n\n const categoryScale = scaleBand<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(bandPadding);\n\n const valueScale = scaleLinear<number, number>();\n\n if (variant === 'stacked' && seriesKeys.length > 0) {\n return stackedLayout({\n data,\n xKey,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n categories,\n colorKey,\n activeKey,\n activeValue,\n });\n }\n\n return groupedLayout({\n data,\n xKey,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n groupPadding,\n categories,\n colorKey,\n activeKey,\n activeValue,\n });\n}\n\n// ---------- Grouped ----------\n\ninterface GroupedInput {\n data: readonly ChartDatum[];\n xKey: string;\n seriesKeys: readonly string[];\n orientation: ChartOrientation;\n innerWidth: number;\n innerHeight: number;\n categoryScale: ReturnType<typeof scaleBand<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n groupPadding: number;\n categories: readonly string[];\n colorKey?: string;\n activeKey?: string;\n activeValue?: string | number;\n}\n\nfunction groupedLayout(input: GroupedInput): BarLayoutResult {\n const {\n data,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n groupPadding,\n categories,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const isVertical = orientation === 'vertical';\n const minValue = d3min(data, (d) => d3min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n const maxValue = d3max(data, (d) => d3max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n const domainMin = Math.min(0, minValue);\n const domainMax = Math.max(0, maxValue, domainMin === 0 ? 1 : 0);\n\n valueScale\n .domain([domainMin, domainMax])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n const baseline = valueScale(0);\n\n const subScale = scaleBand<string>()\n .domain(seriesKeys as string[])\n .range([0, categoryScale.bandwidth()])\n .padding(groupPadding);\n\n const bars: BarRect[] = [];\n data.forEach((datum, datumIndex) => {\n const category = categories[datumIndex];\n const bandStart = categoryScale(category) ?? 0;\n seriesKeys.forEach((seriesKey) => {\n const value = readNumber(datum, seriesKey);\n const sub = subScale(seriesKey) ?? 0;\n const scaledValue = valueScale(value);\n const color = resolveBarColor(datum, seriesKey, colorKey);\n const active = isActiveBar(datum, activeKey, activeValue);\n\n const rect: BarRect = isVertical\n ? {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: bandStart + sub,\n y: Math.min(scaledValue, baseline),\n width: subScale.bandwidth(),\n height: Math.abs(baseline - scaledValue),\n color,\n active,\n }\n : {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: Math.min(scaledValue, baseline),\n y: bandStart + sub,\n width: Math.abs(baseline - scaledValue),\n height: subScale.bandwidth(),\n color,\n active,\n };\n bars.push(rect);\n });\n });\n\n return { bars, categoryScale, valueScale, categories };\n}\n\n// ---------- Stacked ----------\n\ninterface StackedInput {\n data: readonly ChartDatum[];\n xKey: string;\n seriesKeys: readonly string[];\n orientation: ChartOrientation;\n innerWidth: number;\n innerHeight: number;\n categoryScale: ReturnType<typeof scaleBand<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n categories: readonly string[];\n colorKey?: string;\n activeKey?: string;\n activeValue?: string | number;\n}\n\nfunction stackedLayout(input: StackedInput): BarLayoutResult {\n const {\n data,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n categories,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const isVertical = orientation === 'vertical';\n const normalized = data.map((d) => {\n const out: Record<string, number> = {};\n for (const k of seriesKeys) {\n out[k] = readNumber(d, k);\n }\n return out;\n });\n\n const series: Series<Record<string, number>, string>[] = d3stack<Record<string, number>, string>().keys(\n seriesKeys as string[],\n )(normalized);\n\n const maxTotal = d3max(series[series.length - 1] ?? [], (p) => p[1]) ?? 0;\n valueScale\n .domain([0, maxTotal === 0 ? 1 : maxTotal])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n const bars: BarRect[] = [];\n series.forEach((layer) => {\n const seriesKey = layer.key;\n layer.forEach((point: SeriesPoint<Record<string, number>>, datumIndex: number) => {\n const [lower, upper] = point;\n const value = upper - lower;\n const category = categories[datumIndex];\n const bandStart = categoryScale(category) ?? 0;\n const color = resolveBarColor(data[datumIndex], seriesKey, colorKey);\n const active = isActiveBar(data[datumIndex], activeKey, activeValue);\n\n const rect: BarRect = isVertical\n ? {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: bandStart,\n y: valueScale(upper),\n width: categoryScale.bandwidth(),\n height: valueScale(lower) - valueScale(upper),\n color,\n active,\n }\n : {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: valueScale(lower),\n y: bandStart,\n width: valueScale(upper) - valueScale(lower),\n height: categoryScale.bandwidth(),\n color,\n active,\n };\n bars.push(rect);\n });\n });\n\n return { bars, categoryScale, valueScale, categories };\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { computeBarLayout, type BarRect, type BarVariant } from './bar-layout';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\nconst defaultBarValueFormatter = (value: number): string => `${value}`;\n\n/** Event emitted when a user clicks a bar. */\nexport interface BarClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Bar chart — composable within `<ui-chart-container>`.\n *\n * Layout variants (via inputs):\n * - `orientation`: `'vertical'` (default) or `'horizontal'`\n * - `variant`: `'grouped'` (default) or `'stacked'`\n */\n@Component({\n selector: 'ui-bar-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"chart-bar cursor-pointer outline-none transition-opacity hover:opacity-80\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [attr.rx]=\"cornerRadius()\"\n [attr.ry]=\"cornerRadius()\"\n [attr.fill]=\"bar.color\"\n [attr.opacity]=\"barOpacity(bar)\"\n [attr.stroke]=\"bar.active ? 'hsl(var(--foreground))' : null\"\n [attr.stroke-width]=\"bar.active ? 1.5 : null\"\n [attr.aria-label]=\"barAriaLabel(bar)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, bar)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(bar)\"\n (keydown.enter)=\"emitClick(bar)\"\n (keydown.space)=\"emitClick(bar); $event.preventDefault()\" />\n @if (showValueLabels() && bar.height > 0 && bar.width > 0) {\n <svg:text\n class=\"chart-bar-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"barLabelX(bar)\"\n [attr.y]=\"barLabelY(bar)\"\n [attr.text-anchor]=\"barLabelAnchor(bar)\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(bar) }}\n </svg:text>\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class BarChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly variant = input<BarVariant>('grouped');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly bandPadding = input<number>(0.2);\n readonly groupPadding = input<number>(0.05);\n readonly cornerRadius = input<number>(4);\n readonly colorKey = input<string | undefined>(undefined);\n readonly activeKey = input<string | undefined>(undefined);\n readonly activeValue = input<string | number | undefined>(undefined);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<(value: number) => string>(defaultBarValueFormatter);\n\n readonly barClick = output<BarClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeBarLayout({\n data: this.data(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n variant: this.variant(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n bandPadding: this.bandPadding(),\n groupPadding: this.groupPadding(),\n colorKey: this.colorKey(),\n activeKey: this.activeKey(),\n activeValue: this.activeValue(),\n }),\n );\n\n protected readonly bars = computed<readonly BarRect[]>(() => this.layout().bars);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n const n = this.data().length;\n return `Bar chart, ${n} categories, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.cart.orientation.set(this.orientation());\n this.cart.margin.set(this.margin());\n this.cart.innerWidth.set(this.innerWidth());\n this.cart.innerHeight.set(this.innerHeight());\n this.cart.categoryScale.set(layout.categoryScale);\n this.cart.valueScale.set(layout.valueScale);\n this.cart.categories.set(layout.categories);\n });\n }\n\n protected emitClick(bar: BarRect): void {\n this.barClick.emit({\n seriesKey: bar.seriesKey,\n datumIndex: bar.datumIndex,\n category: bar.category,\n value: bar.value,\n datum: this.data()[bar.datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, bar: BarRect): void {\n const center = elementClientCenter(event.currentTarget);\n this.root.activePoint.set({\n index: bar.datumIndex,\n seriesKey: bar.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected barOpacity(bar: BarRect): number {\n return this.activeKey() && this.activeValue() !== undefined ? (bar.active ? 1 : 0.42) : 1;\n }\n\n protected formatValueLabel(bar: BarRect): string {\n return this.valueLabelFormat()(bar.value);\n }\n\n protected barLabelX(bar: BarRect): number {\n if (this.orientation() === 'vertical') {\n return bar.x + bar.width / 2;\n }\n\n return bar.value >= 0 ? bar.x + bar.width + 6 : bar.x - 6;\n }\n\n protected barLabelY(bar: BarRect): number {\n if (this.orientation() === 'vertical') {\n return bar.value >= 0 ? bar.y - 8 : bar.y + bar.height + 10;\n }\n\n return bar.y + bar.height / 2;\n }\n\n protected barLabelAnchor(bar: BarRect): 'middle' | 'start' | 'end' {\n if (this.orientation() === 'vertical') {\n return 'middle';\n }\n\n return bar.value >= 0 ? 'start' : 'end';\n }\n\n protected barAriaLabel(bar: BarRect): string {\n const label = this.root.config()[bar.seriesKey]?.label ?? bar.seriesKey;\n return `${label} in ${bar.category}: ${bar.value}`;\n }\n}\n","import { scalePoint, scaleLinear } from 'd3-scale';\nimport { max as d3max } from 'd3-array';\nimport {\n line as d3line,\n area as d3area,\n stack as d3stack,\n stackOffsetExpand,\n curveMonotoneX,\n curveLinear,\n curveStep,\n type CurveFactory,\n} from 'd3-shape';\nimport type { ChartDatum, ChartOrientation } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\n/** Curve type shared by line & area charts. */\nexport type LineCurve = 'linear' | 'monotone' | 'step';\n\nfunction curveFor(curve: LineCurve): CurveFactory {\n switch (curve) {\n case 'monotone':\n return curveMonotoneX;\n case 'step':\n return curveStep;\n case 'linear':\n default:\n return curveLinear;\n }\n}\n\n/** A single series ready to render as either a line or an area. */\nexport interface LineSeriesPath {\n readonly seriesKey: string;\n readonly color: string;\n readonly linePath: string;\n /** Optional area path — only populated when `computeAreaLayout` is used. */\n readonly areaPath?: string;\n /** Raw points for dots / active markers. */\n readonly points: readonly LinePoint[];\n}\n\n/** One resolved (x, y) point for a series. */\nexport interface LinePoint {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface CartesianBase {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly seriesKeys: readonly string[];\n readonly orientation: ChartOrientation;\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly curve: LineCurve;\n}\n\nexport interface LineLayoutResult {\n readonly series: readonly LineSeriesPath[];\n readonly points: readonly LinePoint[];\n readonly categoryScale: ReturnType<typeof scalePoint<string>>;\n readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;\n readonly categories: readonly string[];\n}\n\nexport interface AreaLayoutResult extends LineLayoutResult {\n readonly stacked: boolean;\n}\n\nfunction readNumber(datum: ChartDatum, key: string): number {\n const raw = datum[key];\n if (typeof raw === 'number' && Number.isFinite(raw)) return raw;\n if (typeof raw === 'string') {\n const n = Number(raw);\n return Number.isFinite(n) ? n : 0;\n }\n return 0;\n}\n\n/** Build category + value scales for point-based charts (line / area). */\nexport function buildCartesianScales(input: CartesianBase): {\n categories: readonly string[];\n categoryScale: ReturnType<typeof scalePoint<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n} {\n const { data, xKey, seriesKeys, orientation, innerWidth, innerHeight } = input;\n const isVertical = orientation === 'vertical';\n const categories = data.map((d) => String(d[xKey] ?? ''));\n\n const categoryScale = scalePoint<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(0.5);\n\n const maxValue = d3max(data, (d) => d3max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n\n const valueScale = scaleLinear<number, number>()\n .domain([0, maxValue === 0 ? 1 : maxValue])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n return { categories, categoryScale, valueScale };\n}\n\n/** Compute line-chart geometry. */\nexport function computeLineLayout(input: CartesianBase): LineLayoutResult {\n const { data, seriesKeys, orientation, curve } = input;\n const { categories, categoryScale, valueScale } = buildCartesianScales(input);\n const isVertical = orientation === 'vertical';\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = [];\n\n for (const seriesKey of seriesKeys) {\n const points: LinePoint[] = data.map((d, datumIndex) => {\n const value = readNumber(d, seriesKey);\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const v = valueScale(value);\n return {\n seriesKey,\n datumIndex,\n category,\n value,\n x: isVertical ? c : v,\n y: isVertical ? v : c,\n };\n });\n allPoints.push(...points);\n\n const generator = d3line<LinePoint>()\n .x((p) => p.x)\n .y((p) => p.y)\n .curve(curveFor(curve));\n\n series.push({\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: generator(points) ?? '',\n points,\n });\n }\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n };\n}\n\nexport interface AreaLayoutInput extends CartesianBase {\n readonly stacked: boolean;\n readonly expanded?: boolean;\n}\n\n/** Compute area-chart geometry (single or stacked). */\nexport function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult {\n if (input.stacked && input.seriesKeys.length > 0) {\n return computeStackedArea(input);\n }\n return computeSingleArea(input);\n}\n\nfunction computeSingleArea(input: AreaLayoutInput): AreaLayoutResult {\n const { data, seriesKeys, orientation, curve } = input;\n const { categories, categoryScale, valueScale } = buildCartesianScales(input);\n const isVertical = orientation === 'vertical';\n const baseline = isVertical ? valueScale(0) : valueScale(0);\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = [];\n\n for (const seriesKey of seriesKeys) {\n const points: LinePoint[] = data.map((d, datumIndex) => {\n const value = readNumber(d, seriesKey);\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const v = valueScale(value);\n return {\n seriesKey,\n datumIndex,\n category,\n value,\n x: isVertical ? c : v,\n y: isVertical ? v : c,\n };\n });\n allPoints.push(...points);\n\n const lineGen = d3line<LinePoint>()\n .x((p) => p.x)\n .y((p) => p.y)\n .curve(curveFor(curve));\n\n const areaGen = isVertical\n ? d3area<LinePoint>()\n .x((p) => p.x)\n .y0(baseline)\n .y1((p) => p.y)\n .curve(curveFor(curve))\n : d3area<LinePoint>()\n .y((p) => p.y)\n .x0(baseline)\n .x1((p) => p.x)\n .curve(curveFor(curve));\n\n series.push({\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: lineGen(points) ?? '',\n areaPath: areaGen(points) ?? '',\n points,\n });\n }\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n stacked: false,\n };\n}\n\nfunction computeStackedArea(input: AreaLayoutInput): AreaLayoutResult {\n const { data, seriesKeys, orientation, innerWidth, innerHeight, xKey, curve, expanded } = input;\n const isVertical = orientation === 'vertical';\n const categories = data.map((d) => String(d[xKey] ?? ''));\n\n const categoryScale = scalePoint<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(0.5);\n\n const normalized = data.map((d) => {\n const out: Record<string, number> = {};\n for (const k of seriesKeys) out[k] = readNumber(d, k);\n return out;\n });\n\n const stackGenerator = d3stack<Record<string, number>, string>().keys(seriesKeys as string[]);\n if (expanded) {\n stackGenerator.offset(stackOffsetExpand);\n }\n const stackSeries = stackGenerator(normalized);\n\n const maxTotal = expanded ? 1 : (d3max(stackSeries[stackSeries.length - 1] ?? [], (p) => p[1]) ?? 0);\n const valueScale = scaleLinear<number, number>()\n .domain([0, maxTotal === 0 ? 1 : maxTotal])\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n if (!expanded) {\n valueScale.nice();\n }\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = stackSeries.map((layer) => {\n const seriesKey = layer.key;\n const points: LinePoint[] = layer.map((p, datumIndex) => {\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const upper = valueScale(p[1]);\n return {\n seriesKey,\n datumIndex,\n category,\n value: p[1] - p[0],\n x: isVertical ? c : upper,\n y: isVertical ? upper : c,\n };\n });\n allPoints.push(...points);\n\n const lineGen = d3line<[number, number, number]>()\n .x(([x]) => x)\n .y(([, y]) => y)\n .curve(curveFor(curve));\n\n const areaGen = isVertical\n ? d3area<[number, number, number]>()\n .x(([x]) => x)\n .y0(([, , y0]) => y0)\n .y1(([, y1]) => y1)\n .curve(curveFor(curve))\n : d3area<[number, number, number]>()\n .y(([x]) => x)\n .x0(([, , x0]) => x0)\n .x1(([, x1]) => x1)\n .curve(curveFor(curve));\n\n const tuples: [number, number, number][] = layer.map((p, i) => {\n const c = categoryScale(categories[i]) ?? 0;\n return [c, valueScale(p[1]), valueScale(p[0])];\n });\n\n return {\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: lineGen(tuples) ?? '',\n areaPath: areaGen(tuples) ?? '',\n points,\n };\n });\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n stacked: true,\n };\n}\n","import { scaleLinear, scaleBand } from 'd3-scale';\nimport type { ScalePoint } from 'd3-scale';\nimport { CartesianContext } from '../../core/cartesian-context';\n\n/**\n * Publish a `scalePoint` from line/area layouts to the `CartesianContext`,\n * which expects a `scaleBand`. We adapt by building a band with zero padding\n * centered on the same positions, so axis ticks render at the correct\n * offsets.\n *\n * This keeps axes/grid primitives agnostic to whether the underlying chart\n * uses `scaleBand` (bar) or `scalePoint` (line/area).\n */\nexport function pointToBandAdapter(\n pointScale: ScalePoint<string>,\n range: [number, number],\n): ReturnType<typeof scaleBand<string>> {\n return scaleBand<string>().domain(pointScale.domain()).range(range).padding(0);\n}\n\n/** Recreate a linear scale with the same domain/range (handy for effects). */\nexport function cloneLinear(\n scale: ReturnType<typeof scaleLinear<number, number>>,\n): ReturnType<typeof scaleLinear<number, number>> {\n return scaleLinear<number, number>().domain(scale.domain()).range(scale.range());\n}\n\nexport function provideCartesianFromLineLayout(\n ctx: CartesianContext,\n layout: {\n categoryScale: ScalePoint<string>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n categories: readonly string[];\n },\n orientation: 'vertical' | 'horizontal',\n innerWidth: number,\n innerHeight: number,\n): void {\n const range: [number, number] = orientation === 'vertical' ? [0, innerWidth] : [0, innerHeight];\n ctx.orientation.set(orientation);\n ctx.innerWidth.set(innerWidth);\n ctx.innerHeight.set(innerHeight);\n ctx.categoryScale.set(pointToBandAdapter(layout.categoryScale, range));\n ctx.valueScale.set(cloneLinear(layout.valueScale));\n ctx.categories.set(layout.categories);\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { CategoricalViewportContext } from '../../core/categorical-viewport-context';\nimport { computeLineLayout, type LineCurve, type LinePoint, type LineSeriesPath } from './line-layout';\nimport { provideCartesianFromLineLayout } from './cartesian-adapter';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\nimport { sliceByIndexRange } from '../../core/viewport';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\nconst defaultLineValueFormatter = (value: number): string => `${value}`;\n\n/** Emitted when a data point is activated (click or keyboard). */\nexport interface LinePointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-line-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext, CategoricalViewportContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-lines\">\n @for (s of series(); track s.seriesKey) {\n <svg:path\n class=\"chart-line\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-width]=\"strokeWidth()\"\n [attr.d]=\"s.linePath\" />\n @if (showDots()) {\n @for (p of s.points; track p.datumIndex) {\n <svg:circle\n class=\"chart-dot cursor-pointer outline-none\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"dotFill(p, s.color)\"\n [attr.stroke]=\"dotStrokeColor()\"\n [attr.stroke-width]=\"dotStrokeWidth() || null\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, p)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n @if (showValueLabels()) {\n <svg:text\n class=\"chart-line-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"labelX(p)\"\n [attr.y]=\"labelY(p)\"\n [attr.text-anchor]=\"labelAnchor()\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(p) }}\n </svg:text>\n }\n }\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class LineChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly curve = input<LineCurve>('monotone');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly strokeWidth = input<number>(2);\n readonly showDots = input<boolean>(true);\n readonly dotRadius = input<number>(3);\n readonly dotColorKey = input<string | undefined>(undefined);\n readonly dotStrokeColor = input<string | undefined>(undefined);\n readonly dotStrokeWidth = input<number>(0);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<(value: number) => string>(defaultLineValueFormatter);\n\n readonly pointClick = output<LinePointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly visibleStartIndex = computed(() => this.viewport.zoomRange()?.startIndex ?? 0);\n protected readonly visibleData = computed(() => sliceByIndexRange(this.data(), this.viewport.zoomRange()));\n\n protected readonly layout = computed(() =>\n computeLineLayout({\n data: this.visibleData(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n curve: this.curve(),\n }),\n );\n\n protected readonly series = computed<readonly LineSeriesPath[]>(() => this.layout().series);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Line chart, ${this.visibleData().length} points, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.viewport.dataCount.set(this.data().length);\n provideCartesianFromLineLayout(this.cart, layout, this.orientation(), this.innerWidth(), this.innerHeight());\n this.cart.margin.set(this.margin());\n });\n }\n\n protected emitClick(p: LinePoint): void {\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex,\n category: p.category,\n value: p.value,\n datum: this.data()[datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, p: LinePoint): void {\n const center = elementClientCenter(event.currentTarget);\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.root.activePoint.set({\n index: p.datumIndex,\n datumIndex,\n seriesKey: p.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected dotFill(point: LinePoint, fallbackColor: string): string {\n const colorKey = this.dotColorKey();\n if (!colorKey) {\n return fallbackColor;\n }\n\n const datum = this.visibleData()[point.datumIndex];\n const raw = datum?.[colorKey];\n if (typeof raw !== 'string' || raw.length === 0) {\n return fallbackColor;\n }\n\n if (\n raw.startsWith('var(') ||\n raw.startsWith('#') ||\n raw.startsWith('rgb') ||\n raw.startsWith('hsl') ||\n raw.includes('(')\n ) {\n return raw;\n }\n\n return `var(--color-${raw.replace(/[^a-zA-Z0-9_-]/g, '_')})`;\n }\n\n protected formatValueLabel(point: LinePoint): string {\n return this.valueLabelFormat()(point.value);\n }\n\n protected labelX(point: LinePoint): number {\n return this.orientation() === 'vertical' ? point.x : point.x + this.dotRadius() + 6;\n }\n\n protected labelY(point: LinePoint): number {\n return this.orientation() === 'vertical' ? point.y - this.dotRadius() - 8 : point.y;\n }\n\n protected labelAnchor(): 'middle' | 'start' {\n return this.orientation() === 'vertical' ? 'middle' : 'start';\n }\n\n protected pointAriaLabel(p: LinePoint): string {\n const label = this.root.config()[p.seriesKey]?.label ?? p.seriesKey;\n return `${label} at ${p.category}: ${p.value}`;\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { CategoricalViewportContext } from '../../core/categorical-viewport-context';\nimport { computeAreaLayout, type LineCurve, type LinePoint, type LineSeriesPath } from '../line/line-layout';\nimport { provideCartesianFromLineLayout } from '../line/cartesian-adapter';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\nimport { sliceByIndexRange } from '../../core/viewport';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\n\nexport interface AreaPointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Area chart — composable within `<ui-chart-container>`.\n *\n * - `stacked=true` stacks series along the value axis.\n * - `gradient=true` fills each area with a vertical linear-gradient from\n * the series color (top) to transparent (bottom). The gradient is\n * emitted as `<defs><linearGradient>` per series, unique per chart id.\n */\n@Component({\n selector: 'ui-area-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext, CategoricalViewportContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n @if (gradient()) {\n <svg:defs>\n @for (s of series(); track s.seriesKey) {\n <svg:linearGradient [attr.id]=\"gradientId(s.seriesKey)\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"s.color\" stop-opacity=\"0.4\" />\n <svg:stop offset=\"100%\" [attr.stop-color]=\"s.color\" stop-opacity=\"0\" />\n </svg:linearGradient>\n }\n </svg:defs>\n }\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-areas\">\n @for (s of series(); track s.seriesKey) {\n <svg:path\n class=\"chart-area\"\n [attr.d]=\"s.areaPath\"\n [attr.fill]=\"areaFill(s.seriesKey, s.color)\"\n stroke=\"none\" />\n <svg:path\n class=\"chart-area-stroke\"\n [attr.d]=\"s.linePath\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-width]=\"strokeWidth()\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n @if (showDots()) {\n @for (p of s.points; track p.datumIndex) {\n <svg:circle\n class=\"chart-dot cursor-pointer outline-none\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"s.color\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, p)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n }\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class AreaChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly stacked = input<boolean>(false);\n readonly expanded = input<boolean>(false);\n readonly gradient = input<boolean>(true);\n readonly curve = input<LineCurve>('monotone');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly strokeWidth = input<number>(2);\n readonly showDots = input<boolean>(false);\n readonly dotRadius = input<number>(3);\n\n readonly pointClick = output<AreaPointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly visibleStartIndex = computed(() => this.viewport.zoomRange()?.startIndex ?? 0);\n\n protected readonly visibleData = computed(() => sliceByIndexRange(this.data(), this.viewport.zoomRange()));\n\n protected readonly layout = computed(() =>\n computeAreaLayout({\n data: this.visibleData(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n curve: this.curve(),\n stacked: this.stacked(),\n expanded: this.expanded(),\n }),\n );\n\n protected readonly series = computed<readonly LineSeriesPath[]>(() => this.layout().series);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Area chart, ${this.visibleData().length} points, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.viewport.dataCount.set(this.data().length);\n provideCartesianFromLineLayout(this.cart, layout, this.orientation(), this.innerWidth(), this.innerHeight());\n this.cart.margin.set(this.margin());\n });\n }\n\n protected gradientId(seriesKey: string): string {\n return `${this.root.id()}-grad-${seriesKey.replace(/[^a-zA-Z0-9_-]/g, '_')}`;\n }\n\n protected areaFill(seriesKey: string, color: string): string {\n return this.gradient() ? `url(#${this.gradientId(seriesKey)})` : color;\n }\n\n protected emitClick(p: LinePoint): void {\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex,\n category: p.category,\n value: p.value,\n datum: this.data()[datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, p: LinePoint): void {\n const center = elementClientCenter(event.currentTarget);\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.root.activePoint.set({\n index: p.datumIndex,\n datumIndex,\n seriesKey: p.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected pointAriaLabel(p: LinePoint): string {\n const label = this.root.config()[p.seriesKey]?.label ?? p.seriesKey;\n return `${label} at ${p.category}: ${p.value}`;\n }\n}\n","import { arc as d3arc, pie as d3pie, type PieArcDatum } from 'd3-shape';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport interface PieLayoutInput {\n readonly data: readonly ChartDatum[];\n /** Field on each datum whose value is the slice's numeric magnitude. */\n readonly valueKey: string;\n /** Field on each datum whose value is the slice's categorical label. */\n readonly nameKey: string;\n /**\n * Ordered series keys used to resolve color (`var(--color-<key>)`).\n * Must have the same length as `data`. If omitted, falls back to\n * `nameKey` values.\n */\n readonly seriesKeys?: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n /** Inner radius for donut-style charts (0 = full pie). */\n readonly innerRadius: number;\n /** Gap between slices, in radians. */\n readonly padAngle: number;\n /** Corner radius for slices (px). */\n readonly cornerRadius: number;\n /** Starting angle in radians (default −π/2 = 12 o'clock). */\n readonly startAngle: number;\n /** Ending angle in radians (default 3π/2). */\n readonly endAngle: number;\n readonly activeIndex?: number;\n readonly activeOffset?: number;\n}\n\nexport interface PieSliceRect {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly color: string;\n readonly arcPath: string;\n readonly centroid: readonly [number, number];\n readonly startAngle: number;\n readonly endAngle: number;\n readonly translateX: number;\n readonly translateY: number;\n}\n\nexport interface PieLayout {\n readonly slices: readonly PieSliceRect[];\n readonly centerX: number;\n readonly centerY: number;\n readonly outerRadius: number;\n}\n\nexport function computePieLayout(input: PieLayoutInput): PieLayout {\n const {\n data,\n valueKey,\n nameKey,\n seriesKeys,\n innerWidth,\n innerHeight,\n innerRadius,\n padAngle,\n cornerRadius,\n startAngle,\n endAngle,\n activeIndex,\n activeOffset = 12,\n } = input;\n\n const outerRadius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || outerRadius === 0) {\n return { slices: [], centerX, centerY, outerRadius };\n }\n\n const pieGen = d3pie<ChartDatum>()\n .value((d) => Number(d[valueKey] ?? 0))\n .sort(null)\n .padAngle(padAngle)\n .startAngle(startAngle)\n .endAngle(endAngle);\n\n const arcGen = d3arc<PieArcDatum<ChartDatum>>()\n .innerRadius(innerRadius)\n .outerRadius(outerRadius)\n .cornerRadius(cornerRadius);\n\n const arcs = pieGen(data as ChartDatum[]);\n const slices: PieSliceRect[] = arcs.map((a, i) => {\n const d = a.data;\n const key = seriesKeys?.[i] ?? String(d[nameKey] ?? i);\n const centroid = arcGen.centroid(a) as [number, number];\n const magnitude = Math.hypot(centroid[0], centroid[1]) || 1;\n const isActive = i === activeIndex;\n return {\n seriesKey: key,\n name: String(d[nameKey] ?? key),\n value: Number(d[valueKey] ?? 0),\n datumIndex: i,\n color: seriesColorVar(key),\n arcPath: arcGen(a) ?? '',\n centroid,\n startAngle: a.startAngle,\n endAngle: a.endAngle,\n translateX: isActive ? (centroid[0] / magnitude) * activeOffset : 0,\n translateY: isActive ? (centroid[1] / magnitude) * activeOffset : 0,\n };\n });\n\n return { slices, centerX, centerY, outerRadius };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computePieLayout, type PieSliceRect } from './pie-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 8, left: 8 };\n\nexport interface PieSliceClickEvent {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-pie-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @for (s of layout().slices; track s.seriesKey) {\n <svg:path\n class=\"chart-slice cursor-pointer transition-opacity hover:opacity-80\"\n [attr.d]=\"s.arcPath\"\n [attr.fill]=\"s.color\"\n [attr.transform]=\"sliceTransform(s)\"\n [attr.aria-label]=\"sliceAriaLabel(s)\"\n tabindex=\"0\"\n (click)=\"emitClick(s)\"\n (keydown.enter)=\"emitClick(s)\"\n (keydown.space)=\"emitClick(s); $event.preventDefault()\"\n (pointerenter)=\"setActive($event, s)\"\n (pointermove)=\"setActive($event, s)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, s)\"\n (blur)=\"clearActive()\" />\n }\n @if (showLabels()) {\n @for (s of layout().slices; track s.seriesKey) {\n <svg:text\n class=\"chart-slice-label fill-foreground text-[10px]\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n [attr.x]=\"s.centroid[0] + s.translateX\"\n [attr.y]=\"s.centroid[1] + s.translateY\">\n {{ s.value }}\n </svg:text>\n }\n }\n </svg:g>\n </svg:g>\n </svg:svg>\n <div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <ng-content select=\"ui-pie-center\" />\n </div>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class PieChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly valueKey = input.required<string>();\n readonly nameKey = input.required<string>();\n readonly seriesKeys = input<readonly string[] | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly innerRadius = input<number>(0);\n readonly padAngle = input<number>(0.01);\n readonly cornerRadius = input<number>(0);\n readonly startAngle = input<number>(-Math.PI / 2);\n readonly endAngle = input<number>((3 * Math.PI) / 2);\n readonly showLabels = input<boolean>(false);\n readonly activeIndex = input<number | undefined>(undefined);\n readonly activeOffset = input<number>(12);\n\n readonly sliceClick = output<PieSliceClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computePieLayout({\n data: this.data(),\n valueKey: this.valueKey(),\n nameKey: this.nameKey(),\n seriesKeys: this.seriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n innerRadius: this.innerRadius(),\n padAngle: this.padAngle(),\n cornerRadius: this.cornerRadius(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n activeIndex: this.activeIndex(),\n activeOffset: this.activeOffset(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n protected readonly ariaSummary = computed(() => `Pie chart, ${this.data().length} slices.`);\n\n protected sliceAriaLabel(s: PieSliceRect): string {\n return `${s.name}: ${s.value}`;\n }\n\n protected sliceTransform(s: PieSliceRect): string | null {\n return s.translateX || s.translateY ? `translate(${s.translateX}, ${s.translateY})` : null;\n }\n\n protected emitClick(s: PieSliceRect): void {\n this.sliceClick.emit({\n seriesKey: s.seriesKey,\n name: s.name,\n value: s.value,\n datumIndex: s.datumIndex,\n datum: this.data()[s.datumIndex],\n });\n }\n\n protected setActive(event: PointerEvent | FocusEvent, s: PieSliceRect): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({\n index: s.datumIndex,\n datumIndex: s.datumIndex,\n seriesKey: s.seriesKey,\n clientX,\n clientY,\n });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { lineRadial, curveLinearClosed, curveCardinalClosed } from 'd3-shape';\nimport { max as d3max } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport type RadarCurve = 'linear' | 'cardinal';\nexport type RadarGrid = 'polygon' | 'circle' | 'none';\n\nexport interface RadarLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly axisKey: string;\n readonly seriesKeys: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly maxValue?: number;\n readonly levels: number;\n readonly curve: RadarCurve;\n readonly grid: RadarGrid;\n}\n\nexport interface RadarAxisInfo {\n readonly name: string;\n readonly angle: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface RadarSeries {\n readonly seriesKey: string;\n readonly color: string;\n readonly path: string;\n readonly points: readonly { readonly x: number; readonly y: number; readonly value: number; readonly axis: string }[];\n}\n\nexport interface RadarLevel {\n readonly value: number;\n readonly radius: number;\n readonly path: string;\n}\n\nexport interface RadarLayout {\n readonly centerX: number;\n readonly centerY: number;\n readonly radius: number;\n readonly axes: readonly RadarAxisInfo[];\n readonly levels: readonly RadarLevel[];\n readonly maxValue: number;\n readonly series: readonly RadarSeries[];\n readonly grid: RadarGrid;\n}\n\nexport function computeRadarLayout(input: RadarLayoutInput): RadarLayout {\n const { data, axisKey, seriesKeys, innerWidth, innerHeight, levels, curve, grid } = input;\n const radius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || seriesKeys.length === 0 || radius === 0) {\n return { centerX, centerY, radius, axes: [], levels: [], maxValue: 0, series: [], grid };\n }\n\n const maxValue = input.maxValue ?? d3max(data, (d) => d3max(seriesKeys, (k) => Number(d[k] ?? 0)) ?? 0) ?? 1;\n\n const angleStep = (2 * Math.PI) / data.length;\n const angleFor = (i: number) => i * angleStep - Math.PI / 2;\n\n const axes: RadarAxisInfo[] = data.map((d, i) => {\n const angle = angleFor(i);\n return {\n name: String(d[axisKey] ?? i),\n angle,\n x: Math.cos(angle) * radius,\n y: Math.sin(angle) * radius,\n };\n });\n\n const levelValues: RadarLevel[] = Array.from({ length: levels }, (_, index) => {\n const value = ((index + 1) / levels) * maxValue;\n const levelRadius = ((index + 1) / levels) * radius;\n return {\n value,\n radius: levelRadius,\n path: polygonPath(\n axes.map((axis) => ({\n x: Math.cos(axis.angle) * levelRadius,\n y: Math.sin(axis.angle) * levelRadius,\n })),\n ),\n };\n });\n\n const curveFactory = curve === 'cardinal' ? curveCardinalClosed : curveLinearClosed;\n const radial = lineRadial<{ angle: number; value: number }>()\n .angle((point) => point.angle + Math.PI / 2)\n .radius((point) => (point.value / maxValue) * radius)\n .curve(curveFactory);\n\n const series: RadarSeries[] = seriesKeys.map((seriesKey) => {\n const points = data.map((datum, index) => {\n const value = Number(datum[seriesKey] ?? 0);\n const angle = angleFor(index);\n const pointRadius = (value / maxValue) * radius;\n return {\n axis: String(datum[axisKey] ?? index),\n value,\n x: Math.cos(angle) * pointRadius,\n y: Math.sin(angle) * pointRadius,\n };\n });\n return {\n seriesKey,\n color: seriesColorVar(seriesKey),\n path:\n radial(data.map((datum, index) => ({ angle: angleFor(index), value: Number(datum[seriesKey] ?? 0) }))) ?? '',\n points,\n };\n });\n\n return { centerX, centerY, radius, axes, levels: levelValues, maxValue, series, grid };\n}\n\nfunction polygonPath(points: readonly { readonly x: number; readonly y: number }[]): string {\n if (points.length === 0) {\n return '';\n }\n\n const [first, ...rest] = points;\n return `M ${first.x} ${first.y} ${rest.map((point) => `L ${point.x} ${point.y}`).join(' ')} Z`;\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computeRadarLayout, type RadarCurve, type RadarGrid } from './radar-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 24, right: 24, bottom: 24, left: 24 };\n\n@Component({\n selector: 'ui-radar-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g class=\"chart-radar\" [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @if (layout().grid !== 'none') {\n @for (level of layout().levels; track level.value; let levelIndex = $index) {\n @if (layout().grid === 'circle') {\n <svg:circle\n class=\"chart-radar-level stroke-border\"\n [attr.fill]=\"gridFill()\"\n [attr.fill-opacity]=\"gridFillOpacity(levelIndex)\"\n stroke-dasharray=\"2 2\"\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"level.radius\" />\n } @else {\n <svg:path\n class=\"chart-radar-level stroke-border\"\n [attr.d]=\"level.path\"\n [attr.fill]=\"gridFill()\"\n [attr.fill-opacity]=\"gridFillOpacity(levelIndex)\"\n stroke-dasharray=\"2 2\" />\n }\n }\n }\n @if (showAxes()) {\n @for (axis of layout().axes; track axis.name) {\n <svg:line class=\"chart-radar-axis stroke-border\" x1=\"0\" y1=\"0\" [attr.x2]=\"axis.x\" [attr.y2]=\"axis.y\" />\n @if (showLabels()) {\n <svg:text\n class=\"chart-radar-axis-label fill-muted-foreground text-[10px]\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n [attr.x]=\"axis.x * 1.12\"\n [attr.y]=\"axis.y * 1.12\">\n {{ axis.name }}\n </svg:text>\n }\n }\n }\n @for (s of layout().series; track s.seriesKey) {\n <svg:path\n class=\"chart-radar-series\"\n [attr.d]=\"s.path\"\n [attr.stroke]=\"s.color\"\n [attr.fill]=\"linesOnly() ? 'none' : s.color\"\n [attr.fill-opacity]=\"linesOnly() ? null : fillOpacity()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linejoin=\"round\" />\n @if (showDots()) {\n @for (p of s.points; track p.axis; let i = $index) {\n <svg:circle\n class=\"chart-radar-dot cursor-pointer\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"s.color\"\n tabindex=\"0\"\n [attr.aria-label]=\"dotAriaLabel(s.seriesKey, p)\"\n (pointerenter)=\"setActive($event, s.seriesKey, i)\"\n (pointermove)=\"setActive($event, s.seriesKey, i)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, s.seriesKey, i)\"\n (blur)=\"clearActive()\" />\n }\n }\n }\n </svg:g>\n <ng-content />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class RadarChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly axisKey = input.required<string>();\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly curve = input<RadarCurve>('linear');\n readonly levels = input<number>(4);\n readonly maxValue = input<number | undefined>(undefined);\n readonly strokeWidth = input<number>(2);\n readonly fillOpacity = input<number>(0.2);\n readonly showLabels = input<boolean>(true);\n readonly showDots = input<boolean>(true);\n readonly dotRadius = input<number>(3);\n readonly grid = input<RadarGrid>('circle');\n readonly gridFilled = input<boolean>(false);\n readonly showAxes = input<boolean>(true);\n readonly linesOnly = input<boolean>(false);\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeRadarLayout({\n data: this.data(),\n axisKey: this.axisKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n maxValue: this.maxValue(),\n levels: this.levels(),\n curve: this.curve(),\n grid: this.grid(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Radar chart, ${this.data().length} axes, ${keys.length} series.`;\n });\n\n protected gridFill(): string {\n return this.gridFilled() ? 'hsl(var(--muted))' : 'none';\n }\n\n protected gridFillOpacity(levelIndex: number): number | null {\n return this.gridFilled() ? Math.max(0.06, 0.18 - levelIndex * 0.02) : null;\n }\n\n protected dotAriaLabel(seriesKey: string, p: { axis: string; value: number }): string {\n const label = this.root.config()[seriesKey]?.label ?? seriesKey;\n return `${label} at ${p.axis}: ${p.value}`;\n }\n\n protected setActive(event: PointerEvent | FocusEvent, seriesKey: string, index: number): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({ index, datumIndex: index, seriesKey, clientX, clientY });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { arc as d3arc } from 'd3-shape';\nimport { max as d3max } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport interface RadialLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly nameKey: string;\n readonly valueKey: string;\n readonly innerWidth: number;\n readonly innerHeight: number;\n /** Optional explicit series-key list (same length as data). */\n readonly seriesKeys?: readonly string[];\n /** Gap between concentric tracks (px). */\n readonly trackPadding: number;\n /** Start / end angle (radians). */\n readonly startAngle: number;\n readonly endAngle: number;\n readonly cornerRadius: number;\n readonly maxValue?: number;\n}\n\nexport interface RadialBarRect {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly color: string;\n readonly arcPath: string;\n readonly backgroundPath: string;\n readonly innerRadius: number;\n readonly outerRadius: number;\n readonly endAngle: number;\n}\n\nexport interface RadialLayout {\n readonly centerX: number;\n readonly centerY: number;\n readonly outerRadius: number;\n readonly bars: readonly RadialBarRect[];\n readonly maxValue: number;\n}\n\nexport function computeRadialLayout(input: RadialLayoutInput): RadialLayout {\n const {\n data,\n nameKey,\n valueKey,\n innerWidth,\n innerHeight,\n seriesKeys,\n trackPadding,\n startAngle,\n endAngle,\n cornerRadius,\n } = input;\n\n const outerRadius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || outerRadius === 0) {\n return { centerX, centerY, outerRadius, bars: [], maxValue: 0 };\n }\n\n const maxValue = input.maxValue ?? d3max(data, (d) => Number(d[valueKey] ?? 0)) ?? 1;\n const trackCount = data.length;\n const availableRadius = outerRadius - (trackCount - 1) * trackPadding;\n const trackThickness = availableRadius / trackCount;\n\n const bars: RadialBarRect[] = data.map((d, i) => {\n const inner = i * (trackThickness + trackPadding);\n const outer = inner + trackThickness;\n const value = Number(d[valueKey] ?? 0);\n const pct = maxValue === 0 ? 0 : value / maxValue;\n const sweep = (endAngle - startAngle) * pct;\n const valueEndAngle = startAngle + sweep;\n const key = seriesKeys?.[i] ?? String(d[nameKey] ?? i);\n\n const arcGen = d3arc<unknown>().innerRadius(inner).outerRadius(outer).cornerRadius(cornerRadius);\n\n return {\n seriesKey: key,\n name: String(d[nameKey] ?? key),\n value,\n datumIndex: i,\n color: seriesColorVar(key),\n arcPath: arcGen.startAngle(startAngle).endAngle(valueEndAngle)(null) ?? '',\n backgroundPath: arcGen.startAngle(startAngle).endAngle(endAngle)(null) ?? '',\n innerRadius: inner,\n outerRadius: outer,\n endAngle: valueEndAngle,\n };\n });\n\n return { centerX, centerY, outerRadius, bars, maxValue };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computeRadialLayout, type RadialBarRect } from './radial-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 8, left: 8 };\nconst defaultRadialValueFormatter = (value: number): string => `${value}`;\n\nexport type RadialValueLabelFormatter = (value: number, name: string) => string;\n\nexport interface RadialBarClickEvent {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-radial-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @for (b of layout().bars; track b.seriesKey) {\n @if (showTrack()) {\n <svg:path class=\"chart-radial-track fill-muted\" [attr.d]=\"b.backgroundPath\" />\n }\n <svg:path\n class=\"chart-radial-bar cursor-pointer transition-opacity hover:opacity-80\"\n [attr.d]=\"b.arcPath\"\n [attr.fill]=\"b.color\"\n [attr.aria-label]=\"barAriaLabel(b)\"\n tabindex=\"0\"\n (click)=\"emitClick(b)\"\n (keydown.enter)=\"emitClick(b)\"\n (keydown.space)=\"emitClick(b); $event.preventDefault()\"\n (pointerenter)=\"setActive($event, b)\"\n (pointermove)=\"setActive($event, b)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, b)\"\n (blur)=\"clearActive()\" />\n @if (showValueLabels()) {\n <svg:text\n class=\"chart-radial-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"barLabelX(b)\"\n [attr.y]=\"barLabelY(b)\"\n [attr.text-anchor]=\"barLabelAnchor(b)\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(b) }}\n </svg:text>\n }\n }\n </svg:g>\n </svg:g>\n </svg:svg>\n <div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <ng-content select=\"ui-radial-center\" />\n </div>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class RadialChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly nameKey = input.required<string>();\n readonly valueKey = input.required<string>();\n readonly seriesKeys = input<readonly string[] | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly trackPadding = input<number>(4);\n readonly cornerRadius = input<number>(8);\n readonly startAngle = input<number>(-Math.PI / 2);\n readonly endAngle = input<number>((3 * Math.PI) / 2);\n readonly maxValue = input<number | undefined>(undefined);\n readonly showTrack = input<boolean>(true);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<RadialValueLabelFormatter>(defaultRadialValueFormatter);\n\n readonly barClick = output<RadialBarClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeRadialLayout({\n data: this.data(),\n nameKey: this.nameKey(),\n valueKey: this.valueKey(),\n seriesKeys: this.seriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n trackPadding: this.trackPadding(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n cornerRadius: this.cornerRadius(),\n maxValue: this.maxValue(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n protected readonly ariaSummary = computed(() => `Radial bar chart, ${this.data().length} tracks.`);\n\n protected barAriaLabel(b: RadialBarRect): string {\n return `${b.name}: ${b.value}`;\n }\n\n protected formatValueLabel(b: RadialBarRect): string {\n return this.valueLabelFormat()(b.value, b.name);\n }\n\n protected barLabelX(b: RadialBarRect): number {\n const radius = (b.innerRadius + b.outerRadius) / 2 + 10;\n return Math.sin(b.endAngle) * radius;\n }\n\n protected barLabelY(b: RadialBarRect): number {\n const radius = (b.innerRadius + b.outerRadius) / 2 + 10;\n return -Math.cos(b.endAngle) * radius;\n }\n\n protected barLabelAnchor(b: RadialBarRect): 'start' | 'end' {\n return this.barLabelX(b) >= 0 ? 'start' : 'end';\n }\n\n protected emitClick(b: RadialBarRect): void {\n this.barClick.emit({\n seriesKey: b.seriesKey,\n name: b.name,\n value: b.value,\n datumIndex: b.datumIndex,\n datum: this.data()[b.datumIndex],\n });\n }\n\n protected setActive(event: PointerEvent | FocusEvent, b: RadialBarRect): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({\n index: b.datumIndex,\n datumIndex: b.datumIndex,\n seriesKey: b.seriesKey,\n clientX,\n clientY,\n });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { scaleLinear, type ScaleLinear } from 'd3-scale';\nimport { extent as d3extent } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\nimport type { NumericDomain } from '../../core/viewport';\n\nexport interface ScatterLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly yKey: string;\n readonly sizeKey?: string;\n readonly seriesKey?: string;\n readonly seriesKeys: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly minPointRadius: number;\n readonly maxPointRadius: number;\n readonly xDomain?: readonly [number, number];\n readonly yDomain?: readonly [number, number];\n}\n\nexport interface ScatterPoint {\n readonly seriesKey: string;\n readonly color: string;\n readonly x: number;\n readonly y: number;\n readonly radius: number;\n readonly datumIndex: number;\n readonly rawX: number;\n readonly rawY: number;\n readonly rawSize: number;\n}\n\nexport interface ScatterLayout {\n readonly points: readonly ScatterPoint[];\n readonly xScale: ScaleLinear<number, number>;\n readonly yScale: ScaleLinear<number, number>;\n readonly xDomain: NumericDomain;\n readonly yDomain: NumericDomain;\n}\n\nfunction nice(extent: [number, number] | [undefined, undefined]): [number, number] {\n const [lo, hi] = extent;\n if (lo === undefined || hi === undefined) return [0, 1];\n if (lo === hi) return [lo - 1, hi + 1];\n return [lo, hi];\n}\n\nexport function resolveScatterDomains(\n input: Pick<ScatterLayoutInput, 'data' | 'xKey' | 'yKey' | 'xDomain' | 'yDomain'>,\n): { xDomain: NumericDomain; yDomain: NumericDomain } {\n const xValues = input.data.map((d) => Number(d[input.xKey] ?? 0));\n const yValues = input.data.map((d) => Number(d[input.yKey] ?? 0));\n return {\n xDomain: (input.xDomain ?? nice(d3extent(xValues) as [number, number])) as NumericDomain,\n yDomain: (input.yDomain ?? nice(d3extent(yValues) as [number, number])) as NumericDomain,\n };\n}\n\nexport function computeScatterLayout(input: ScatterLayoutInput): ScatterLayout {\n const { data, xKey, yKey, sizeKey, seriesKey, seriesKeys, innerWidth, innerHeight, minPointRadius, maxPointRadius } =\n input;\n\n const xValues = data.map((d) => Number(d[xKey] ?? 0));\n const yValues = data.map((d) => Number(d[yKey] ?? 0));\n const sizeValues = sizeKey ? data.map((d) => Number(d[sizeKey] ?? 0)) : [];\n\n const { xDomain, yDomain } = resolveScatterDomains(input);\n\n const xScale = scaleLinear()\n .domain(xDomain as [number, number])\n .range([0, innerWidth]);\n const yScale = scaleLinear()\n .domain(yDomain as [number, number])\n .range([innerHeight, 0]);\n\n let sizeScale: ScaleLinear<number, number> | null = null;\n if (sizeKey && sizeValues.length > 0) {\n const [sLo, sHi] = d3extent(sizeValues) as [number, number];\n sizeScale = scaleLinear()\n .domain([sLo ?? 0, sHi ?? 1])\n .range([minPointRadius, maxPointRadius]);\n }\n\n const fallbackKey = seriesKeys[0] ?? 'value';\n\n const points: ScatterPoint[] = data.flatMap((d, i) => {\n const key = seriesKey ? String(d[seriesKey] ?? fallbackKey) : fallbackKey;\n const sz = sizeKey ? Number(d[sizeKey] ?? 0) : 0;\n const rawX = xValues[i];\n const rawY = yValues[i];\n if (rawX < xDomain[0] || rawX > xDomain[1] || rawY < yDomain[0] || rawY > yDomain[1]) {\n return [];\n }\n return [\n {\n seriesKey: key,\n color: seriesColorVar(key),\n x: xScale(rawX),\n y: yScale(rawY),\n radius: sizeScale ? sizeScale(sz) : minPointRadius,\n datumIndex: i,\n rawX,\n rawY,\n rawSize: sz,\n },\n ];\n });\n\n return { points, xScale, yScale, xDomain, yDomain };\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { ScatterViewportContext } from '../../core/scatter-viewport-context';\nimport { computeScatterLayout, resolveScatterDomains, type ScatterPoint } from './scatter-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\n\nexport interface ScatterPointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly x: number;\n readonly y: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Scatter chart — one dot per datum. Both axes are linear; color can\n * come from a fixed series key or per-row via `seriesKey` field. Point\n * radius optionally scales with `sizeKey`.\n */\n@Component({\n selector: 'ui-scatter-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ScatterViewportContext],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId()\">\n <svg:rect x=\"0\" y=\"0\" [attr.width]=\"innerWidth()\" [attr.height]=\"innerHeight()\" />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g class=\"chart-scatter\" [attr.clip-path]=\"'url(#' + clipPathId() + ')'\">\n @for (p of layout().points; track p.datumIndex) {\n <svg:circle\n class=\"chart-scatter-point cursor-pointer transition-opacity hover:opacity-80\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"p.radius\"\n [attr.fill]=\"p.color\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n }\n </svg:g>\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class ScatterChart {\n private readonly root = inject(ChartContext);\n private readonly viewport = inject(ScatterViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly yKey = input.required<string>();\n /** Optional numeric field to drive point radius. */\n readonly sizeKey = input<string | undefined>(undefined);\n /** Optional field on each datum used as color key. */\n readonly seriesKey = input<string | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly minPointRadius = input<number>(3);\n readonly maxPointRadius = input<number>(12);\n readonly xDomain = input<readonly [number, number] | undefined>(undefined);\n readonly yDomain = input<readonly [number, number] | undefined>(undefined);\n\n readonly pointClick = output<ScatterPointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly resolvedDomains = computed(() =>\n resolveScatterDomains({\n data: this.data(),\n xKey: this.xKey(),\n yKey: this.yKey(),\n xDomain: this.xDomain(),\n yDomain: this.yDomain(),\n }),\n );\n\n protected readonly currentXDomain = computed(() => this.viewport.zoomXDomain() ?? this.resolvedDomains().xDomain);\n\n protected readonly currentYDomain = computed(() => this.viewport.zoomYDomain() ?? this.resolvedDomains().yDomain);\n\n protected readonly layout = computed(() =>\n computeScatterLayout({\n data: this.data(),\n xKey: this.xKey(),\n yKey: this.yKey(),\n sizeKey: this.sizeKey(),\n seriesKey: this.seriesKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n minPointRadius: this.minPointRadius(),\n maxPointRadius: this.maxPointRadius(),\n xDomain: this.currentXDomain(),\n yDomain: this.currentYDomain(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly clipPathId = computed(() => `${this.root.id()}-scatter-clip`);\n\n protected readonly ariaSummary = computed(() => `Scatter chart, ${this.data().length} points.`);\n\n constructor() {\n effect(() => {\n const domains = this.resolvedDomains();\n const layout = this.layout();\n this.viewport.innerWidth.set(this.innerWidth());\n this.viewport.innerHeight.set(this.innerHeight());\n this.viewport.fullXDomain.set(domains.xDomain);\n this.viewport.fullYDomain.set(domains.yDomain);\n this.viewport.xScale.set(layout.xScale);\n this.viewport.yScale.set(layout.yScale);\n });\n }\n\n protected pointAriaLabel(p: ScatterPoint): string {\n return `${p.seriesKey}: x=${p.rawX}, y=${p.rawY}`;\n }\n\n protected emitClick(p: ScatterPoint): void {\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex: p.datumIndex,\n x: p.rawX,\n y: p.rawY,\n datum: this.data()[p.datumIndex],\n });\n }\n}\n","/*\n * Public API Surface of @ojiepermana/angular/chart\n */\n\n// Core\nexport * from './src/lib/core/chart-config';\nexport * from './src/lib/core/chart-context';\nexport * from './src/lib/core/chart-style';\nexport * from './src/lib/core/chart-container';\nexport * from './src/lib/core/cartesian-context';\nexport * from './src/lib/core/ticks';\nexport * from './src/lib/core/viewport';\n\n// Primitives\nexport * from './src/lib/primitives/chart-axis-x';\nexport * from './src/lib/primitives/chart-axis-y';\nexport * from './src/lib/primitives/chart-grid';\nexport * from './src/lib/primitives/chart-crosshair';\nexport * from './src/lib/primitives/chart-brush';\nexport * from './src/lib/primitives/chart-pointer-tracker';\nexport * from './src/lib/primitives/chart-tooltip';\nexport * from './src/lib/primitives/chart-legend';\nexport * from './src/lib/primitives/chart-zoom-controls';\nexport * from './src/lib/primitives/pie-center';\nexport * from './src/lib/primitives/radial-center';\n\n// Charts\nexport * from './src/lib/charts/bar';\nexport * from './src/lib/charts/line';\nexport * from './src/lib/charts/area';\nexport * from './src/lib/charts/pie';\nexport * from './src/lib/charts/radar';\nexport * from './src/lib/charts/radial';\nexport * from './src/lib/charts/scatter';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["clamp","readNumber","d3min","d3max","d3stack","DEFAULT_MARGIN","d3line","d3area","d3pie","d3arc","d3extent"],"mappings":";;;;;;;AAgCA;AACO,MAAM,oBAAoB,GAAG;AAEpC;AACO,MAAM,YAAY,GAGpB;AACH,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE;;AAGjD;;;;;;;;;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A,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,8BAAA,EAAA,EAAA,SAAA,EArCZ,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEU,YAAY,EAAA,UAAA,EAAA,CAAA;kBAxCxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,sBAAsB,CAAC;AACnC,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,8BAA8B,EAAE;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCT,EAAA,CAAA;AACF,iBAAA;;;AC5DD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-chart.mjs","sources":["../../../projects/angular/chart/src/lib/core/chart-config.ts","../../../projects/angular/chart/src/lib/core/chart-context.ts","../../../projects/angular/chart/src/lib/core/chart-style.ts","../../../projects/angular/chart/src/lib/core/chart-container.ts","../../../projects/angular/chart/src/lib/core/cartesian-context.ts","../../../projects/angular/chart/src/lib/core/ticks.ts","../../../projects/angular/chart/src/lib/core/viewport.ts","../../../projects/angular/chart/src/lib/primitives/chart-axis-x.ts","../../../projects/angular/chart/src/lib/primitives/chart-axis-y.ts","../../../projects/angular/chart/src/lib/primitives/chart-grid.ts","../../../projects/angular/chart/src/lib/primitives/chart-crosshair.ts","../../../projects/angular/chart/src/lib/core/categorical-viewport-context.ts","../../../projects/angular/chart/src/lib/core/scatter-viewport-context.ts","../../../projects/angular/chart/src/lib/core/pointer-util.ts","../../../projects/angular/chart/src/lib/primitives/chart-brush.ts","../../../projects/angular/chart/src/lib/primitives/chart-pointer-tracker.ts","../../../projects/angular/chart/src/lib/primitives/chart-tooltip.ts","../../../projects/angular/chart/src/lib/primitives/chart-legend.ts","../../../projects/angular/chart/src/lib/primitives/chart-zoom-controls.ts","../../../projects/angular/chart/src/lib/primitives/pie-center.ts","../../../projects/angular/chart/src/lib/primitives/radial-center.ts","../../../projects/angular/chart/src/lib/charts/bar/bar-layout.ts","../../../projects/angular/chart/src/lib/charts/bar/bar-chart.ts","../../../projects/angular/chart/src/lib/charts/line/line-layout.ts","../../../projects/angular/chart/src/lib/charts/line/cartesian-adapter.ts","../../../projects/angular/chart/src/lib/charts/line/line-chart.ts","../../../projects/angular/chart/src/lib/charts/area/area-chart.ts","../../../projects/angular/chart/src/lib/charts/pie/pie-layout.ts","../../../projects/angular/chart/src/lib/charts/pie/pie-chart.ts","../../../projects/angular/chart/src/lib/charts/radar/radar-layout.ts","../../../projects/angular/chart/src/lib/charts/radar/radar-chart.ts","../../../projects/angular/chart/src/lib/charts/radial/radial-layout.ts","../../../projects/angular/chart/src/lib/charts/radial/radial-chart.ts","../../../projects/angular/chart/src/lib/charts/scatter/scatter-layout.ts","../../../projects/angular/chart/src/lib/charts/scatter/scatter-chart.ts","../../../projects/angular/chart/public-api.ts","../../../projects/angular/chart/ojiepermana-angular-chart.ts"],"sourcesContent":["import type { Type } from '@angular/core';\n\n/**\n * Theme-aware color definition for a chart series.\n *\n * Either:\n * - a single `color` string (raw CSS color — hex, hsl, oklch, CSS var ref), or\n * - a `theme` map whose keys match the document color scheme (`light` / `dark`).\n *\n * Values are injected verbatim into a scoped `<style>` block as\n * `--color-<key>: <value>;`, so any valid CSS color works.\n *\n * Defaults reference the theme tokens from `@ojiepermana/angular/theme`\n * (e.g. `'hsl(var(--chart-1))'`).\n */\nexport interface ChartSeriesConfig {\n /** Human-readable label (shown in legend, tooltip). */\n readonly label?: string;\n /** Optional icon component rendered next to the label. */\n readonly icon?: Type<unknown>;\n /** Raw color. Mutually exclusive with `theme`. */\n readonly color?: string;\n /** Theme-aware colors — keyed by color scheme. */\n readonly theme?: Readonly<Record<ChartThemeKey, string>>;\n}\n\n/** Supported color scheme keys. */\nexport type ChartThemeKey = 'light' | 'dark';\n\n/** Map of series-key → config. */\nexport type ChartConfig = Readonly<Record<string, ChartSeriesConfig>>;\n\n/** CSS selector under which a chart instance is scoped. */\nexport const CHART_DATA_ATTRIBUTE = 'data-chart';\n\n/** Default color schemes supported by the generated `<style>` block. */\nexport const CHART_THEMES: ReadonlyArray<{\n readonly key: ChartThemeKey;\n readonly selector: string;\n}> = [\n { key: 'light', selector: '' },\n { key: 'dark', selector: '[data-mode=\"dark\"]' },\n];\n\n/**\n * Generate the CSS rule-set for a chart instance: one `--color-<key>` per\n * series, scoped to the owning `[data-chart]` element, with optional dark\n * variant via `[data-mode=\"dark\"] [data-chart=\"…\"]`.\n *\n * Series without any color are skipped (consumer can fall back to a default).\n *\n * @param chartId Unique chart id (used as attribute value).\n * @param config Series configuration map.\n */\nexport function buildChartCss(chartId: string, config: ChartConfig): string {\n const entries = Object.entries(config).filter(([, cfg]) => cfg.color || cfg.theme);\n if (entries.length === 0) {\n return '';\n }\n\n return CHART_THEMES.map(({ key, selector }) => {\n const vars = entries\n .map(([seriesKey, cfg]) => {\n const value = cfg.theme?.[key] ?? cfg.color;\n return value ? ` --color-${escapeCssIdent(seriesKey)}: ${value};` : '';\n })\n .filter(Boolean)\n .join('\\n');\n\n if (!vars) {\n return '';\n }\n\n const scope = selector\n ? `${selector} [${CHART_DATA_ATTRIBUTE}=\"${chartId}\"]`\n : `[${CHART_DATA_ATTRIBUTE}=\"${chartId}\"]`;\n return `${scope} {\\n${vars}\\n}`;\n })\n .filter(Boolean)\n .join('\\n');\n}\n\n/**\n * Escape a string so it is safe to use as a CSS custom-property identifier.\n * Allows `[A-Za-z0-9_-]`; everything else becomes `_`.\n */\nfunction escapeCssIdent(input: string): string {\n return input.replace(/[^a-zA-Z0-9_-]/g, '_');\n}\n\n/** Resolve the `var(--color-<key>)` reference for a given series. */\nexport function seriesColorVar(seriesKey: string): string {\n return `var(--color-${seriesKey.replace(/[^a-zA-Z0-9_-]/g, '_')})`;\n}\n","import { Injectable, signal, computed, type Signal } from '@angular/core';\nimport type { ChartConfig } from './chart-config';\n\n/** Pixel dimensions of the chart render area. */\nexport interface ChartDimensions {\n readonly width: number;\n readonly height: number;\n}\n\n/** Active data point (for tooltip / crosshair) shared across primitives. */\nexport interface ChartActivePoint {\n readonly index: number;\n readonly datumIndex?: number;\n readonly seriesKey?: string;\n readonly clientX?: number;\n readonly clientY?: number;\n}\n\n/**\n * Shared chart state provided by `ChartContainer` to all nested chart\n * components (axes, grid, tooltip, legend, chart types).\n *\n * All state is exposed as signals so consumers can derive computed state\n * (scales, visible series, tooltip position) without manual subscriptions.\n */\n@Injectable()\nexport class ChartContext {\n /** Stable instance id — used in the `data-chart` attribute and CSS scope. */\n readonly id = signal<string>('');\n\n /** User-provided series config. */\n readonly config = signal<ChartConfig>({});\n\n /** Measured render-area dimensions (ResizeObserver-driven). */\n readonly dimensions = signal<ChartDimensions>({ width: 0, height: 0 });\n\n /** Currently highlighted data point (tooltip / crosshair). */\n readonly activePoint = signal<ChartActivePoint | null>(null);\n\n /** Series keys the user has toggled off via legend. */\n readonly hiddenSeries = signal<ReadonlySet<string>>(new Set());\n\n /** Ordered list of series keys (from `config`). */\n readonly seriesKeys: Signal<readonly string[]> = computed(() => Object.keys(this.config()));\n\n /** Series keys currently visible (config order minus `hiddenSeries`). */\n readonly visibleSeriesKeys: Signal<readonly string[]> = computed(() => {\n const hidden = this.hiddenSeries();\n return this.seriesKeys().filter((k) => !hidden.has(k));\n });\n\n /** Toggle visibility of a series. */\n toggleSeries(key: string): void {\n this.hiddenSeries.update((set) => {\n const next = new Set(set);\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n return next;\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, Renderer2, computed, effect, inject } from '@angular/core';\nimport { ChartContext } from './chart-context';\nimport { buildChartCss } from './chart-config';\n\n/**\n * Emits a scoped `<style>` block mapping every series key in the current\n * `ChartConfig` to a `--color-<key>` CSS custom property, scoped to\n * `[data-chart=\"<id>\"]`. Dark-mode values are scoped under `[data-mode=\"dark\"]`.\n *\n * Implemented as an empty component that injects a real `<style>` element\n * into its host via `Renderer2`. We avoid rendering `<style>` directly in a\n * template — Angular hoists those into component CSS and strips\n * interpolations from them.\n *\n * Consumers never instantiate this directly — `ChartContainer` renders it.\n */\n@Component({\n selector: 'ui-chart-style',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '',\n})\nexport class ChartStyle {\n private readonly ctx = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly renderer = inject(Renderer2);\n private styleEl: HTMLStyleElement | null = null;\n\n protected readonly css = computed(() => buildChartCss(this.ctx.id(), this.ctx.config()));\n\n constructor() {\n effect(() => {\n const css = this.css();\n if (!this.styleEl) {\n this.styleEl = this.renderer.createElement('style');\n this.renderer.appendChild(this.host.nativeElement, this.styleEl);\n }\n this.styleEl!.textContent = css;\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ChartContext } from './chart-context';\nimport { ChartStyle } from './chart-style';\nimport { CHART_DATA_ATTRIBUTE, type ChartConfig } from './chart-config';\n\nlet chartIdCounter = 0;\n\n/**\n * Root of every chart. Provides `ChartContext` to descendants, reflects the\n * chart id via `data-chart`, injects the per-instance CSS-variable\n * `<style>` block, and tracks its render-area dimensions via\n * `ResizeObserver`.\n *\n * Usage:\n * ```html\n * <ui-chart-container [config]=\"cfg\">\n * <ui-bar-chart [data]=\"data\" />\n * </ui-chart-container>\n * ```\n */\n@Component({\n selector: 'ui-chart-container',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ChartContext],\n imports: [ChartStyle],\n host: {\n '[attr.data-chart]': 'ctx.id()',\n '[class]': 'hostClass()',\n },\n template: `\n <ui-chart-style />\n <ng-content />\n `,\n})\nexport class ChartContainer {\n protected readonly ctx = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly zone = inject(NgZone);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Series configuration. Required for color / label resolution. */\n readonly config = input.required<ChartConfig>();\n\n /**\n * Tailwind aspect-ratio utility for the container. Defaults to `aspect-video`\n * for cartesian charts; override with `aspect-square` for radial / pie layouts.\n */\n readonly aspect = input<string>('aspect-video');\n\n protected readonly hostClass = computed(() => `relative flex ${this.aspect()} justify-center text-xs`);\n\n /**\n * Optional explicit id override. When omitted, a stable auto-id is\n * generated (`chart-<n>`), unique across the document.\n */\n readonly chartId = input<string | null>(null);\n\n constructor() {\n const autoId = `chart-${++chartIdCounter}`;\n\n // Sync id + config into the shared context.\n effect(() => {\n this.ctx.id.set(this.chartId() ?? autoId);\n });\n effect(() => {\n this.ctx.config.set(this.config());\n });\n\n // Observe host size (browser only; client-only is a confirmed constraint).\n if (isPlatformBrowser(this.platformId)) {\n afterNextRender(() => this.observeSize());\n }\n }\n\n private observeSize(): void {\n const el = this.host.nativeElement;\n if (typeof ResizeObserver === 'undefined') {\n const rect = el.getBoundingClientRect();\n this.ctx.dimensions.set({ width: rect.width, height: rect.height });\n return;\n }\n\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect;\n // Avoid NgZone churn — dimensions signal drives CD on its own.\n this.zone.run(() => this.ctx.dimensions.set({ width, height }));\n }\n });\n observer.observe(el);\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n}\n\n/**\n * Re-export the `data-chart` attribute constant for primitives that want to\n * target the same scope in their own templates.\n */\nexport { CHART_DATA_ATTRIBUTE };\n","import { Injectable, signal, type Signal } from '@angular/core';\nimport type { ScaleBand, ScaleLinear } from 'd3-scale';\n\n/** A single row of chart data — one categorical key + N numeric series. */\nexport type ChartDatum = Readonly<Record<string, unknown>>;\n\n/** Render-area margins inside the chart's SVG (px). */\nexport interface ChartMargin {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\n/** Axis orientation for cartesian charts. */\nexport type ChartOrientation = 'vertical' | 'horizontal';\n\n/** Primary axis scale — band for categorical, linear for numeric. */\nexport type CategoryScale = ScaleBand<string>;\nexport type ValueScale = ScaleLinear<number, number>;\n\n/**\n * Cartesian plotting frame shared between a chart type (Bar, Line, Area…)\n * and its axis / grid primitives.\n *\n * The owning chart component provides an instance and publishes its scales;\n * descendants read them via signals and re-render when dimensions or data\n * change.\n */\n@Injectable()\nexport class CartesianContext {\n /** Inner width (outer width − margin.left − margin.right). */\n readonly innerWidth = signal<number>(0);\n\n /** Inner height (outer height − margin.top − margin.bottom). */\n readonly innerHeight = signal<number>(0);\n\n /** Margins around the plotting area. */\n readonly margin = signal<ChartMargin>({ top: 8, right: 8, bottom: 24, left: 40 });\n\n /** Layout orientation (drives which axis holds the band scale). */\n readonly orientation = signal<ChartOrientation>('vertical');\n\n /** Band (categorical) scale. */\n readonly categoryScale = signal<CategoryScale | null>(null);\n\n /** Linear (numeric) scale. */\n readonly valueScale = signal<ValueScale | null>(null);\n\n /** Ordered category domain (e.g. x labels for vertical, y labels for horizontal). */\n readonly categories = signal<readonly string[]>([]);\n}\n\n/** Resolve the scale that maps to the X axis for a given orientation. */\nexport function xScale(\n ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>,\n): Signal<CategoryScale | ValueScale | null> {\n return ctx.orientation() === 'vertical' ? ctx.categoryScale : ctx.valueScale;\n}\n\n/** Resolve the scale that maps to the Y axis for a given orientation. */\nexport function yScale(\n ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>,\n): Signal<CategoryScale | ValueScale | null> {\n return ctx.orientation() === 'vertical' ? ctx.valueScale : ctx.categoryScale;\n}\n","import type { ScaleBand, ScaleLinear } from 'd3-scale';\n\n/** A tick descriptor for rendering axes. */\nexport interface ChartTick {\n readonly value: string | number;\n /** Offset (px) along the axis. For band scales this is the band center. */\n readonly offset: number;\n /** Display label. */\n readonly label: string;\n}\n\n/** Produce evenly-spaced ticks for a band (categorical) scale. */\nexport function bandTicks(scale: ScaleBand<string>): ChartTick[] {\n const half = scale.bandwidth() / 2;\n return scale.domain().map((value) => ({\n value,\n offset: (scale(value) ?? 0) + half,\n label: value,\n }));\n}\n\n/**\n * Produce ticks for a linear scale.\n *\n * @param scale The linear scale.\n * @param count Approximate number of ticks (hint, d3 may return fewer/more).\n * @param formatter Label formatter.\n */\nexport function linearTicks(\n scale: ScaleLinear<number, number>,\n count = 5,\n formatter: (value: number) => string = (v) => String(v),\n): ChartTick[] {\n return scale.ticks(count).map((value) => ({\n value,\n offset: scale(value),\n label: formatter(value),\n }));\n}\n","export interface ChartIndexRange {\n readonly startIndex: number;\n readonly endIndex: number;\n}\n\nexport type NumericDomain = readonly [number, number];\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport function normalizeIndexRange(start: number, end: number, maxCount: number): ChartIndexRange | null {\n if (maxCount <= 0) {\n return null;\n }\n const lo = clamp(Math.floor(Math.min(start, end)), 0, maxCount - 1);\n const hi = clamp(Math.floor(Math.max(start, end)), 0, maxCount - 1);\n return { startIndex: lo, endIndex: hi };\n}\n\nexport function effectiveIndexRange(range: ChartIndexRange | null, maxCount: number): ChartIndexRange | null {\n if (maxCount <= 0) {\n return null;\n }\n return range\n ? normalizeIndexRange(range.startIndex, range.endIndex, maxCount)\n : { startIndex: 0, endIndex: maxCount - 1 };\n}\n\nexport function indexRangeSize(range: ChartIndexRange | null, maxCount: number): number {\n const effective = effectiveIndexRange(range, maxCount);\n return effective ? effective.endIndex - effective.startIndex + 1 : 0;\n}\n\nexport function sliceByIndexRange<T>(data: readonly T[], range: ChartIndexRange | null): readonly T[] {\n if (!range) {\n return data;\n }\n return data.slice(range.startIndex, range.endIndex + 1);\n}\n\nexport function zoomIndexRange(\n current: ChartIndexRange | null,\n maxCount: number,\n anchorIndex: number,\n factor: number,\n): ChartIndexRange | null {\n const base = effectiveIndexRange(current, maxCount);\n if (!base) {\n return null;\n }\n\n const currentSize = base.endIndex - base.startIndex + 1;\n const nextSize = clamp(Math.round(currentSize * factor), 2, maxCount);\n if (nextSize >= maxCount) {\n return null;\n }\n\n const boundedAnchor = clamp(anchorIndex, base.startIndex, base.endIndex);\n const ratio = currentSize <= 1 ? 0.5 : (boundedAnchor - base.startIndex) / (currentSize - 1);\n\n let start = Math.round(boundedAnchor - ratio * (nextSize - 1));\n start = clamp(start, 0, maxCount - nextSize);\n return { startIndex: start, endIndex: start + nextSize - 1 };\n}\n\nexport function panIndexRange(\n current: ChartIndexRange | null,\n maxCount: number,\n deltaSteps: number,\n): ChartIndexRange | null {\n const base = effectiveIndexRange(current, maxCount);\n if (!base) {\n return null;\n }\n const size = base.endIndex - base.startIndex + 1;\n if (size >= maxCount) {\n return null;\n }\n\n const start = clamp(base.startIndex + deltaSteps, 0, maxCount - size);\n return { startIndex: start, endIndex: start + size - 1 };\n}\n\nexport function normalizeNumericDomain(a: number, b: number): NumericDomain {\n if (a === b) {\n return [a - 1, b + 1];\n }\n return a < b ? [a, b] : [b, a];\n}\n\nexport function zoomNumericDomain(\n current: NumericDomain,\n full: NumericDomain,\n anchor: number,\n factor: number,\n): NumericDomain {\n const currentWidth = current[1] - current[0];\n const fullWidth = full[1] - full[0];\n const nextWidth = clamp(currentWidth * factor, fullWidth / 50, fullWidth);\n if (nextWidth >= fullWidth) {\n return full;\n }\n\n const ratio = currentWidth === 0 ? 0.5 : (anchor - current[0]) / currentWidth;\n let start = anchor - ratio * nextWidth;\n start = clamp(start, full[0], full[1] - nextWidth);\n return [start, start + nextWidth];\n}\n\nexport function panNumericDomain(current: NumericDomain, full: NumericDomain, delta: number): NumericDomain {\n const width = current[1] - current[0];\n const start = clamp(current[0] + delta, full[0], full[1] - width);\n return [start, start + width];\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { bandTicks, linearTicks, type ChartTick } from '../core/ticks';\n\n/**\n * X axis for a cartesian chart. Reads scales from `CartesianContext`.\n *\n * Renders as `<svg:g>` — must be placed inside the owning chart's SVG.\n */\n@Component({\n selector: 'svg:g[ui-chart-axis-x]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-axis chart-axis-x text-muted-foreground',\n '[attr.transform]': 'transform()',\n },\n template: `\n <svg:line class=\"stroke-border\" [attr.x1]=\"0\" [attr.x2]=\"innerWidth()\" y1=\"0\" y2=\"0\" />\n @for (t of ticks(); track t.value) {\n <svg:g [attr.transform]=\"'translate(' + t.offset + ',0)'\">\n @if (tickLine()) {\n <svg:line class=\"stroke-border\" y1=\"0\" y2=\"6\" />\n }\n <svg:text\n class=\"fill-current\"\n y=\"18\"\n text-anchor=\"middle\"\n style=\"font-size: var(--text-xs); font-family: var(--font-sans)\">\n {{ t.label }}\n </svg:text>\n </svg:g>\n }\n `,\n})\nexport class ChartAxisX {\n private readonly ctx = inject(CartesianContext);\n\n /** Approximate tick count for linear (value) scales. */\n readonly tickCount = input<number>(5);\n /** Show 6-px tick marks between the axis line and the labels. */\n readonly tickLine = input<boolean>(true);\n /** Formatter for numeric tick labels. */\n readonly tickFormat = input<(value: number) => string>((v) => String(v));\n\n protected readonly innerWidth = this.ctx.innerWidth;\n protected readonly transform = computed(() => `translate(0,${this.ctx.innerHeight()})`);\n\n protected readonly ticks = computed<ChartTick[]>(() => {\n const horizontal = this.ctx.orientation() === 'horizontal';\n if (horizontal) {\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount(), this.tickFormat()) : [];\n }\n const scale = this.ctx.categoryScale();\n return scale ? bandTicks(scale) : [];\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { bandTicks, linearTicks, type ChartTick } from '../core/ticks';\n\n/**\n * Y axis for a cartesian chart. Reads scales from `CartesianContext`.\n *\n * Renders as `<svg:g>` — must be placed inside the owning chart's SVG.\n */\n@Component({\n selector: 'svg:g[ui-chart-axis-y]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-axis chart-axis-y text-muted-foreground',\n },\n template: `\n <svg:line class=\"stroke-border\" x1=\"0\" x2=\"0\" [attr.y1]=\"0\" [attr.y2]=\"innerHeight()\" />\n @for (t of ticks(); track t.value) {\n <svg:g [attr.transform]=\"'translate(0,' + t.offset + ')'\">\n @if (tickLine()) {\n <svg:line class=\"stroke-border\" x1=\"-6\" x2=\"0\" />\n }\n <svg:text\n class=\"fill-current\"\n x=\"-8\"\n dy=\"0.32em\"\n text-anchor=\"end\"\n style=\"font-size: var(--text-xs); font-family: var(--font-sans)\">\n {{ t.label }}\n </svg:text>\n </svg:g>\n }\n `,\n})\nexport class ChartAxisY {\n private readonly ctx = inject(CartesianContext);\n\n readonly tickCount = input<number>(5);\n readonly tickLine = input<boolean>(true);\n readonly tickFormat = input<(value: number) => string>((v) => String(v));\n\n protected readonly innerHeight = this.ctx.innerHeight;\n\n protected readonly ticks = computed<ChartTick[]>(() => {\n const horizontal = this.ctx.orientation() === 'horizontal';\n if (horizontal) {\n const scale = this.ctx.categoryScale();\n return scale ? bandTicks(scale) : [];\n }\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount(), this.tickFormat()) : [];\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { linearTicks } from '../core/ticks';\n\n/**\n * Horizontal / vertical grid lines for the cartesian plotting area.\n *\n * Reads tick positions from `CartesianContext.valueScale`. Direction of the\n * grid lines follows `orientation`:\n * - vertical → horizontal grid lines (one per y-tick)\n * - horizontal → vertical grid lines (one per x-tick)\n */\n@Component({\n selector: 'svg:g[ui-chart-grid]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-grid text-border',\n },\n template: `\n @for (t of ticks(); track t.value) {\n <svg:line\n class=\"stroke-border\"\n stroke-dasharray=\"3 3\"\n [attr.x1]=\"line(t.offset).x1\"\n [attr.x2]=\"line(t.offset).x2\"\n [attr.y1]=\"line(t.offset).y1\"\n [attr.y2]=\"line(t.offset).y2\" />\n }\n `,\n})\nexport class ChartGrid {\n private readonly ctx = inject(CartesianContext);\n\n readonly tickCount = input<number>(5);\n\n protected readonly ticks = computed(() => {\n const scale = this.ctx.valueScale();\n return scale ? linearTicks(scale, this.tickCount()) : [];\n });\n\n protected readonly line = (offset: number) => {\n if (this.ctx.orientation() === 'vertical') {\n return { x1: 0, x2: this.ctx.innerWidth(), y1: offset, y2: offset };\n }\n return { x1: offset, x2: offset, y1: 0, y2: this.ctx.innerHeight() };\n };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { CartesianContext } from '../core/cartesian-context';\n\n/**\n * Crosshair primitive — a line drawn through the currently active data point\n * perpendicular to the categorical axis. Reads `activePoint` from\n * `ChartContext` and the scales from `CartesianContext`.\n *\n * Place inside a cartesian chart's SVG inner group.\n */\n@Component({\n selector: 'svg:g[ui-chart-crosshair]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'chart-crosshair' },\n template: `\n @if (line(); as l) {\n <svg:line\n class=\"stroke-border\"\n stroke-dasharray=\"3 3\"\n [attr.x1]=\"l.x1\"\n [attr.x2]=\"l.x2\"\n [attr.y1]=\"l.y1\"\n [attr.y2]=\"l.y2\" />\n }\n `,\n})\nexport class ChartCrosshair {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n\n protected readonly line = computed(() => {\n const active = this.root.activePoint();\n const scale = this.cart.categoryScale();\n const categories = this.cart.categories();\n if (!active || !scale || active.index < 0 || active.index >= categories.length) {\n return null;\n }\n const base = scale(categories[active.index]) ?? 0;\n const pos = base + scale.bandwidth() / 2;\n if (this.cart.orientation() === 'vertical') {\n return { x1: pos, x2: pos, y1: 0, y2: this.cart.innerHeight() };\n }\n return { x1: 0, x2: this.cart.innerWidth(), y1: pos, y2: pos };\n });\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport type { ChartIndexRange } from './viewport';\n\n@Injectable()\nexport class CategoricalViewportContext {\n readonly dataCount = signal<number>(0);\n readonly brushRange = signal<ChartIndexRange | null>(null);\n readonly zoomRange = signal<ChartIndexRange | null>(null);\n\n readonly hasZoom = computed(() => {\n const range = this.zoomRange();\n const count = this.dataCount();\n return !!range && count > 0 && (range.startIndex > 0 || range.endIndex < count - 1);\n });\n\n resetZoom(): void {\n this.brushRange.set(null);\n this.zoomRange.set(null);\n }\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport type { ScaleLinear } from 'd3-scale';\nimport type { NumericDomain } from './viewport';\n\n@Injectable()\nexport class ScatterViewportContext {\n readonly innerWidth = signal<number>(0);\n readonly innerHeight = signal<number>(0);\n readonly fullXDomain = signal<NumericDomain | null>(null);\n readonly fullYDomain = signal<NumericDomain | null>(null);\n readonly zoomXDomain = signal<NumericDomain | null>(null);\n readonly zoomYDomain = signal<NumericDomain | null>(null);\n readonly xScale = signal<ScaleLinear<number, number> | null>(null);\n readonly yScale = signal<ScaleLinear<number, number> | null>(null);\n\n readonly hasZoom = computed(() => this.zoomXDomain() !== null || this.zoomYDomain() !== null);\n\n resetZoom(): void {\n this.zoomXDomain.set(null);\n this.zoomYDomain.set(null);\n }\n}\n","import type { CartesianContext } from './cartesian-context';\n\nexport interface ClientPoint {\n readonly clientX: number;\n readonly clientY: number;\n}\n\n/**\n * Given a pointer event's local (x, y) relative to the chart's inner group,\n * resolve the nearest category index along the categorical axis.\n *\n * @returns index into `ctx.categories()` (or −1 if no scale / no data).\n */\nexport function nearestCategoryIndex(\n ctx: Pick<CartesianContext, 'categoryScale' | 'categories' | 'orientation'>,\n localX: number,\n localY: number,\n): number {\n const scale = ctx.categoryScale();\n const categories = ctx.categories();\n if (!scale || categories.length === 0) return -1;\n\n const isVertical = ctx.orientation() === 'vertical';\n const pointerAlong = isVertical ? localX : localY;\n\n const bandwidth = scale.bandwidth();\n // scale.step() is only defined for band scales; fall back to bandwidth.\n const step = (scale as unknown as { step?: () => number }).step?.() ?? bandwidth;\n\n let bestIndex = -1;\n let bestDelta = Infinity;\n for (let i = 0; i < categories.length; i++) {\n const base = scale(categories[i]) ?? 0;\n const center = base + bandwidth / 2;\n const delta = Math.abs(pointerAlong - center);\n if (delta < bestDelta) {\n bestDelta = delta;\n bestIndex = i;\n }\n }\n\n // Ignore clicks far outside any band (> 1 step away).\n if (bestDelta > step) {\n return -1;\n }\n return bestIndex;\n}\n\n/** Resolve the client-space center point of a focused or clicked SVG/HTML element. */\nexport function elementClientCenter(target: EventTarget | null): ClientPoint | null {\n const el = target as Element | null;\n if (!el || typeof el.getBoundingClientRect !== 'function') {\n return null;\n }\n const rect = el.getBoundingClientRect();\n return {\n clientX: rect.left + rect.width / 2,\n clientY: rect.top + rect.height / 2,\n };\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, computed, inject, signal, viewChild } from '@angular/core';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\nimport { ScatterViewportContext } from '../core/scatter-viewport-context';\nimport {\n indexRangeSize,\n normalizeIndexRange,\n normalizeNumericDomain,\n panIndexRange,\n panNumericDomain,\n zoomIndexRange,\n zoomNumericDomain,\n type ChartIndexRange,\n type NumericDomain,\n} from '../core/viewport';\nimport { nearestCategoryIndex } from '../core/pointer-util';\n\ntype BrushMode = 'category-brush' | 'category-pan' | 'scatter-brush' | 'scatter-pan' | null;\n\ninterface LocalPoint {\n readonly x: number;\n readonly y: number;\n}\n\ninterface ScatterBrushState {\n readonly start: LocalPoint;\n readonly current: LocalPoint;\n}\n\ninterface ScatterPanState {\n readonly start: LocalPoint;\n readonly xDomain: NumericDomain;\n readonly yDomain: NumericDomain;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nfunction sameDomain(a: NumericDomain, b: NumericDomain): boolean {\n return Math.abs(a[0] - b[0]) < 1e-9 && Math.abs(a[1] - b[1]) < 1e-9;\n}\n\n@Component({\n selector: 'svg:g[ui-chart-brush]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'chart-brush',\n '(window:pointermove)': 'onPointerMove($event)',\n '(window:pointerup)': 'onPointerUp($event)',\n '(window:pointercancel)': 'onPointerCancel($event)',\n },\n template: `\n <svg:rect\n #hitbox\n class=\"fill-transparent touch-none\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel($event)\"\n (wheel)=\"onWheel($event)\"\n (dblclick)=\"resetZoom()\" />\n\n @if (categoryPreview(); as rect) {\n <svg:rect\n class=\"fill-foreground/10 stroke-foreground/30\"\n [attr.x]=\"rect.x\"\n [attr.y]=\"rect.y\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n stroke-dasharray=\"4 3\" />\n }\n\n @if (scatterPreviewRect(); as rect) {\n <svg:rect\n class=\"fill-foreground/10 stroke-foreground/30\"\n [attr.x]=\"rect.x\"\n [attr.y]=\"rect.y\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n stroke-dasharray=\"4 3\" />\n }\n `,\n})\nexport class ChartBrush {\n private readonly hitbox = viewChild.required<ElementRef<SVGRectElement>>('hitbox');\n private readonly cart = inject(CartesianContext, { optional: true });\n private readonly categorical = inject(CategoricalViewportContext, { optional: true });\n private readonly scatter = inject(ScatterViewportContext, { optional: true });\n\n private readonly mode = signal<BrushMode>(null);\n private readonly activePointerId = signal<number | null>(null);\n private readonly categoryStartIndex = signal<number | null>(null);\n private readonly categoryPanStart = signal<{ coord: number; range: ChartIndexRange | null } | null>(null);\n private readonly scatterBrush = signal<ScatterBrushState | null>(null);\n private readonly scatterPan = signal<ScatterPanState | null>(null);\n\n protected readonly width = computed(() => this.scatter?.innerWidth() ?? this.cart?.innerWidth() ?? 0);\n protected readonly height = computed(() => this.scatter?.innerHeight() ?? this.cart?.innerHeight() ?? 0);\n\n protected readonly categoryPreview = computed(() => {\n const cart = this.cart;\n const viewport = this.categorical;\n const range = viewport?.brushRange();\n const scale = cart?.categoryScale();\n const categories = cart?.categories() ?? [];\n if (!cart || !viewport || !range || !scale || categories.length === 0) {\n return null;\n }\n\n const visibleStart = viewport.zoomRange()?.startIndex ?? 0;\n const startVisible = range.startIndex - visibleStart;\n const endVisible = range.endIndex - visibleStart;\n if (startVisible < 0 || endVisible >= categories.length) {\n return null;\n }\n\n const first = scale(categories[startVisible]) ?? 0;\n const last = (scale(categories[endVisible]) ?? 0) + scale.bandwidth();\n if (cart.orientation() === 'vertical') {\n return { x: Math.min(first, last), y: 0, width: Math.abs(last - first), height: cart.innerHeight() };\n }\n return { x: 0, y: Math.min(first, last), width: cart.innerWidth(), height: Math.abs(last - first) };\n });\n\n protected readonly scatterPreviewRect = computed(() => {\n const preview = this.scatterBrush();\n if (!preview) {\n return null;\n }\n return {\n x: Math.min(preview.start.x, preview.current.x),\n y: Math.min(preview.start.y, preview.current.y),\n width: Math.abs(preview.current.x - preview.start.x),\n height: Math.abs(preview.current.y - preview.start.y),\n };\n });\n\n protected onPointerDown(event: PointerEvent): void {\n if (this.activePointerId() != null) {\n return;\n }\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n\n if (this.scatter) {\n if (!this.scatter.fullXDomain() || !this.scatter.fullYDomain()) {\n return;\n }\n event.preventDefault();\n this.activePointerId.set(event.pointerId);\n this.hitbox().nativeElement.setPointerCapture(event.pointerId);\n this.onScatterPointerDown(event, local);\n return;\n }\n if (!this.cart || !this.categorical) {\n return;\n }\n\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (index < 0) {\n return;\n }\n\n event.preventDefault();\n this.activePointerId.set(event.pointerId);\n this.hitbox().nativeElement.setPointerCapture(event.pointerId);\n\n const visibleStart = this.categorical.zoomRange()?.startIndex ?? 0;\n const absoluteIndex = visibleStart + index;\n if (event.pointerType === 'touch' && this.categorical.hasZoom()) {\n this.mode.set('category-pan');\n this.categoryPanStart.set({ coord: this.pointerAxis(local), range: this.categorical.zoomRange() });\n return;\n }\n\n this.mode.set('category-brush');\n this.categoryStartIndex.set(absoluteIndex);\n this.categorical.brushRange.set({ startIndex: absoluteIndex, endIndex: absoluteIndex });\n }\n\n protected onPointerMove(event: PointerEvent): void {\n if (this.activePointerId() !== event.pointerId) {\n return;\n }\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n\n if (this.mode() === 'category-brush' && this.cart && this.categorical) {\n const startIndex = this.categoryStartIndex();\n if (startIndex == null) {\n return;\n }\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (index < 0) {\n return;\n }\n const visibleStart = this.categorical.zoomRange()?.startIndex ?? 0;\n this.categorical.brushRange.set(\n normalizeIndexRange(startIndex, visibleStart + index, this.categorical.dataCount()),\n );\n return;\n }\n\n if (this.mode() === 'category-pan' && this.cart && this.categorical) {\n const pan = this.categoryPanStart();\n if (!pan) {\n return;\n }\n const scale = this.cart.categoryScale();\n const step = scale?.step?.() ?? scale?.bandwidth() ?? 0;\n if (step <= 0) {\n return;\n }\n const deltaSteps = Math.round((pan.coord - this.pointerAxis(local)) / step);\n this.categorical.zoomRange.set(panIndexRange(pan.range, this.categorical.dataCount(), deltaSteps));\n return;\n }\n\n if (this.mode() === 'scatter-brush') {\n const preview = this.scatterBrush();\n if (!preview) {\n return;\n }\n this.scatterBrush.set({ start: preview.start, current: local });\n return;\n }\n\n if (this.mode() === 'scatter-pan' && this.scatter) {\n const pan = this.scatterPan();\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (!pan || !xScale || !yScale || !fullX || !fullY) {\n return;\n }\n const deltaX = xScale.invert(pan.start.x) - xScale.invert(local.x);\n const deltaY = yScale.invert(pan.start.y) - yScale.invert(local.y);\n this.scatter.zoomXDomain.set(panNumericDomain(pan.xDomain, fullX, deltaX));\n this.scatter.zoomYDomain.set(panNumericDomain(pan.yDomain, fullY, deltaY));\n }\n }\n\n protected onPointerUp(event?: PointerEvent): void {\n if (event && this.activePointerId() !== event.pointerId) {\n return;\n }\n if (this.mode() === 'category-brush' && this.categorical) {\n const range = this.categorical.brushRange();\n if (range && indexRangeSize(range, this.categorical.dataCount()) > 1) {\n this.categorical.zoomRange.set(range);\n }\n this.categorical.brushRange.set(null);\n }\n\n if (this.mode() === 'scatter-brush' && this.scatter) {\n const preview = this.scatterBrush();\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (preview && xScale && yScale && fullX && fullY) {\n const width = Math.abs(preview.current.x - preview.start.x);\n const height = Math.abs(preview.current.y - preview.start.y);\n if (width >= 6 && height >= 6) {\n const nextX = normalizeNumericDomain(xScale.invert(preview.start.x), xScale.invert(preview.current.x));\n const nextY = normalizeNumericDomain(yScale.invert(preview.start.y), yScale.invert(preview.current.y));\n this.scatter.zoomXDomain.set(sameDomain(nextX, fullX) ? null : nextX);\n this.scatter.zoomYDomain.set(sameDomain(nextY, fullY) ? null : nextY);\n }\n }\n this.scatterBrush.set(null);\n }\n\n this.mode.set(null);\n this.categoryStartIndex.set(null);\n this.categoryPanStart.set(null);\n this.scatterPan.set(null);\n if (event && this.hitbox().nativeElement.hasPointerCapture(event.pointerId)) {\n this.hitbox().nativeElement.releasePointerCapture(event.pointerId);\n }\n this.activePointerId.set(null);\n }\n\n protected onPointerCancel(event: PointerEvent): void {\n if (this.activePointerId() !== event.pointerId) {\n return;\n }\n if (this.hitbox().nativeElement.hasPointerCapture(event.pointerId)) {\n this.hitbox().nativeElement.releasePointerCapture(event.pointerId);\n }\n this.mode.set(null);\n this.categorical?.brushRange.set(null);\n this.scatterBrush.set(null);\n this.categoryStartIndex.set(null);\n this.categoryPanStart.set(null);\n this.scatterPan.set(null);\n this.activePointerId.set(null);\n }\n\n protected onWheel(event: WheelEvent): void {\n const local = this.localPoint(event);\n if (!local) {\n return;\n }\n event.preventDefault();\n\n if (this.scatter) {\n const xScale = this.scatter.xScale();\n const yScale = this.scatter.yScale();\n const fullX = this.scatter.fullXDomain();\n const fullY = this.scatter.fullYDomain();\n if (!xScale || !yScale || !fullX || !fullY) {\n return;\n }\n const factor = event.deltaY < 0 ? 0.8 : 1.25;\n const currentX = this.scatter.zoomXDomain() ?? fullX;\n const currentY = this.scatter.zoomYDomain() ?? fullY;\n const nextX = zoomNumericDomain(currentX, fullX, xScale.invert(local.x), factor);\n const nextY = zoomNumericDomain(currentY, fullY, yScale.invert(local.y), factor);\n this.scatter.zoomXDomain.set(sameDomain(nextX, fullX) ? null : nextX);\n this.scatter.zoomYDomain.set(sameDomain(nextY, fullY) ? null : nextY);\n return;\n }\n\n if (!this.cart || !this.categorical) {\n return;\n }\n const visibleIndex = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n local.x,\n local.y,\n );\n if (visibleIndex < 0) {\n return;\n }\n const anchor = (this.categorical.zoomRange()?.startIndex ?? 0) + visibleIndex;\n const factor = event.deltaY < 0 ? 0.75 : 1.25;\n this.categorical.zoomRange.set(\n zoomIndexRange(this.categorical.zoomRange(), this.categorical.dataCount(), anchor, factor),\n );\n this.categorical.brushRange.set(null);\n }\n\n protected resetZoom(): void {\n this.categorical?.resetZoom();\n this.scatter?.resetZoom();\n this.scatterBrush.set(null);\n }\n\n private onScatterPointerDown(event: PointerEvent, local: LocalPoint): void {\n const fullX = this.scatter?.fullXDomain();\n const fullY = this.scatter?.fullYDomain();\n if (!this.scatter || !fullX || !fullY) {\n return;\n }\n\n if (event.pointerType === 'touch' && this.scatter.hasZoom()) {\n this.mode.set('scatter-pan');\n this.scatterPan.set({\n start: local,\n xDomain: this.scatter.zoomXDomain() ?? fullX,\n yDomain: this.scatter.zoomYDomain() ?? fullY,\n });\n return;\n }\n\n this.mode.set('scatter-brush');\n this.scatterBrush.set({ start: local, current: local });\n }\n\n private localPoint(event: { clientX: number; clientY: number }): LocalPoint | null {\n const hitbox = this.hitbox()?.nativeElement;\n const width = this.width();\n const height = this.height();\n if (!hitbox || width <= 0 || height <= 0) {\n return null;\n }\n const rect = hitbox.getBoundingClientRect();\n if (rect.width <= 0 || rect.height <= 0) {\n return null;\n }\n return {\n x: clamp(((event.clientX - rect.left) / rect.width) * width, 0, width),\n y: clamp(((event.clientY - rect.top) / rect.height) * height, 0, height),\n };\n }\n\n private pointerAxis(local: LocalPoint): number {\n return this.cart?.orientation() === 'horizontal' ? local.y : local.x;\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { CartesianContext } from '../core/cartesian-context';\nimport { nearestCategoryIndex } from '../core/pointer-util';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\n\n/**\n * Attach to a chart's `<svg:svg>` to publish pointer-driven active-point\n * state into the surrounding `ChartContext`.\n *\n * Computes the local (x, y) of the pointer relative to the inner plotting\n * area, resolves the nearest category, and updates\n * `ChartContext.activePoint`. Clears it on `pointerleave`.\n */\n@Directive({\n selector: 'svg:svg[uiChartPointerTracker]',\n host: {\n '(pointermove)': 'onMove($event)',\n '(pointerleave)': 'onLeave()',\n },\n})\nexport class ChartPointerTracker {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext, { optional: true });\n\n protected onMove(event: PointerEvent): void {\n const target = event.currentTarget as SVGSVGElement | null;\n if (!target) return;\n const rect = target.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return;\n\n const { width, height } = this.root.dimensions();\n // Map client coords → viewBox coords (SVG uses `0 0 width height`,\n // preserveAspectRatio=\"none\" so axes scale independently).\n const scaleX = width / rect.width;\n const scaleY = height / rect.height;\n const viewX = (event.clientX - rect.left) * scaleX;\n const viewY = (event.clientY - rect.top) * scaleY;\n\n const margin = this.cart.margin();\n const localX = viewX - margin.left;\n const localY = viewY - margin.top;\n\n const index = nearestCategoryIndex(\n {\n categoryScale: this.cart.categoryScale,\n categories: this.cart.categories,\n orientation: this.cart.orientation,\n },\n localX,\n localY,\n );\n if (index < 0) {\n this.root.activePoint.set(null);\n return;\n }\n this.root.activePoint.set({\n index,\n datumIndex: (this.viewport?.zoomRange()?.startIndex ?? 0) + index,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n }\n\n protected onLeave(): void {\n this.root.activePoint.set(null);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n type Type,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { ChartContext } from '../core/chart-context';\nimport type { ChartDatum } from '../core/cartesian-context';\nimport { seriesColorVar } from '../core/chart-config';\n\n/** Row of data fed to tooltip templates. */\nexport interface ChartTooltipRow {\n readonly seriesKey: string;\n readonly label: string;\n readonly value: unknown;\n readonly color: string;\n readonly icon?: Type<unknown>;\n}\n\n/** Payload available to a user-supplied tooltip template. */\nexport interface ChartTooltipPayload {\n readonly category: string;\n readonly datum: ChartDatum;\n readonly rows: readonly ChartTooltipRow[];\n}\n\n/** Indicator rendered beside each tooltip row. */\nexport type ChartTooltipIndicator = 'dot' | 'line' | 'dashed' | 'none';\n\n/** Signature for the per-row value formatter (string output). */\nexport type ChartTooltipValueFormatter = (value: unknown, row: ChartTooltipRow, payload: ChartTooltipPayload) => string;\n\n/** Signature for the tooltip header (label) formatter. */\nexport type ChartTooltipLabelFormatter = (label: string, payload: ChartTooltipPayload) => string;\n\n/** Locate the chart container DOM in order to position the tooltip. */\nfunction containerRect(el: HTMLElement): DOMRect | null {\n // Climb to the nearest `[data-chart]` (the ChartContainer host).\n let node: HTMLElement | null = el;\n while (node && !node.hasAttribute('data-chart')) {\n node = node.parentElement;\n }\n return node?.getBoundingClientRect() ?? null;\n}\n\n/**\n * Tooltip overlay — renders the default tooltip card (or a user-supplied\n * template) anchored to the currently active data point.\n *\n * Shadcn-compatible knobs:\n * - `indicator=\"line\"` / `\"none\"` / `\"dashed\"` — swap the row glyph\n * - `hideLabel` — drop the header row\n * - `label=\"Activities\"` — override the header text\n * - `labelKey=\"activities\"` — resolve the header from `config[labelKey].label`\n * - `labelFormatter` — transform the header (e.g. ISO date → long date)\n * - `formatter` — format per-row values (e.g. `\"380 kcal\"`)\n * - `valueKey` — for pie/radial/radar, read row value from a single field\n * - Icons are picked up automatically from `config[key].icon`.\n */\n@Component({\n selector: 'ui-chart-tooltip',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, NgComponentOutlet],\n host: {\n class: 'pointer-events-none absolute inset-0 z-10',\n '[attr.aria-hidden]': '!visible()',\n },\n template: `\n @if (payload(); as p) {\n <div\n role=\"tooltip\"\n class=\"pointer-events-none absolute grid min-w-32 max-w-72 -translate-x-1/2 -translate-y-full gap-1.5 rounded-lg border border-border/60 bg-background px-3 py-1.5 text-xs shadow-md\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\">\n @if (customTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: p }\" />\n } @else {\n @if (!hideLabel() && headerText(p); as header) {\n <div class=\"font-medium\">{{ header }}</div>\n }\n <ul class=\"grid gap-1.5\">\n @for (row of p.rows; track row.seriesKey) {\n <li class=\"flex w-full flex-wrap items-stretch gap-2\">\n <span class=\"flex flex-1 items-center gap-1.5\">\n @switch (indicator()) {\n @case ('dot') {\n <span\n class=\"h-2.5 w-2.5 shrink-0 rounded-sm\"\n [style.background]=\"row.color\"\n [style.borderColor]=\"row.color\"></span>\n }\n @case ('line') {\n <span class=\"h-full min-h-4 w-1 shrink-0 rounded-sm\" [style.background]=\"row.color\"></span>\n }\n @case ('dashed') {\n <span\n class=\"h-0 w-3 shrink-0 self-center border-t-2 border-dashed\"\n [style.borderColor]=\"row.color\"></span>\n }\n }\n @if (row.icon; as icon) {\n <span class=\"mr-1 inline-flex items-center text-muted-foreground\">\n <ng-container *ngComponentOutlet=\"icon\" />\n </span>\n }\n <span class=\"text-muted-foreground\">{{ row.label }}</span>\n </span>\n <span class=\"font-mono font-medium tabular-nums text-foreground\">\n {{ formatRow(row, p) }}\n </span>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Live region — announces category changes to AT. -->\n <div class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n @if (payload(); as p) {\n {{ p.category }}\n }\n </div>\n `,\n})\nexport class ChartTooltip {\n private readonly root = inject(ChartContext);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Data key on each datum whose value is the category label (x-axis). */\n readonly xKey = input<string | null>(null);\n /** Data source (optional — if omitted tooltip reads from chart data via activePoint.datumIndex). */\n readonly data = input<readonly ChartDatum[] | null>(null);\n /**\n * Optional key for per-datum value lookup (pie / radial / radar datasets\n * store values on a single field like `visitors` instead of one field per\n * series). When set and `activePoint.seriesKey` is active, the tooltip row\n * reads `datum[valueKey]` for its value.\n */\n readonly valueKey = input<string | null>(null);\n\n /** Indicator variant next to each row. Default `'dot'`. */\n readonly indicator = input<ChartTooltipIndicator>('dot');\n /** Hide the header label entirely. */\n readonly hideLabel = input<boolean>(false);\n /** Override the header label with a fixed string. Takes precedence over `labelKey`. */\n readonly label = input<string | null>(null);\n /**\n * Resolve the header label from `config[labelKey].label`. Useful when the\n * header should come from a config entry rather than the datum itself\n * (shadcn's \"Custom label\" variant).\n */\n readonly labelKey = input<string | null>(null);\n /** Transform the final header string (e.g. ISO date → long date). */\n readonly labelFormatter = input<ChartTooltipLabelFormatter | null>(null);\n /** Format each row's value (return string — HTML is not interpreted). */\n readonly formatter = input<ChartTooltipValueFormatter | null>(null);\n\n readonly customTpl = contentChild(TemplateRef<{ $implicit: ChartTooltipPayload }>);\n\n protected readonly visible = computed(() => this.root.activePoint() !== null);\n\n protected readonly payload = computed<ChartTooltipPayload | null>(() => {\n const active = this.root.activePoint();\n const rows = this.data();\n if (!active || !rows) return null;\n const dataIndex = active.datumIndex != null && active.datumIndex < rows.length ? active.datumIndex : active.index;\n if (dataIndex < 0 || dataIndex >= rows.length) return null;\n const cfg = this.root.config();\n const visibleKeys = this.root.visibleSeriesKeys();\n const datum = rows[dataIndex];\n const xKey = this.xKey();\n const category = xKey && xKey in datum ? String(datum[xKey]) : String(active.index);\n\n // When the active point targets a single series (pie/radial/radar hover),\n // collapse the tooltip to just that row.\n const activeSeriesKey = active.seriesKey && visibleKeys.includes(active.seriesKey) ? active.seriesKey : null;\n const keys = activeSeriesKey ? [activeSeriesKey] : visibleKeys;\n const valueKey = this.valueKey();\n\n const tooltipRows: ChartTooltipRow[] = keys.map((k) => {\n // For single-slice hover on pie/radial/radar the value lives on a\n // shared `valueKey` field, not on a per-series column.\n const rawValue = valueKey != null && activeSeriesKey === k ? datum[valueKey] : datum[k];\n return {\n seriesKey: k,\n label: cfg[k]?.label ?? k,\n value: rawValue,\n color: seriesColorVar(k),\n icon: cfg[k]?.icon,\n };\n });\n return { category, datum, rows: tooltipRows };\n });\n\n /** Resolve the header string honoring `label`, `labelKey`, then `labelFormatter`. */\n protected headerText(p: ChartTooltipPayload): string | null {\n if (this.hideLabel()) return null;\n const override = this.label();\n const labelKey = this.labelKey();\n const cfg = this.root.config();\n const fromKey = labelKey ? (cfg[labelKey]?.label ?? labelKey) : null;\n const raw = override ?? fromKey ?? p.category;\n const fmt = this.labelFormatter();\n return fmt ? fmt(raw, p) : raw;\n }\n\n /** Apply per-row value formatter (or stringify). */\n protected formatRow(row: ChartTooltipRow, p: ChartTooltipPayload): string {\n const fmt = this.formatter();\n if (fmt) return fmt(row.value, row, p);\n return row.value == null ? '' : String(row.value);\n }\n\n protected readonly position = computed(() => {\n const active = this.root.activePoint();\n if (!active || active.clientX == null || active.clientY == null) {\n return { x: 0, y: 0 };\n }\n // Map client coords → offset within the chart container (the element\n // marked with `data-chart`, which is our positioning ancestor).\n const rect = containerRect(this.host.nativeElement);\n if (!rect) return { x: 0, y: 0 };\n\n const tooltip = this.host.nativeElement.querySelector('[role=\"tooltip\"]') as HTMLElement | null;\n const tooltipWidth = tooltip?.offsetWidth ?? 128;\n const tooltipHeight = tooltip?.offsetHeight ?? 0;\n const padding = 8;\n\n const minX = padding + tooltipWidth / 2;\n const maxX = Math.max(minX, rect.width - padding - tooltipWidth / 2);\n const x = Math.min(maxX, Math.max(minX, active.clientX - rect.left));\n\n // Y is the tooltip's bottom edge because the card is translated upward.\n const minY = padding + tooltipHeight;\n const y = Math.max(minY, active.clientY - rect.top - padding);\n\n return { x, y };\n });\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { ChartContext } from '../core/chart-context';\nimport { seriesColorVar } from '../core/chart-config';\n\n/**\n * Legend — renders a list of series swatches. Clicking an item toggles\n * visibility via `ChartContext.toggleSeries`.\n *\n * Place as a child of `<ui-chart-container>`:\n * ```html\n * <ui-chart-container [config]=\"cfg\">\n * <ui-bar-chart ... />\n * <ui-chart-legend />\n * </ui-chart-container>\n * ```\n */\n@Component({\n selector: 'ui-chart-legend',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block pt-3' },\n template: `\n <ul class=\"flex flex-wrap items-center justify-center gap-3 text-xs\" aria-label=\"Toggle chart series visibility\">\n @for (item of items(); track item.seriesKey) {\n <li>\n <button\n type=\"button\"\n class=\"inline-flex min-h-11 items-center gap-2 rounded-md px-2.5 py-1.5 outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n [class.opacity-50]=\"item.hidden\"\n [attr.aria-pressed]=\"!item.hidden\"\n [attr.aria-label]=\"(item.hidden ? 'Show ' : 'Hide ') + item.label\"\n (click)=\"toggle(item.seriesKey)\">\n <span class=\"inline-block h-2.5 w-2.5 rounded-sm\" [style.background]=\"item.color\"></span>\n <span class=\"text-muted-foreground\">{{ item.label }}</span>\n </button>\n </li>\n }\n </ul>\n `,\n})\nexport class ChartLegend {\n private readonly root = inject(ChartContext);\n\n protected readonly items = computed(() => {\n const cfg = this.root.config();\n const hidden = this.root.hiddenSeries();\n return this.root.seriesKeys().map((key) => ({\n seriesKey: key,\n label: cfg[key]?.label ?? key,\n color: seriesColorVar(key),\n hidden: hidden.has(key),\n }));\n });\n\n protected toggle(key: string): void {\n this.root.toggleSeries(key);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { CategoricalViewportContext } from '../core/categorical-viewport-context';\nimport { ScatterViewportContext } from '../core/scatter-viewport-context';\n\nfunction formatNumber(value: number): string {\n return Math.abs(value) >= 10 ? value.toFixed(0) : value.toFixed(1);\n}\n\n@Component({\n selector: 'ui-chart-zoom-controls',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'mt-3 flex flex-wrap items-center justify-between gap-3 text-xs text-muted-foreground' },\n template: `\n <p>{{ hint() }}</p>\n\n @if (status(); as currentStatus) {\n <div class=\"flex flex-wrap items-center gap-2\">\n <span class=\"rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n {{ currentStatus }}\n </span>\n <button\n type=\"button\"\n class=\"inline-flex min-h-11 items-center rounded-md border border-border bg-background px-3 text-foreground transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n (click)=\"resetZoom()\">\n Reset zoom\n </button>\n </div>\n }\n `,\n})\nexport class ChartZoomControls {\n private readonly categorical = inject(CategoricalViewportContext, { optional: true });\n private readonly scatter = inject(ScatterViewportContext, { optional: true });\n\n protected readonly status = computed(() => {\n if (this.categorical?.hasZoom()) {\n const range = this.categorical.zoomRange();\n const count = this.categorical.dataCount();\n if (!range) {\n return null;\n }\n return `Showing ${range.startIndex + 1}-${range.endIndex + 1} of ${count}`;\n }\n\n if (this.scatter?.hasZoom()) {\n const xDomain = this.scatter.zoomXDomain() ?? this.scatter.fullXDomain();\n const yDomain = this.scatter.zoomYDomain() ?? this.scatter.fullYDomain();\n if (!xDomain || !yDomain) {\n return null;\n }\n return `X ${formatNumber(xDomain[0])}-${formatNumber(xDomain[1])} · Y ${formatNumber(yDomain[0])}-${formatNumber(yDomain[1])}`;\n }\n\n return null;\n });\n\n protected readonly hint = computed(() => {\n if (this.scatter) {\n return 'Drag to brush a region. Use the wheel to zoom and one-finger touch drag to pan while zoomed.';\n }\n return 'Drag to select a category range. Use the wheel to zoom and one-finger touch drag to pan while zoomed.';\n });\n\n protected resetZoom(): void {\n this.categorical?.resetZoom();\n this.scatter?.resetZoom();\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ui-pie-center',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex max-w-[10rem] flex-col items-center justify-center text-center',\n },\n template: `<ng-content />`,\n})\nexport class PieCenter {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ui-radial-center',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex max-w-[10rem] flex-col items-center justify-center text-center',\n },\n template: `<ng-content />`,\n})\nexport class RadialCenter {}\n","import { scaleBand, scaleLinear } from 'd3-scale';\nimport { max as d3max, min as d3min } from 'd3-array';\nimport { stack as d3stack, type Series, type SeriesPoint } from 'd3-shape';\nimport type { ChartDatum, ChartOrientation } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\n/** Bar-chart layout variant. */\nexport type BarVariant = 'grouped' | 'stacked';\n\n/** A single bar rectangle ready to render. */\nexport interface BarRect {\n readonly key: string; // unique per cell for @for tracking\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly color: string;\n readonly active: boolean;\n}\n\n/** Inputs required to compute bar-chart geometry. */\nexport interface BarLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly seriesKeys: readonly string[];\n readonly variant: BarVariant;\n readonly orientation: ChartOrientation;\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly bandPadding: number;\n readonly groupPadding: number;\n readonly colorKey?: string;\n readonly activeKey?: string;\n readonly activeValue?: string | number;\n}\n\n/** Computed layout: bars + scales. */\nexport interface BarLayoutResult {\n readonly bars: readonly BarRect[];\n readonly categoryScale: ReturnType<typeof scaleBand<string>>;\n readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;\n readonly categories: readonly string[];\n}\n\n/** Read a numeric value from a datum, tolerating strings. */\nfunction readNumber(datum: ChartDatum, key: string): number {\n const raw = datum[key];\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === 'string') {\n const n = Number(raw);\n return Number.isFinite(n) ? n : 0;\n }\n return 0;\n}\n\nfunction resolveBarColor(datum: ChartDatum, seriesKey: string, colorKey?: string): string {\n if (!colorKey) {\n return seriesColorVar(seriesKey);\n }\n\n const raw = datum[colorKey];\n if (typeof raw !== 'string' || raw.length === 0) {\n return seriesColorVar(seriesKey);\n }\n\n if (\n raw.startsWith('var(') ||\n raw.startsWith('#') ||\n raw.startsWith('rgb') ||\n raw.startsWith('hsl') ||\n raw.includes('(')\n ) {\n return raw;\n }\n\n return seriesColorVar(raw);\n}\n\nfunction isActiveBar(datum: ChartDatum, activeKey?: string, activeValue?: string | number): boolean {\n if (!activeKey || activeValue === undefined) {\n return false;\n }\n\n const value = datum[activeKey];\n if (typeof value === 'number' && typeof activeValue === 'number') {\n return value === activeValue;\n }\n\n return String(value ?? '') === String(activeValue);\n}\n\n/** Build all bar rectangles for the given config. */\nexport function computeBarLayout(input: BarLayoutInput): BarLayoutResult {\n const {\n data,\n xKey,\n seriesKeys,\n variant,\n orientation,\n innerWidth,\n innerHeight,\n bandPadding,\n groupPadding,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const categories = data.map((d) => String(d[xKey] ?? ''));\n const isVertical = orientation === 'vertical';\n\n const categoryScale = scaleBand<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(bandPadding);\n\n const valueScale = scaleLinear<number, number>();\n\n if (variant === 'stacked' && seriesKeys.length > 0) {\n return stackedLayout({\n data,\n xKey,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n categories,\n colorKey,\n activeKey,\n activeValue,\n });\n }\n\n return groupedLayout({\n data,\n xKey,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n groupPadding,\n categories,\n colorKey,\n activeKey,\n activeValue,\n });\n}\n\n// ---------- Grouped ----------\n\ninterface GroupedInput {\n data: readonly ChartDatum[];\n xKey: string;\n seriesKeys: readonly string[];\n orientation: ChartOrientation;\n innerWidth: number;\n innerHeight: number;\n categoryScale: ReturnType<typeof scaleBand<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n groupPadding: number;\n categories: readonly string[];\n colorKey?: string;\n activeKey?: string;\n activeValue?: string | number;\n}\n\nfunction groupedLayout(input: GroupedInput): BarLayoutResult {\n const {\n data,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n groupPadding,\n categories,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const isVertical = orientation === 'vertical';\n const minValue = d3min(data, (d) => d3min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n const maxValue = d3max(data, (d) => d3max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n const domainMin = Math.min(0, minValue);\n const domainMax = Math.max(0, maxValue, domainMin === 0 ? 1 : 0);\n\n valueScale\n .domain([domainMin, domainMax])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n const baseline = valueScale(0);\n\n const subScale = scaleBand<string>()\n .domain(seriesKeys as string[])\n .range([0, categoryScale.bandwidth()])\n .padding(groupPadding);\n\n const bars: BarRect[] = [];\n data.forEach((datum, datumIndex) => {\n const category = categories[datumIndex];\n const bandStart = categoryScale(category) ?? 0;\n seriesKeys.forEach((seriesKey) => {\n const value = readNumber(datum, seriesKey);\n const sub = subScale(seriesKey) ?? 0;\n const scaledValue = valueScale(value);\n const color = resolveBarColor(datum, seriesKey, colorKey);\n const active = isActiveBar(datum, activeKey, activeValue);\n\n const rect: BarRect = isVertical\n ? {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: bandStart + sub,\n y: Math.min(scaledValue, baseline),\n width: subScale.bandwidth(),\n height: Math.abs(baseline - scaledValue),\n color,\n active,\n }\n : {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: Math.min(scaledValue, baseline),\n y: bandStart + sub,\n width: Math.abs(baseline - scaledValue),\n height: subScale.bandwidth(),\n color,\n active,\n };\n bars.push(rect);\n });\n });\n\n return { bars, categoryScale, valueScale, categories };\n}\n\n// ---------- Stacked ----------\n\ninterface StackedInput {\n data: readonly ChartDatum[];\n xKey: string;\n seriesKeys: readonly string[];\n orientation: ChartOrientation;\n innerWidth: number;\n innerHeight: number;\n categoryScale: ReturnType<typeof scaleBand<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n categories: readonly string[];\n colorKey?: string;\n activeKey?: string;\n activeValue?: string | number;\n}\n\nfunction stackedLayout(input: StackedInput): BarLayoutResult {\n const {\n data,\n seriesKeys,\n orientation,\n innerWidth,\n innerHeight,\n categoryScale,\n valueScale,\n categories,\n colorKey,\n activeKey,\n activeValue,\n } = input;\n\n const isVertical = orientation === 'vertical';\n const normalized = data.map((d) => {\n const out: Record<string, number> = {};\n for (const k of seriesKeys) {\n out[k] = readNumber(d, k);\n }\n return out;\n });\n\n const series: Series<Record<string, number>, string>[] = d3stack<Record<string, number>, string>().keys(\n seriesKeys as string[],\n )(normalized);\n\n const maxTotal = d3max(series[series.length - 1] ?? [], (p) => p[1]) ?? 0;\n valueScale\n .domain([0, maxTotal === 0 ? 1 : maxTotal])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n const bars: BarRect[] = [];\n series.forEach((layer) => {\n const seriesKey = layer.key;\n layer.forEach((point: SeriesPoint<Record<string, number>>, datumIndex: number) => {\n const [lower, upper] = point;\n const value = upper - lower;\n const category = categories[datumIndex];\n const bandStart = categoryScale(category) ?? 0;\n const color = resolveBarColor(data[datumIndex], seriesKey, colorKey);\n const active = isActiveBar(data[datumIndex], activeKey, activeValue);\n\n const rect: BarRect = isVertical\n ? {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: bandStart,\n y: valueScale(upper),\n width: categoryScale.bandwidth(),\n height: valueScale(lower) - valueScale(upper),\n color,\n active,\n }\n : {\n key: `${datumIndex}-${seriesKey}`,\n seriesKey,\n datumIndex,\n category,\n value,\n x: valueScale(lower),\n y: bandStart,\n width: valueScale(upper) - valueScale(lower),\n height: categoryScale.bandwidth(),\n color,\n active,\n };\n bars.push(rect);\n });\n });\n\n return { bars, categoryScale, valueScale, categories };\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { computeBarLayout, type BarRect, type BarVariant } from './bar-layout';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\nconst defaultBarValueFormatter = (value: number): string => `${value}`;\n\n/** Event emitted when a user clicks a bar. */\nexport interface BarClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Bar chart — composable within `<ui-chart-container>`.\n *\n * Layout variants (via inputs):\n * - `orientation`: `'vertical'` (default) or `'horizontal'`\n * - `variant`: `'grouped'` (default) or `'stacked'`\n */\n@Component({\n selector: 'ui-bar-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"chart-bar cursor-pointer outline-none transition-opacity hover:opacity-80\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [attr.rx]=\"cornerRadius()\"\n [attr.ry]=\"cornerRadius()\"\n [attr.fill]=\"bar.color\"\n [attr.opacity]=\"barOpacity(bar)\"\n [attr.stroke]=\"bar.active ? 'hsl(var(--foreground))' : null\"\n [attr.stroke-width]=\"bar.active ? 1.5 : null\"\n [attr.aria-label]=\"barAriaLabel(bar)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, bar)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(bar)\"\n (keydown.enter)=\"emitClick(bar)\"\n (keydown.space)=\"emitClick(bar); $event.preventDefault()\" />\n @if (showValueLabels() && bar.height > 0 && bar.width > 0) {\n <svg:text\n class=\"chart-bar-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"barLabelX(bar)\"\n [attr.y]=\"barLabelY(bar)\"\n [attr.text-anchor]=\"barLabelAnchor(bar)\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(bar) }}\n </svg:text>\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class BarChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly variant = input<BarVariant>('grouped');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly bandPadding = input<number>(0.2);\n readonly groupPadding = input<number>(0.05);\n readonly cornerRadius = input<number>(4);\n readonly colorKey = input<string | undefined>(undefined);\n readonly activeKey = input<string | undefined>(undefined);\n readonly activeValue = input<string | number | undefined>(undefined);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<(value: number) => string>(defaultBarValueFormatter);\n\n readonly barClick = output<BarClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeBarLayout({\n data: this.data(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n variant: this.variant(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n bandPadding: this.bandPadding(),\n groupPadding: this.groupPadding(),\n colorKey: this.colorKey(),\n activeKey: this.activeKey(),\n activeValue: this.activeValue(),\n }),\n );\n\n protected readonly bars = computed<readonly BarRect[]>(() => this.layout().bars);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n const n = this.data().length;\n return `Bar chart, ${n} categories, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.cart.orientation.set(this.orientation());\n this.cart.margin.set(this.margin());\n this.cart.innerWidth.set(this.innerWidth());\n this.cart.innerHeight.set(this.innerHeight());\n this.cart.categoryScale.set(layout.categoryScale);\n this.cart.valueScale.set(layout.valueScale);\n this.cart.categories.set(layout.categories);\n });\n }\n\n protected emitClick(bar: BarRect): void {\n this.barClick.emit({\n seriesKey: bar.seriesKey,\n datumIndex: bar.datumIndex,\n category: bar.category,\n value: bar.value,\n datum: this.data()[bar.datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, bar: BarRect): void {\n const center = elementClientCenter(event.currentTarget);\n this.root.activePoint.set({\n index: bar.datumIndex,\n seriesKey: bar.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected barOpacity(bar: BarRect): number {\n return this.activeKey() && this.activeValue() !== undefined ? (bar.active ? 1 : 0.42) : 1;\n }\n\n protected formatValueLabel(bar: BarRect): string {\n return this.valueLabelFormat()(bar.value);\n }\n\n protected barLabelX(bar: BarRect): number {\n if (this.orientation() === 'vertical') {\n return bar.x + bar.width / 2;\n }\n\n return bar.value >= 0 ? bar.x + bar.width + 6 : bar.x - 6;\n }\n\n protected barLabelY(bar: BarRect): number {\n if (this.orientation() === 'vertical') {\n return bar.value >= 0 ? bar.y - 8 : bar.y + bar.height + 10;\n }\n\n return bar.y + bar.height / 2;\n }\n\n protected barLabelAnchor(bar: BarRect): 'middle' | 'start' | 'end' {\n if (this.orientation() === 'vertical') {\n return 'middle';\n }\n\n return bar.value >= 0 ? 'start' : 'end';\n }\n\n protected barAriaLabel(bar: BarRect): string {\n const label = this.root.config()[bar.seriesKey]?.label ?? bar.seriesKey;\n return `${label} in ${bar.category}: ${bar.value}`;\n }\n}\n","import { scalePoint, scaleLinear } from 'd3-scale';\nimport { max as d3max } from 'd3-array';\nimport {\n line as d3line,\n area as d3area,\n stack as d3stack,\n stackOffsetExpand,\n curveMonotoneX,\n curveLinear,\n curveStep,\n type CurveFactory,\n} from 'd3-shape';\nimport type { ChartDatum, ChartOrientation } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\n/** Curve type shared by line & area charts. */\nexport type LineCurve = 'linear' | 'monotone' | 'step';\n\nfunction curveFor(curve: LineCurve): CurveFactory {\n switch (curve) {\n case 'monotone':\n return curveMonotoneX;\n case 'step':\n return curveStep;\n case 'linear':\n default:\n return curveLinear;\n }\n}\n\n/** A single series ready to render as either a line or an area. */\nexport interface LineSeriesPath {\n readonly seriesKey: string;\n readonly color: string;\n readonly linePath: string;\n /** Optional area path — only populated when `computeAreaLayout` is used. */\n readonly areaPath?: string;\n /** Raw points for dots / active markers. */\n readonly points: readonly LinePoint[];\n}\n\n/** One resolved (x, y) point for a series. */\nexport interface LinePoint {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface CartesianBase {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly seriesKeys: readonly string[];\n readonly orientation: ChartOrientation;\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly curve: LineCurve;\n}\n\nexport interface LineLayoutResult {\n readonly series: readonly LineSeriesPath[];\n readonly points: readonly LinePoint[];\n readonly categoryScale: ReturnType<typeof scalePoint<string>>;\n readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;\n readonly categories: readonly string[];\n}\n\nexport interface AreaLayoutResult extends LineLayoutResult {\n readonly stacked: boolean;\n}\n\nfunction readNumber(datum: ChartDatum, key: string): number {\n const raw = datum[key];\n if (typeof raw === 'number' && Number.isFinite(raw)) return raw;\n if (typeof raw === 'string') {\n const n = Number(raw);\n return Number.isFinite(n) ? n : 0;\n }\n return 0;\n}\n\n/** Build category + value scales for point-based charts (line / area). */\nexport function buildCartesianScales(input: CartesianBase): {\n categories: readonly string[];\n categoryScale: ReturnType<typeof scalePoint<string>>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n} {\n const { data, xKey, seriesKeys, orientation, innerWidth, innerHeight } = input;\n const isVertical = orientation === 'vertical';\n const categories = data.map((d) => String(d[xKey] ?? ''));\n\n const categoryScale = scalePoint<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(0.5);\n\n const maxValue = d3max(data, (d) => d3max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;\n\n const valueScale = scaleLinear<number, number>()\n .domain([0, maxValue === 0 ? 1 : maxValue])\n .nice()\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n return { categories, categoryScale, valueScale };\n}\n\n/** Compute line-chart geometry. */\nexport function computeLineLayout(input: CartesianBase): LineLayoutResult {\n const { data, seriesKeys, orientation, curve } = input;\n const { categories, categoryScale, valueScale } = buildCartesianScales(input);\n const isVertical = orientation === 'vertical';\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = [];\n\n for (const seriesKey of seriesKeys) {\n const points: LinePoint[] = data.map((d, datumIndex) => {\n const value = readNumber(d, seriesKey);\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const v = valueScale(value);\n return {\n seriesKey,\n datumIndex,\n category,\n value,\n x: isVertical ? c : v,\n y: isVertical ? v : c,\n };\n });\n allPoints.push(...points);\n\n const generator = d3line<LinePoint>()\n .x((p) => p.x)\n .y((p) => p.y)\n .curve(curveFor(curve));\n\n series.push({\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: generator(points) ?? '',\n points,\n });\n }\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n };\n}\n\nexport interface AreaLayoutInput extends CartesianBase {\n readonly stacked: boolean;\n readonly expanded?: boolean;\n}\n\n/** Compute area-chart geometry (single or stacked). */\nexport function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult {\n if (input.stacked && input.seriesKeys.length > 0) {\n return computeStackedArea(input);\n }\n return computeSingleArea(input);\n}\n\nfunction computeSingleArea(input: AreaLayoutInput): AreaLayoutResult {\n const { data, seriesKeys, orientation, curve } = input;\n const { categories, categoryScale, valueScale } = buildCartesianScales(input);\n const isVertical = orientation === 'vertical';\n const baseline = isVertical ? valueScale(0) : valueScale(0);\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = [];\n\n for (const seriesKey of seriesKeys) {\n const points: LinePoint[] = data.map((d, datumIndex) => {\n const value = readNumber(d, seriesKey);\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const v = valueScale(value);\n return {\n seriesKey,\n datumIndex,\n category,\n value,\n x: isVertical ? c : v,\n y: isVertical ? v : c,\n };\n });\n allPoints.push(...points);\n\n const lineGen = d3line<LinePoint>()\n .x((p) => p.x)\n .y((p) => p.y)\n .curve(curveFor(curve));\n\n const areaGen = isVertical\n ? d3area<LinePoint>()\n .x((p) => p.x)\n .y0(baseline)\n .y1((p) => p.y)\n .curve(curveFor(curve))\n : d3area<LinePoint>()\n .y((p) => p.y)\n .x0(baseline)\n .x1((p) => p.x)\n .curve(curveFor(curve));\n\n series.push({\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: lineGen(points) ?? '',\n areaPath: areaGen(points) ?? '',\n points,\n });\n }\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n stacked: false,\n };\n}\n\nfunction computeStackedArea(input: AreaLayoutInput): AreaLayoutResult {\n const { data, seriesKeys, orientation, innerWidth, innerHeight, xKey, curve, expanded } = input;\n const isVertical = orientation === 'vertical';\n const categories = data.map((d) => String(d[xKey] ?? ''));\n\n const categoryScale = scalePoint<string>()\n .domain(categories)\n .range(isVertical ? [0, innerWidth] : [0, innerHeight])\n .padding(0.5);\n\n const normalized = data.map((d) => {\n const out: Record<string, number> = {};\n for (const k of seriesKeys) out[k] = readNumber(d, k);\n return out;\n });\n\n const stackGenerator = d3stack<Record<string, number>, string>().keys(seriesKeys as string[]);\n if (expanded) {\n stackGenerator.offset(stackOffsetExpand);\n }\n const stackSeries = stackGenerator(normalized);\n\n const maxTotal = expanded ? 1 : (d3max(stackSeries[stackSeries.length - 1] ?? [], (p) => p[1]) ?? 0);\n const valueScale = scaleLinear<number, number>()\n .domain([0, maxTotal === 0 ? 1 : maxTotal])\n .range(isVertical ? [innerHeight, 0] : [0, innerWidth]);\n\n if (!expanded) {\n valueScale.nice();\n }\n\n const allPoints: LinePoint[] = [];\n const series: LineSeriesPath[] = stackSeries.map((layer) => {\n const seriesKey = layer.key;\n const points: LinePoint[] = layer.map((p, datumIndex) => {\n const category = categories[datumIndex];\n const c = categoryScale(category) ?? 0;\n const upper = valueScale(p[1]);\n return {\n seriesKey,\n datumIndex,\n category,\n value: p[1] - p[0],\n x: isVertical ? c : upper,\n y: isVertical ? upper : c,\n };\n });\n allPoints.push(...points);\n\n const lineGen = d3line<[number, number, number]>()\n .x(([x]) => x)\n .y(([, y]) => y)\n .curve(curveFor(curve));\n\n const areaGen = isVertical\n ? d3area<[number, number, number]>()\n .x(([x]) => x)\n .y0(([, , y0]) => y0)\n .y1(([, y1]) => y1)\n .curve(curveFor(curve))\n : d3area<[number, number, number]>()\n .y(([x]) => x)\n .x0(([, , x0]) => x0)\n .x1(([, x1]) => x1)\n .curve(curveFor(curve));\n\n const tuples: [number, number, number][] = layer.map((p, i) => {\n const c = categoryScale(categories[i]) ?? 0;\n return [c, valueScale(p[1]), valueScale(p[0])];\n });\n\n return {\n seriesKey,\n color: seriesColorVar(seriesKey),\n linePath: lineGen(tuples) ?? '',\n areaPath: areaGen(tuples) ?? '',\n points,\n };\n });\n\n return {\n series,\n points: allPoints,\n categoryScale,\n valueScale,\n categories,\n stacked: true,\n };\n}\n","import { scaleLinear, scaleBand } from 'd3-scale';\nimport type { ScalePoint } from 'd3-scale';\nimport { CartesianContext } from '../../core/cartesian-context';\n\n/**\n * Publish a `scalePoint` from line/area layouts to the `CartesianContext`,\n * which expects a `scaleBand`. We adapt by building a band with zero padding\n * centered on the same positions, so axis ticks render at the correct\n * offsets.\n *\n * This keeps axes/grid primitives agnostic to whether the underlying chart\n * uses `scaleBand` (bar) or `scalePoint` (line/area).\n */\nexport function pointToBandAdapter(\n pointScale: ScalePoint<string>,\n range: [number, number],\n): ReturnType<typeof scaleBand<string>> {\n return scaleBand<string>().domain(pointScale.domain()).range(range).padding(0);\n}\n\n/** Recreate a linear scale with the same domain/range (handy for effects). */\nexport function cloneLinear(\n scale: ReturnType<typeof scaleLinear<number, number>>,\n): ReturnType<typeof scaleLinear<number, number>> {\n return scaleLinear<number, number>().domain(scale.domain()).range(scale.range());\n}\n\nexport function provideCartesianFromLineLayout(\n ctx: CartesianContext,\n layout: {\n categoryScale: ScalePoint<string>;\n valueScale: ReturnType<typeof scaleLinear<number, number>>;\n categories: readonly string[];\n },\n orientation: 'vertical' | 'horizontal',\n innerWidth: number,\n innerHeight: number,\n): void {\n const range: [number, number] = orientation === 'vertical' ? [0, innerWidth] : [0, innerHeight];\n ctx.orientation.set(orientation);\n ctx.innerWidth.set(innerWidth);\n ctx.innerHeight.set(innerHeight);\n ctx.categoryScale.set(pointToBandAdapter(layout.categoryScale, range));\n ctx.valueScale.set(cloneLinear(layout.valueScale));\n ctx.categories.set(layout.categories);\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { CategoricalViewportContext } from '../../core/categorical-viewport-context';\nimport { computeLineLayout, type LineCurve, type LinePoint, type LineSeriesPath } from './line-layout';\nimport { provideCartesianFromLineLayout } from './cartesian-adapter';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\nimport { sliceByIndexRange } from '../../core/viewport';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\nconst defaultLineValueFormatter = (value: number): string => `${value}`;\n\n/** Emitted when a data point is activated (click or keyboard). */\nexport interface LinePointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-line-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext, CategoricalViewportContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-lines\">\n @for (s of series(); track s.seriesKey) {\n <svg:path\n class=\"chart-line\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-width]=\"strokeWidth()\"\n [attr.d]=\"s.linePath\" />\n @if (showDots()) {\n @for (p of s.points; track p.datumIndex) {\n <svg:circle\n class=\"chart-dot cursor-pointer outline-none\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"dotFill(p, s.color)\"\n [attr.stroke]=\"dotStrokeColor()\"\n [attr.stroke-width]=\"dotStrokeWidth() || null\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, p)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n @if (showValueLabels()) {\n <svg:text\n class=\"chart-line-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"labelX(p)\"\n [attr.y]=\"labelY(p)\"\n [attr.text-anchor]=\"labelAnchor()\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(p) }}\n </svg:text>\n }\n }\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class LineChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly curve = input<LineCurve>('monotone');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly strokeWidth = input<number>(2);\n readonly showDots = input<boolean>(true);\n readonly dotRadius = input<number>(3);\n readonly dotColorKey = input<string | undefined>(undefined);\n readonly dotStrokeColor = input<string | undefined>(undefined);\n readonly dotStrokeWidth = input<number>(0);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<(value: number) => string>(defaultLineValueFormatter);\n\n readonly pointClick = output<LinePointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly visibleStartIndex = computed(() => this.viewport.zoomRange()?.startIndex ?? 0);\n protected readonly visibleData = computed(() => sliceByIndexRange(this.data(), this.viewport.zoomRange()));\n\n protected readonly layout = computed(() =>\n computeLineLayout({\n data: this.visibleData(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n curve: this.curve(),\n }),\n );\n\n protected readonly series = computed<readonly LineSeriesPath[]>(() => this.layout().series);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Line chart, ${this.visibleData().length} points, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.viewport.dataCount.set(this.data().length);\n provideCartesianFromLineLayout(this.cart, layout, this.orientation(), this.innerWidth(), this.innerHeight());\n this.cart.margin.set(this.margin());\n });\n }\n\n protected emitClick(p: LinePoint): void {\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex,\n category: p.category,\n value: p.value,\n datum: this.data()[datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, p: LinePoint): void {\n const center = elementClientCenter(event.currentTarget);\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.root.activePoint.set({\n index: p.datumIndex,\n datumIndex,\n seriesKey: p.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected dotFill(point: LinePoint, fallbackColor: string): string {\n const colorKey = this.dotColorKey();\n if (!colorKey) {\n return fallbackColor;\n }\n\n const datum = this.visibleData()[point.datumIndex];\n const raw = datum?.[colorKey];\n if (typeof raw !== 'string' || raw.length === 0) {\n return fallbackColor;\n }\n\n if (\n raw.startsWith('var(') ||\n raw.startsWith('#') ||\n raw.startsWith('rgb') ||\n raw.startsWith('hsl') ||\n raw.includes('(')\n ) {\n return raw;\n }\n\n return `var(--color-${raw.replace(/[^a-zA-Z0-9_-]/g, '_')})`;\n }\n\n protected formatValueLabel(point: LinePoint): string {\n return this.valueLabelFormat()(point.value);\n }\n\n protected labelX(point: LinePoint): number {\n return this.orientation() === 'vertical' ? point.x : point.x + this.dotRadius() + 6;\n }\n\n protected labelY(point: LinePoint): number {\n return this.orientation() === 'vertical' ? point.y - this.dotRadius() - 8 : point.y;\n }\n\n protected labelAnchor(): 'middle' | 'start' {\n return this.orientation() === 'vertical' ? 'middle' : 'start';\n }\n\n protected pointAriaLabel(p: LinePoint): string {\n const label = this.root.config()[p.seriesKey]?.label ?? p.seriesKey;\n return `${label} at ${p.category}: ${p.value}`;\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport {\n CartesianContext,\n type ChartDatum,\n type ChartMargin,\n type ChartOrientation,\n} from '../../core/cartesian-context';\nimport { CategoricalViewportContext } from '../../core/categorical-viewport-context';\nimport { computeAreaLayout, type LineCurve, type LinePoint, type LineSeriesPath } from '../line/line-layout';\nimport { provideCartesianFromLineLayout } from '../line/cartesian-adapter';\nimport { ChartPointerTracker } from '../../primitives/chart-pointer-tracker';\nimport { elementClientCenter } from '../../core/pointer-util';\nimport { sliceByIndexRange } from '../../core/viewport';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\n\nexport interface AreaPointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly category: string;\n readonly value: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Area chart — composable within `<ui-chart-container>`.\n *\n * - `stacked=true` stacks series along the value axis.\n * - `gradient=true` fills each area with a vertical linear-gradient from\n * the series color (top) to transparent (bottom). The gradient is\n * emitted as `<defs><linearGradient>` per series, unique per chart id.\n */\n@Component({\n selector: 'ui-area-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [CartesianContext, CategoricalViewportContext],\n imports: [ChartPointerTracker],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n uiChartPointerTracker\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n @if (gradient()) {\n <svg:defs>\n @for (s of series(); track s.seriesKey) {\n <svg:linearGradient [attr.id]=\"gradientId(s.seriesKey)\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"s.color\" stop-opacity=\"0.4\" />\n <svg:stop offset=\"100%\" [attr.stop-color]=\"s.color\" stop-opacity=\"0\" />\n </svg:linearGradient>\n }\n </svg:defs>\n }\n <svg:g [attr.transform]=\"innerTransform()\">\n <ng-content select=\"svg\\\\:g[ui-chart-grid]\" />\n <svg:g class=\"chart-areas\">\n @for (s of series(); track s.seriesKey) {\n <svg:path\n class=\"chart-area\"\n [attr.d]=\"s.areaPath\"\n [attr.fill]=\"areaFill(s.seriesKey, s.color)\"\n stroke=\"none\" />\n <svg:path\n class=\"chart-area-stroke\"\n [attr.d]=\"s.linePath\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-width]=\"strokeWidth()\"\n fill=\"none\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n @if (showDots()) {\n @for (p of s.points; track p.datumIndex) {\n <svg:circle\n class=\"chart-dot cursor-pointer outline-none\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"s.color\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (focus)=\"setActivePoint($event, p)\"\n (blur)=\"clearActivePoint()\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n }\n }\n }\n </svg:g>\n <ng-content select=\"svg\\\\:g[ui-chart-axis-x]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-axis-y]\" />\n <ng-content select=\"svg\\\\:g[ui-chart-crosshair]\" />\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class AreaChart {\n private readonly root = inject(ChartContext);\n private readonly cart = inject(CartesianContext);\n private readonly viewport = inject(CategoricalViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly orientation = input<ChartOrientation>('vertical');\n readonly stacked = input<boolean>(false);\n readonly expanded = input<boolean>(false);\n readonly gradient = input<boolean>(true);\n readonly curve = input<LineCurve>('monotone');\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly strokeWidth = input<number>(2);\n readonly showDots = input<boolean>(false);\n readonly dotRadius = input<number>(3);\n\n readonly pointClick = output<AreaPointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly visibleStartIndex = computed(() => this.viewport.zoomRange()?.startIndex ?? 0);\n\n protected readonly visibleData = computed(() => sliceByIndexRange(this.data(), this.viewport.zoomRange()));\n\n protected readonly layout = computed(() =>\n computeAreaLayout({\n data: this.visibleData(),\n xKey: this.xKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n orientation: this.orientation(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n curve: this.curve(),\n stacked: this.stacked(),\n expanded: this.expanded(),\n }),\n );\n\n protected readonly series = computed<readonly LineSeriesPath[]>(() => this.layout().series);\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Area chart, ${this.visibleData().length} points, ${keys.length} series: ${keys.join(', ')}.`;\n });\n\n constructor() {\n effect(() => {\n const layout = this.layout();\n this.viewport.dataCount.set(this.data().length);\n provideCartesianFromLineLayout(this.cart, layout, this.orientation(), this.innerWidth(), this.innerHeight());\n this.cart.margin.set(this.margin());\n });\n }\n\n protected gradientId(seriesKey: string): string {\n return `${this.root.id()}-grad-${seriesKey.replace(/[^a-zA-Z0-9_-]/g, '_')}`;\n }\n\n protected areaFill(seriesKey: string, color: string): string {\n return this.gradient() ? `url(#${this.gradientId(seriesKey)})` : color;\n }\n\n protected emitClick(p: LinePoint): void {\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex,\n category: p.category,\n value: p.value,\n datum: this.data()[datumIndex],\n });\n }\n\n protected setActivePoint(event: FocusEvent, p: LinePoint): void {\n const center = elementClientCenter(event.currentTarget);\n const datumIndex = this.visibleStartIndex() + p.datumIndex;\n this.root.activePoint.set({\n index: p.datumIndex,\n datumIndex,\n seriesKey: p.seriesKey,\n clientX: center?.clientX,\n clientY: center?.clientY,\n });\n }\n\n protected clearActivePoint(): void {\n this.root.activePoint.set(null);\n }\n\n protected pointAriaLabel(p: LinePoint): string {\n const label = this.root.config()[p.seriesKey]?.label ?? p.seriesKey;\n return `${label} at ${p.category}: ${p.value}`;\n }\n}\n","import { arc as d3arc, pie as d3pie, type PieArcDatum } from 'd3-shape';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport interface PieLayoutInput {\n readonly data: readonly ChartDatum[];\n /** Field on each datum whose value is the slice's numeric magnitude. */\n readonly valueKey: string;\n /** Field on each datum whose value is the slice's categorical label. */\n readonly nameKey: string;\n /**\n * Ordered series keys used to resolve color (`var(--color-<key>)`).\n * Must have the same length as `data`. If omitted, falls back to\n * `nameKey` values.\n */\n readonly seriesKeys?: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n /** Inner radius for donut-style charts (0 = full pie). */\n readonly innerRadius: number;\n /** Gap between slices, in radians. */\n readonly padAngle: number;\n /** Corner radius for slices (px). */\n readonly cornerRadius: number;\n /** Starting angle in radians (default −π/2 = 12 o'clock). */\n readonly startAngle: number;\n /** Ending angle in radians (default 3π/2). */\n readonly endAngle: number;\n readonly activeIndex?: number;\n readonly activeOffset?: number;\n}\n\nexport interface PieSliceRect {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly color: string;\n readonly arcPath: string;\n readonly centroid: readonly [number, number];\n readonly startAngle: number;\n readonly endAngle: number;\n readonly translateX: number;\n readonly translateY: number;\n}\n\nexport interface PieLayout {\n readonly slices: readonly PieSliceRect[];\n readonly centerX: number;\n readonly centerY: number;\n readonly outerRadius: number;\n}\n\nexport function computePieLayout(input: PieLayoutInput): PieLayout {\n const {\n data,\n valueKey,\n nameKey,\n seriesKeys,\n innerWidth,\n innerHeight,\n innerRadius,\n padAngle,\n cornerRadius,\n startAngle,\n endAngle,\n activeIndex,\n activeOffset = 12,\n } = input;\n\n const outerRadius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || outerRadius === 0) {\n return { slices: [], centerX, centerY, outerRadius };\n }\n\n const pieGen = d3pie<ChartDatum>()\n .value((d) => Number(d[valueKey] ?? 0))\n .sort(null)\n .padAngle(padAngle)\n .startAngle(startAngle)\n .endAngle(endAngle);\n\n const arcGen = d3arc<PieArcDatum<ChartDatum>>()\n .innerRadius(innerRadius)\n .outerRadius(outerRadius)\n .cornerRadius(cornerRadius);\n\n const arcs = pieGen(data as ChartDatum[]);\n const slices: PieSliceRect[] = arcs.map((a, i) => {\n const d = a.data;\n const key = seriesKeys?.[i] ?? String(d[nameKey] ?? i);\n const centroid = arcGen.centroid(a) as [number, number];\n const magnitude = Math.hypot(centroid[0], centroid[1]) || 1;\n const isActive = i === activeIndex;\n return {\n seriesKey: key,\n name: String(d[nameKey] ?? key),\n value: Number(d[valueKey] ?? 0),\n datumIndex: i,\n color: seriesColorVar(key),\n arcPath: arcGen(a) ?? '',\n centroid,\n startAngle: a.startAngle,\n endAngle: a.endAngle,\n translateX: isActive ? (centroid[0] / magnitude) * activeOffset : 0,\n translateY: isActive ? (centroid[1] / magnitude) * activeOffset : 0,\n };\n });\n\n return { slices, centerX, centerY, outerRadius };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computePieLayout, type PieSliceRect } from './pie-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 8, left: 8 };\n\nexport interface PieSliceClickEvent {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-pie-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @for (s of layout().slices; track s.seriesKey) {\n <svg:path\n class=\"chart-slice cursor-pointer transition-opacity hover:opacity-80\"\n [attr.d]=\"s.arcPath\"\n [attr.fill]=\"s.color\"\n [attr.transform]=\"sliceTransform(s)\"\n [attr.aria-label]=\"sliceAriaLabel(s)\"\n tabindex=\"0\"\n (click)=\"emitClick(s)\"\n (keydown.enter)=\"emitClick(s)\"\n (keydown.space)=\"emitClick(s); $event.preventDefault()\"\n (pointerenter)=\"setActive($event, s)\"\n (pointermove)=\"setActive($event, s)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, s)\"\n (blur)=\"clearActive()\" />\n }\n @if (showLabels()) {\n @for (s of layout().slices; track s.seriesKey) {\n <svg:text\n class=\"chart-slice-label fill-foreground text-[10px]\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n [attr.x]=\"s.centroid[0] + s.translateX\"\n [attr.y]=\"s.centroid[1] + s.translateY\">\n {{ s.value }}\n </svg:text>\n }\n }\n </svg:g>\n </svg:g>\n </svg:svg>\n <div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <ng-content select=\"ui-pie-center\" />\n </div>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class PieChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly valueKey = input.required<string>();\n readonly nameKey = input.required<string>();\n readonly seriesKeys = input<readonly string[] | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly innerRadius = input<number>(0);\n readonly padAngle = input<number>(0.01);\n readonly cornerRadius = input<number>(0);\n readonly startAngle = input<number>(-Math.PI / 2);\n readonly endAngle = input<number>((3 * Math.PI) / 2);\n readonly showLabels = input<boolean>(false);\n readonly activeIndex = input<number | undefined>(undefined);\n readonly activeOffset = input<number>(12);\n\n readonly sliceClick = output<PieSliceClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computePieLayout({\n data: this.data(),\n valueKey: this.valueKey(),\n nameKey: this.nameKey(),\n seriesKeys: this.seriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n innerRadius: this.innerRadius(),\n padAngle: this.padAngle(),\n cornerRadius: this.cornerRadius(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n activeIndex: this.activeIndex(),\n activeOffset: this.activeOffset(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n protected readonly ariaSummary = computed(() => `Pie chart, ${this.data().length} slices.`);\n\n protected sliceAriaLabel(s: PieSliceRect): string {\n return `${s.name}: ${s.value}`;\n }\n\n protected sliceTransform(s: PieSliceRect): string | null {\n return s.translateX || s.translateY ? `translate(${s.translateX}, ${s.translateY})` : null;\n }\n\n protected emitClick(s: PieSliceRect): void {\n this.sliceClick.emit({\n seriesKey: s.seriesKey,\n name: s.name,\n value: s.value,\n datumIndex: s.datumIndex,\n datum: this.data()[s.datumIndex],\n });\n }\n\n protected setActive(event: PointerEvent | FocusEvent, s: PieSliceRect): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({\n index: s.datumIndex,\n datumIndex: s.datumIndex,\n seriesKey: s.seriesKey,\n clientX,\n clientY,\n });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { lineRadial, curveLinearClosed, curveCardinalClosed } from 'd3-shape';\nimport { max as d3max } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport type RadarCurve = 'linear' | 'cardinal';\nexport type RadarGrid = 'polygon' | 'circle' | 'none';\n\nexport interface RadarLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly axisKey: string;\n readonly seriesKeys: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly maxValue?: number;\n readonly levels: number;\n readonly curve: RadarCurve;\n readonly grid: RadarGrid;\n}\n\nexport interface RadarAxisInfo {\n readonly name: string;\n readonly angle: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface RadarSeries {\n readonly seriesKey: string;\n readonly color: string;\n readonly path: string;\n readonly points: readonly { readonly x: number; readonly y: number; readonly value: number; readonly axis: string }[];\n}\n\nexport interface RadarLevel {\n readonly value: number;\n readonly radius: number;\n readonly path: string;\n}\n\nexport interface RadarLayout {\n readonly centerX: number;\n readonly centerY: number;\n readonly radius: number;\n readonly axes: readonly RadarAxisInfo[];\n readonly levels: readonly RadarLevel[];\n readonly maxValue: number;\n readonly series: readonly RadarSeries[];\n readonly grid: RadarGrid;\n}\n\nexport function computeRadarLayout(input: RadarLayoutInput): RadarLayout {\n const { data, axisKey, seriesKeys, innerWidth, innerHeight, levels, curve, grid } = input;\n const radius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || seriesKeys.length === 0 || radius === 0) {\n return { centerX, centerY, radius, axes: [], levels: [], maxValue: 0, series: [], grid };\n }\n\n const maxValue = input.maxValue ?? d3max(data, (d) => d3max(seriesKeys, (k) => Number(d[k] ?? 0)) ?? 0) ?? 1;\n\n const angleStep = (2 * Math.PI) / data.length;\n const angleFor = (i: number) => i * angleStep - Math.PI / 2;\n\n const axes: RadarAxisInfo[] = data.map((d, i) => {\n const angle = angleFor(i);\n return {\n name: String(d[axisKey] ?? i),\n angle,\n x: Math.cos(angle) * radius,\n y: Math.sin(angle) * radius,\n };\n });\n\n const levelValues: RadarLevel[] = Array.from({ length: levels }, (_, index) => {\n const value = ((index + 1) / levels) * maxValue;\n const levelRadius = ((index + 1) / levels) * radius;\n return {\n value,\n radius: levelRadius,\n path: polygonPath(\n axes.map((axis) => ({\n x: Math.cos(axis.angle) * levelRadius,\n y: Math.sin(axis.angle) * levelRadius,\n })),\n ),\n };\n });\n\n const curveFactory = curve === 'cardinal' ? curveCardinalClosed : curveLinearClosed;\n const radial = lineRadial<{ angle: number; value: number }>()\n .angle((point) => point.angle + Math.PI / 2)\n .radius((point) => (point.value / maxValue) * radius)\n .curve(curveFactory);\n\n const series: RadarSeries[] = seriesKeys.map((seriesKey) => {\n const points = data.map((datum, index) => {\n const value = Number(datum[seriesKey] ?? 0);\n const angle = angleFor(index);\n const pointRadius = (value / maxValue) * radius;\n return {\n axis: String(datum[axisKey] ?? index),\n value,\n x: Math.cos(angle) * pointRadius,\n y: Math.sin(angle) * pointRadius,\n };\n });\n return {\n seriesKey,\n color: seriesColorVar(seriesKey),\n path:\n radial(data.map((datum, index) => ({ angle: angleFor(index), value: Number(datum[seriesKey] ?? 0) }))) ?? '',\n points,\n };\n });\n\n return { centerX, centerY, radius, axes, levels: levelValues, maxValue, series, grid };\n}\n\nfunction polygonPath(points: readonly { readonly x: number; readonly y: number }[]): string {\n if (points.length === 0) {\n return '';\n }\n\n const [first, ...rest] = points;\n return `M ${first.x} ${first.y} ${rest.map((point) => `L ${point.x} ${point.y}`).join(' ')} Z`;\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computeRadarLayout, type RadarCurve, type RadarGrid } from './radar-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 24, right: 24, bottom: 24, left: 24 };\n\n@Component({\n selector: 'ui-radar-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g class=\"chart-radar\" [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @if (layout().grid !== 'none') {\n @for (level of layout().levels; track level.value; let levelIndex = $index) {\n @if (layout().grid === 'circle') {\n <svg:circle\n class=\"chart-radar-level stroke-border\"\n [attr.fill]=\"gridFill()\"\n [attr.fill-opacity]=\"gridFillOpacity(levelIndex)\"\n stroke-dasharray=\"2 2\"\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"level.radius\" />\n } @else {\n <svg:path\n class=\"chart-radar-level stroke-border\"\n [attr.d]=\"level.path\"\n [attr.fill]=\"gridFill()\"\n [attr.fill-opacity]=\"gridFillOpacity(levelIndex)\"\n stroke-dasharray=\"2 2\" />\n }\n }\n }\n @if (showAxes()) {\n @for (axis of layout().axes; track axis.name) {\n <svg:line class=\"chart-radar-axis stroke-border\" x1=\"0\" y1=\"0\" [attr.x2]=\"axis.x\" [attr.y2]=\"axis.y\" />\n @if (showLabels()) {\n <svg:text\n class=\"chart-radar-axis-label fill-muted-foreground text-[10px]\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n [attr.x]=\"axis.x * 1.12\"\n [attr.y]=\"axis.y * 1.12\">\n {{ axis.name }}\n </svg:text>\n }\n }\n }\n @for (s of layout().series; track s.seriesKey) {\n <svg:path\n class=\"chart-radar-series\"\n [attr.d]=\"s.path\"\n [attr.stroke]=\"s.color\"\n [attr.fill]=\"linesOnly() ? 'none' : s.color\"\n [attr.fill-opacity]=\"linesOnly() ? null : fillOpacity()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linejoin=\"round\" />\n @if (showDots()) {\n @for (p of s.points; track p.axis; let i = $index) {\n <svg:circle\n class=\"chart-radar-dot cursor-pointer\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"dotRadius()\"\n [attr.fill]=\"s.color\"\n tabindex=\"0\"\n [attr.aria-label]=\"dotAriaLabel(s.seriesKey, p)\"\n (pointerenter)=\"setActive($event, s.seriesKey, i)\"\n (pointermove)=\"setActive($event, s.seriesKey, i)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, s.seriesKey, i)\"\n (blur)=\"clearActive()\" />\n }\n }\n }\n </svg:g>\n <ng-content />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class RadarChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly axisKey = input.required<string>();\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly curve = input<RadarCurve>('linear');\n readonly levels = input<number>(4);\n readonly maxValue = input<number | undefined>(undefined);\n readonly strokeWidth = input<number>(2);\n readonly fillOpacity = input<number>(0.2);\n readonly showLabels = input<boolean>(true);\n readonly showDots = input<boolean>(true);\n readonly dotRadius = input<number>(3);\n readonly grid = input<RadarGrid>('circle');\n readonly gridFilled = input<boolean>(false);\n readonly showAxes = input<boolean>(true);\n readonly linesOnly = input<boolean>(false);\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeRadarLayout({\n data: this.data(),\n axisKey: this.axisKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n maxValue: this.maxValue(),\n levels: this.levels(),\n curve: this.curve(),\n grid: this.grid(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly ariaSummary = computed(() => {\n const keys = this.root.visibleSeriesKeys();\n return `Radar chart, ${this.data().length} axes, ${keys.length} series.`;\n });\n\n protected gridFill(): string {\n return this.gridFilled() ? 'hsl(var(--muted))' : 'none';\n }\n\n protected gridFillOpacity(levelIndex: number): number | null {\n return this.gridFilled() ? Math.max(0.06, 0.18 - levelIndex * 0.02) : null;\n }\n\n protected dotAriaLabel(seriesKey: string, p: { axis: string; value: number }): string {\n const label = this.root.config()[seriesKey]?.label ?? seriesKey;\n return `${label} at ${p.axis}: ${p.value}`;\n }\n\n protected setActive(event: PointerEvent | FocusEvent, seriesKey: string, index: number): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({ index, datumIndex: index, seriesKey, clientX, clientY });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { arc as d3arc } from 'd3-shape';\nimport { max as d3max } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\n\nexport interface RadialLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly nameKey: string;\n readonly valueKey: string;\n readonly innerWidth: number;\n readonly innerHeight: number;\n /** Optional explicit series-key list (same length as data). */\n readonly seriesKeys?: readonly string[];\n /** Gap between concentric tracks (px). */\n readonly trackPadding: number;\n /** Start / end angle (radians). */\n readonly startAngle: number;\n readonly endAngle: number;\n readonly cornerRadius: number;\n readonly maxValue?: number;\n}\n\nexport interface RadialBarRect {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly color: string;\n readonly arcPath: string;\n readonly backgroundPath: string;\n readonly innerRadius: number;\n readonly outerRadius: number;\n readonly endAngle: number;\n}\n\nexport interface RadialLayout {\n readonly centerX: number;\n readonly centerY: number;\n readonly outerRadius: number;\n readonly bars: readonly RadialBarRect[];\n readonly maxValue: number;\n}\n\nexport function computeRadialLayout(input: RadialLayoutInput): RadialLayout {\n const {\n data,\n nameKey,\n valueKey,\n innerWidth,\n innerHeight,\n seriesKeys,\n trackPadding,\n startAngle,\n endAngle,\n cornerRadius,\n } = input;\n\n const outerRadius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);\n const centerX = innerWidth / 2;\n const centerY = innerHeight / 2;\n\n if (data.length === 0 || outerRadius === 0) {\n return { centerX, centerY, outerRadius, bars: [], maxValue: 0 };\n }\n\n const maxValue = input.maxValue ?? d3max(data, (d) => Number(d[valueKey] ?? 0)) ?? 1;\n const trackCount = data.length;\n const availableRadius = outerRadius - (trackCount - 1) * trackPadding;\n const trackThickness = availableRadius / trackCount;\n\n const bars: RadialBarRect[] = data.map((d, i) => {\n const inner = i * (trackThickness + trackPadding);\n const outer = inner + trackThickness;\n const value = Number(d[valueKey] ?? 0);\n const pct = maxValue === 0 ? 0 : value / maxValue;\n const sweep = (endAngle - startAngle) * pct;\n const valueEndAngle = startAngle + sweep;\n const key = seriesKeys?.[i] ?? String(d[nameKey] ?? i);\n\n const arcGen = d3arc<unknown>().innerRadius(inner).outerRadius(outer).cornerRadius(cornerRadius);\n\n return {\n seriesKey: key,\n name: String(d[nameKey] ?? key),\n value,\n datumIndex: i,\n color: seriesColorVar(key),\n arcPath: arcGen.startAngle(startAngle).endAngle(valueEndAngle)(null) ?? '',\n backgroundPath: arcGen.startAngle(startAngle).endAngle(endAngle)(null) ?? '',\n innerRadius: inner,\n outerRadius: outer,\n endAngle: valueEndAngle,\n };\n });\n\n return { centerX, centerY, outerRadius, bars, maxValue };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { computeRadialLayout, type RadialBarRect } from './radial-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 8, left: 8 };\nconst defaultRadialValueFormatter = (value: number): string => `${value}`;\n\nexport type RadialValueLabelFormatter = (value: number, name: string) => string;\n\nexport interface RadialBarClickEvent {\n readonly seriesKey: string;\n readonly name: string;\n readonly value: number;\n readonly datumIndex: number;\n readonly datum: ChartDatum;\n}\n\n@Component({\n selector: 'ui-radial-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g [attr.transform]=\"'translate(' + layout().centerX + ',' + layout().centerY + ')'\">\n @for (b of layout().bars; track b.seriesKey) {\n @if (showTrack()) {\n <svg:path class=\"chart-radial-track fill-muted\" [attr.d]=\"b.backgroundPath\" />\n }\n <svg:path\n class=\"chart-radial-bar cursor-pointer transition-opacity hover:opacity-80\"\n [attr.d]=\"b.arcPath\"\n [attr.fill]=\"b.color\"\n [attr.aria-label]=\"barAriaLabel(b)\"\n tabindex=\"0\"\n (click)=\"emitClick(b)\"\n (keydown.enter)=\"emitClick(b)\"\n (keydown.space)=\"emitClick(b); $event.preventDefault()\"\n (pointerenter)=\"setActive($event, b)\"\n (pointermove)=\"setActive($event, b)\"\n (pointerleave)=\"clearActive()\"\n (focus)=\"setActive($event, b)\"\n (blur)=\"clearActive()\" />\n @if (showValueLabels()) {\n <svg:text\n class=\"chart-radial-value pointer-events-none fill-muted-foreground text-[10px]\"\n [attr.x]=\"barLabelX(b)\"\n [attr.y]=\"barLabelY(b)\"\n [attr.text-anchor]=\"barLabelAnchor(b)\"\n dominant-baseline=\"middle\">\n {{ formatValueLabel(b) }}\n </svg:text>\n }\n }\n </svg:g>\n </svg:g>\n </svg:svg>\n <div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <ng-content select=\"ui-radial-center\" />\n </div>\n <ng-content select=\"ui-chart-tooltip\" />\n <ng-content select=\"ui-chart-legend\" />\n `,\n})\nexport class RadialChart {\n private readonly root = inject(ChartContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly nameKey = input.required<string>();\n readonly valueKey = input.required<string>();\n readonly seriesKeys = input<readonly string[] | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly trackPadding = input<number>(4);\n readonly cornerRadius = input<number>(8);\n readonly startAngle = input<number>(-Math.PI / 2);\n readonly endAngle = input<number>((3 * Math.PI) / 2);\n readonly maxValue = input<number | undefined>(undefined);\n readonly showTrack = input<boolean>(true);\n readonly showValueLabels = input<boolean>(false);\n readonly valueLabelFormat = input<RadialValueLabelFormatter>(defaultRadialValueFormatter);\n\n readonly barClick = output<RadialBarClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly layout = computed(() =>\n computeRadialLayout({\n data: this.data(),\n nameKey: this.nameKey(),\n valueKey: this.valueKey(),\n seriesKeys: this.seriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n trackPadding: this.trackPadding(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n cornerRadius: this.cornerRadius(),\n maxValue: this.maxValue(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n protected readonly ariaSummary = computed(() => `Radial bar chart, ${this.data().length} tracks.`);\n\n protected barAriaLabel(b: RadialBarRect): string {\n return `${b.name}: ${b.value}`;\n }\n\n protected formatValueLabel(b: RadialBarRect): string {\n return this.valueLabelFormat()(b.value, b.name);\n }\n\n protected barLabelX(b: RadialBarRect): number {\n const radius = (b.innerRadius + b.outerRadius) / 2 + 10;\n return Math.sin(b.endAngle) * radius;\n }\n\n protected barLabelY(b: RadialBarRect): number {\n const radius = (b.innerRadius + b.outerRadius) / 2 + 10;\n return -Math.cos(b.endAngle) * radius;\n }\n\n protected barLabelAnchor(b: RadialBarRect): 'start' | 'end' {\n return this.barLabelX(b) >= 0 ? 'start' : 'end';\n }\n\n protected emitClick(b: RadialBarRect): void {\n this.barClick.emit({\n seriesKey: b.seriesKey,\n name: b.name,\n value: b.value,\n datumIndex: b.datumIndex,\n datum: this.data()[b.datumIndex],\n });\n }\n\n protected setActive(event: PointerEvent | FocusEvent, b: RadialBarRect): void {\n const clientX =\n event instanceof PointerEvent ? event.clientX : (event.target as Element).getBoundingClientRect().left;\n const clientY =\n event instanceof PointerEvent ? event.clientY : (event.target as Element).getBoundingClientRect().top;\n this.root.activePoint.set({\n index: b.datumIndex,\n datumIndex: b.datumIndex,\n seriesKey: b.seriesKey,\n clientX,\n clientY,\n });\n }\n\n protected clearActive(): void {\n this.root.activePoint.set(null);\n }\n}\n","import { scaleLinear, type ScaleLinear } from 'd3-scale';\nimport { extent as d3extent } from 'd3-array';\nimport type { ChartDatum } from '../../core/cartesian-context';\nimport { seriesColorVar } from '../../core/chart-config';\nimport type { NumericDomain } from '../../core/viewport';\n\nexport interface ScatterLayoutInput {\n readonly data: readonly ChartDatum[];\n readonly xKey: string;\n readonly yKey: string;\n readonly sizeKey?: string;\n readonly seriesKey?: string;\n readonly seriesKeys: readonly string[];\n readonly innerWidth: number;\n readonly innerHeight: number;\n readonly minPointRadius: number;\n readonly maxPointRadius: number;\n readonly xDomain?: readonly [number, number];\n readonly yDomain?: readonly [number, number];\n}\n\nexport interface ScatterPoint {\n readonly seriesKey: string;\n readonly color: string;\n readonly x: number;\n readonly y: number;\n readonly radius: number;\n readonly datumIndex: number;\n readonly rawX: number;\n readonly rawY: number;\n readonly rawSize: number;\n}\n\nexport interface ScatterLayout {\n readonly points: readonly ScatterPoint[];\n readonly xScale: ScaleLinear<number, number>;\n readonly yScale: ScaleLinear<number, number>;\n readonly xDomain: NumericDomain;\n readonly yDomain: NumericDomain;\n}\n\nfunction nice(extent: [number, number] | [undefined, undefined]): [number, number] {\n const [lo, hi] = extent;\n if (lo === undefined || hi === undefined) return [0, 1];\n if (lo === hi) return [lo - 1, hi + 1];\n return [lo, hi];\n}\n\nexport function resolveScatterDomains(\n input: Pick<ScatterLayoutInput, 'data' | 'xKey' | 'yKey' | 'xDomain' | 'yDomain'>,\n): { xDomain: NumericDomain; yDomain: NumericDomain } {\n const xValues = input.data.map((d) => Number(d[input.xKey] ?? 0));\n const yValues = input.data.map((d) => Number(d[input.yKey] ?? 0));\n return {\n xDomain: (input.xDomain ?? nice(d3extent(xValues) as [number, number])) as NumericDomain,\n yDomain: (input.yDomain ?? nice(d3extent(yValues) as [number, number])) as NumericDomain,\n };\n}\n\nexport function computeScatterLayout(input: ScatterLayoutInput): ScatterLayout {\n const { data, xKey, yKey, sizeKey, seriesKey, seriesKeys, innerWidth, innerHeight, minPointRadius, maxPointRadius } =\n input;\n\n const xValues = data.map((d) => Number(d[xKey] ?? 0));\n const yValues = data.map((d) => Number(d[yKey] ?? 0));\n const sizeValues = sizeKey ? data.map((d) => Number(d[sizeKey] ?? 0)) : [];\n\n const { xDomain, yDomain } = resolveScatterDomains(input);\n\n const xScale = scaleLinear()\n .domain(xDomain as [number, number])\n .range([0, innerWidth]);\n const yScale = scaleLinear()\n .domain(yDomain as [number, number])\n .range([innerHeight, 0]);\n\n let sizeScale: ScaleLinear<number, number> | null = null;\n if (sizeKey && sizeValues.length > 0) {\n const [sLo, sHi] = d3extent(sizeValues) as [number, number];\n sizeScale = scaleLinear()\n .domain([sLo ?? 0, sHi ?? 1])\n .range([minPointRadius, maxPointRadius]);\n }\n\n const fallbackKey = seriesKeys[0] ?? 'value';\n\n const points: ScatterPoint[] = data.flatMap((d, i) => {\n const key = seriesKey ? String(d[seriesKey] ?? fallbackKey) : fallbackKey;\n const sz = sizeKey ? Number(d[sizeKey] ?? 0) : 0;\n const rawX = xValues[i];\n const rawY = yValues[i];\n if (rawX < xDomain[0] || rawX > xDomain[1] || rawY < yDomain[0] || rawY > yDomain[1]) {\n return [];\n }\n return [\n {\n seriesKey: key,\n color: seriesColorVar(key),\n x: xScale(rawX),\n y: yScale(rawY),\n radius: sizeScale ? sizeScale(sz) : minPointRadius,\n datumIndex: i,\n rawX,\n rawY,\n rawSize: sz,\n },\n ];\n });\n\n return { points, xScale, yScale, xDomain, yDomain };\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output } from '@angular/core';\nimport { ChartContext } from '../../core/chart-context';\nimport type { ChartDatum, ChartMargin } from '../../core/cartesian-context';\nimport { ScatterViewportContext } from '../../core/scatter-viewport-context';\nimport { computeScatterLayout, resolveScatterDomains, type ScatterPoint } from './scatter-layout';\n\nconst DEFAULT_MARGIN: ChartMargin = { top: 8, right: 8, bottom: 24, left: 40 };\n\nexport interface ScatterPointClickEvent {\n readonly seriesKey: string;\n readonly datumIndex: number;\n readonly x: number;\n readonly y: number;\n readonly datum: ChartDatum;\n}\n\n/**\n * Scatter chart — one dot per datum. Both axes are linear; color can\n * come from a fixed series key or per-row via `seriesKey` field. Point\n * radius optionally scales with `sizeKey`.\n */\n@Component({\n selector: 'ui-scatter-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ScatterViewportContext],\n host: { class: 'relative block h-full w-full' },\n template: `\n <svg:svg\n class=\"block h-full w-full overflow-visible\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"none\"\n role=\"img\"\n [attr.aria-label]=\"ariaSummary()\">\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId()\">\n <svg:rect x=\"0\" y=\"0\" [attr.width]=\"innerWidth()\" [attr.height]=\"innerHeight()\" />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"innerTransform()\">\n <svg:g class=\"chart-scatter\" [attr.clip-path]=\"'url(#' + clipPathId() + ')'\">\n @for (p of layout().points; track p.datumIndex) {\n <svg:circle\n class=\"chart-scatter-point cursor-pointer transition-opacity hover:opacity-80\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n [attr.r]=\"p.radius\"\n [attr.fill]=\"p.color\"\n [attr.aria-label]=\"pointAriaLabel(p)\"\n tabindex=\"0\"\n (click)=\"emitClick(p)\"\n (keydown.enter)=\"emitClick(p)\"\n (keydown.space)=\"emitClick(p); $event.preventDefault()\" />\n }\n </svg:g>\n <ng-content select=\"svg:g[ui-chart-brush]\" />\n </svg:g>\n </svg:svg>\n <ng-content select=\"ui-chart-legend\" />\n <ng-content select=\"ui-chart-zoom-controls\" />\n `,\n})\nexport class ScatterChart {\n private readonly root = inject(ChartContext);\n private readonly viewport = inject(ScatterViewportContext);\n\n readonly data = input.required<readonly ChartDatum[]>();\n readonly xKey = input.required<string>();\n readonly yKey = input.required<string>();\n /** Optional numeric field to drive point radius. */\n readonly sizeKey = input<string | undefined>(undefined);\n /** Optional field on each datum used as color key. */\n readonly seriesKey = input<string | undefined>(undefined);\n readonly margin = input<ChartMargin>(DEFAULT_MARGIN);\n readonly minPointRadius = input<number>(3);\n readonly maxPointRadius = input<number>(12);\n readonly xDomain = input<readonly [number, number] | undefined>(undefined);\n readonly yDomain = input<readonly [number, number] | undefined>(undefined);\n\n readonly pointClick = output<ScatterPointClickEvent>();\n\n protected readonly innerWidth = computed(() =>\n Math.max(0, this.root.dimensions().width - this.margin().left - this.margin().right),\n );\n protected readonly innerHeight = computed(() =>\n Math.max(0, this.root.dimensions().height - this.margin().top - this.margin().bottom),\n );\n\n protected readonly resolvedDomains = computed(() =>\n resolveScatterDomains({\n data: this.data(),\n xKey: this.xKey(),\n yKey: this.yKey(),\n xDomain: this.xDomain(),\n yDomain: this.yDomain(),\n }),\n );\n\n protected readonly currentXDomain = computed(() => this.viewport.zoomXDomain() ?? this.resolvedDomains().xDomain);\n\n protected readonly currentYDomain = computed(() => this.viewport.zoomYDomain() ?? this.resolvedDomains().yDomain);\n\n protected readonly layout = computed(() =>\n computeScatterLayout({\n data: this.data(),\n xKey: this.xKey(),\n yKey: this.yKey(),\n sizeKey: this.sizeKey(),\n seriesKey: this.seriesKey(),\n seriesKeys: this.root.visibleSeriesKeys(),\n innerWidth: this.innerWidth(),\n innerHeight: this.innerHeight(),\n minPointRadius: this.minPointRadius(),\n maxPointRadius: this.maxPointRadius(),\n xDomain: this.currentXDomain(),\n yDomain: this.currentYDomain(),\n }),\n );\n\n protected readonly viewBox = computed(() => {\n const { width, height } = this.root.dimensions();\n return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;\n });\n\n protected readonly innerTransform = computed(() => `translate(${this.margin().left},${this.margin().top})`);\n\n protected readonly clipPathId = computed(() => `${this.root.id()}-scatter-clip`);\n\n protected readonly ariaSummary = computed(() => `Scatter chart, ${this.data().length} points.`);\n\n constructor() {\n effect(() => {\n const domains = this.resolvedDomains();\n const layout = this.layout();\n this.viewport.innerWidth.set(this.innerWidth());\n this.viewport.innerHeight.set(this.innerHeight());\n this.viewport.fullXDomain.set(domains.xDomain);\n this.viewport.fullYDomain.set(domains.yDomain);\n this.viewport.xScale.set(layout.xScale);\n this.viewport.yScale.set(layout.yScale);\n });\n }\n\n protected pointAriaLabel(p: ScatterPoint): string {\n return `${p.seriesKey}: x=${p.rawX}, y=${p.rawY}`;\n }\n\n protected emitClick(p: ScatterPoint): void {\n this.pointClick.emit({\n seriesKey: p.seriesKey,\n datumIndex: p.datumIndex,\n x: p.rawX,\n y: p.rawY,\n datum: this.data()[p.datumIndex],\n });\n }\n}\n","/*\n * Public API Surface of @ojiepermana/angular/chart\n */\n\n// Core\nexport * from './src/lib/core/chart-config';\nexport * from './src/lib/core/chart-context';\nexport * from './src/lib/core/chart-style';\nexport * from './src/lib/core/chart-container';\nexport * from './src/lib/core/cartesian-context';\nexport * from './src/lib/core/ticks';\nexport * from './src/lib/core/viewport';\n\n// Primitives\nexport * from './src/lib/primitives/chart-axis-x';\nexport * from './src/lib/primitives/chart-axis-y';\nexport * from './src/lib/primitives/chart-grid';\nexport * from './src/lib/primitives/chart-crosshair';\nexport * from './src/lib/primitives/chart-brush';\nexport * from './src/lib/primitives/chart-pointer-tracker';\nexport * from './src/lib/primitives/chart-tooltip';\nexport * from './src/lib/primitives/chart-legend';\nexport * from './src/lib/primitives/chart-zoom-controls';\nexport * from './src/lib/primitives/pie-center';\nexport * from './src/lib/primitives/radial-center';\n\n// Charts\nexport * from './src/lib/charts/bar';\nexport * from './src/lib/charts/line';\nexport * from './src/lib/charts/area';\nexport * from './src/lib/charts/pie';\nexport * from './src/lib/charts/radar';\nexport * from './src/lib/charts/radial';\nexport * from './src/lib/charts/scatter';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["clamp","readNumber","d3min","d3max","d3stack","DEFAULT_MARGIN","d3line","d3area","d3pie","d3arc","d3extent"],"mappings":";;;;;;;AAgCA;AACO,MAAM,oBAAoB,GAAG;AAEpC;AACO,MAAM,YAAY,GAGpB;AACH,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE;;AAGjD;;;;;;;;;AASG;AACG,SAAU,aAAa,CAAC,OAAe,EAAE,MAAmB,EAAA;IAChE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,IAAI,GAA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