@acorex/charts 22.0.0-next.0 → 22.0.0-next.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-charts-heatmap-chart.mjs","sources":["../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.config.ts","../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.component.ts","../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.component.html","../../../../packages/charts/heatmap-chart/src/acorex-charts-heatmap-chart.ts"],"sourcesContent":["import { AX_CHART_DEFAULT_MESSAGES } from '@acorex/charts';\nimport { InjectionToken } from '@angular/core';\nimport { AXHeatmapChartOption } from './heatmap-chart.type';\n\nexport const AXHeatmapChartDefaultConfig: AXHeatmapChartOption = {\n margin: { top: 30, right: 30, bottom: 60, left: 60 },\n color: 'rgb(var(--ax-sys-color-primary-500))',\n cellPadding: 0.05,\n borderRadius: 2,\n showXAxis: true,\n showYAxis: true,\n rotateXAxisLabels: 'auto',\n showTooltip: true,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n messages: {\n ...AX_CHART_DEFAULT_MESSAGES,\n noDataIcon: 'fa-light fa-grid-2',\n },\n};\n\nexport const AX_HEATMAP_CHART_CONFIG = new InjectionToken<AXHeatmapChartOption>('AX_HEATMAP_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => AXHeatmapChartDefaultConfig,\n});\n","import {\n AXChartComponent,\n computeTooltipPosition,\n getEasingFunction,\n mergeChartMessages,\n mergeChartOptions,\n resolveCssColorInContext,\n} from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n afterNextRender,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { map, Subscription } from 'rxjs';\nimport { AX_HEATMAP_CHART_CONFIG } from './heatmap-chart.config';\nimport { AXHeatmapChartOption, AXHeatmapData } from './heatmap-chart.type';\n\n@Component({\n selector: 'ax-heatmap-chart',\n templateUrl: './heatmap-chart.component.html',\n styleUrls: ['./heatmap-chart.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [AXChartTooltipComponent],\n})\nexport class AXHeatmapChartComponent extends AXChartComponent implements OnDestroy {\n /** Fixed `viewBox` side; chart scales with CSS `width` / `height` on the host container. */\n private static readonly VIEW_BOX_SIZE = 400;\n\n // X-axis layout (aligned with bar-chart heuristics)\n private readonly CHAR_WIDTH_RATIO = 0.65;\n private readonly ROTATION_TOLERANCE_SMALL_DATASET = 1.4;\n private readonly SMALL_DATASET_THRESHOLD = 6;\n private readonly MANY_ITEMS_THRESHOLD = 20;\n private readonly VERY_MANY_ITEMS_THRESHOLD = 50;\n private readonly MAX_LABEL_LENGTH = 20;\n private readonly TICK_AREA_PADDING = 6;\n private readonly X_AXIS_TITLE_GAP = 10;\n private readonly X_AXIS_TITLE_FONT_SIZE = 14;\n private readonly MIN_FONT_SIZE_X_AXIS = 8;\n private readonly MAX_FONT_SIZE_X_AXIS = 14;\n\n // Inject config at the top level\n private readonly defaultConfig = inject(AX_HEATMAP_CHART_CONFIG);\n\n // Inputs\n data = input<AXHeatmapData[]>([]);\n options = input<AXHeatmapChartOption>({});\n\n // Outputs\n /** Emitted when a heatmap cell is clicked */\n cellClick = output<AXHeatmapData>();\n\n // View Child\n private readonly containerRef = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // Internal State\n private svg: any;\n protected d3: any;\n private _d3Ready = signal(false);\n private platformService = inject(AXPlatform);\n protected isRtl = signal(this.platformService.isRtl());\n private directionSub?: Subscription;\n\n // Tooltip State\n protected tooltipVisible = signal(false);\n protected tooltipPosition = signal({ x: 0, y: 0 });\n protected tooltipData = signal<AXChartTooltipData>({ title: '', value: '' });\n private _tooltipRafId: number | null = null;\n\n // Computed options (referencing the already injected defaultConfig)\n protected effectiveOptions = computed(() => mergeChartOptions(this.defaultConfig, this.options()));\n\n protected effectiveMessages = computed(() =>\n mergeChartMessages(this.defaultConfig.messages, this.options()?.messages),\n );\n\n constructor() {\n super();\n\n afterNextRender(() => {\n this.init();\n this.directionSub = this.platformService.directionChange.pipe(map((i) => i.data === 'rtl')).subscribe((isRtl) => {\n this.isRtl.set(isRtl);\n if (this._d3Ready()) {\n this.renderChart();\n }\n });\n });\n\n // Reactive render when data, options, or D3 readiness change\n effect(() => {\n this.data();\n this.effectiveOptions();\n if (this._d3Ready()) {\n this.renderChart();\n }\n });\n }\n\n private async init() {\n try {\n this.d3 = await import('d3');\n\n this._d3Ready.set(true);\n } catch (err) {\n console.error('Heatmap: Initialization failed', err);\n }\n }\n\n public updateChart(): void {\n this.renderChart();\n }\n\n private renderChart() {\n const container = this.containerRef().nativeElement;\n const data = this.data() || [];\n\n // Clear SVG if data is empty\n if (data.length === 0) {\n if (this.svg) this.svg.remove();\n this.svg = null;\n return;\n }\n\n const options = this.effectiveOptions();\n const width = AXHeatmapChartComponent.VIEW_BOX_SIZE;\n const height = AXHeatmapChartComponent.VIEW_BOX_SIZE;\n const isRtl = this.isRtl();\n const baseMargin = options.margin || { top: 20, right: 20, bottom: 40, left: 40 };\n // When rendering RTL, the Y axis is on the right; swap side margins so tick labels\n // have the same breathing room they get on the left in LTR.\n let margin = isRtl\n ? { top: baseMargin.top, right: baseMargin.left, bottom: baseMargin.bottom, left: baseMargin.right }\n : { ...baseMargin };\n\n const xKeys = Array.from(new Set(data.map((d) => d.x.toString())));\n const yKeys = Array.from(new Set(data.map((d) => d.y.toString())));\n\n let innerWidth = width - margin.left - margin.right;\n const cellPad = options.cellPadding ?? 0;\n const xScaleProbe = this.d3\n .scaleBand()\n .domain(xKeys)\n .range(isRtl ? [innerWidth, 0] : [0, innerWidth])\n .padding(cellPad);\n\n const xTickFontSize = this.getHeatmapXTickFontSize(innerWidth, xKeys.length);\n const { tickXKeys, formatXTick } = this.getHeatmapXTickPlan(xKeys);\n const longestXLabel = xKeys.reduce((acc, k) => {\n const t = formatXTick(k);\n return t.length > acc.length ? t : acc;\n }, '');\n const estimatedLabelWidth = longestXLabel.length * xTickFontSize * this.CHAR_WIDTH_RATIO;\n const step = xScaleProbe.step();\n const rotateX = this.shouldRotateHeatmapXLabels(options.rotateXAxisLabels, estimatedLabelWidth, step, xKeys.length);\n\n const tickAreaHeight = rotateX\n ? estimatedLabelWidth * Math.SQRT1_2 + xTickFontSize * Math.SQRT1_2 + this.TICK_AREA_PADDING\n : xTickFontSize + this.TICK_AREA_PADDING + 2;\n\n const xAxisTitleReserve = options.xAxisLabel?.trim() ? this.X_AXIS_TITLE_GAP + 16 : 0;\n margin = { ...margin, bottom: Math.max(margin.bottom, tickAreaHeight + xAxisTitleReserve) };\n\n innerWidth = width - margin.left - margin.right;\n const innerHeight = Math.max(1, height - margin.top - margin.bottom);\n\n // Create/Select SVG root\n if (!this.svg) {\n this.svg = this.d3\n .select(container)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('preserveAspectRatio', 'xMidYMid meet')\n .style('display', 'block');\n this.svg.append('g').attr('class', 'chart-group');\n }\n\n this.svg.attr('viewBox', `0 0 ${width} ${height}`);\n const g = this.svg.select('.chart-group').attr('transform', `translate(${margin.left},${margin.top})`);\n\n // --- Scales ---\n const xScale = this.d3\n .scaleBand()\n .domain(xKeys)\n .range(isRtl ? [innerWidth, 0] : [0, innerWidth])\n .padding(cellPad);\n const yScale = this.d3.scaleBand().domain(yKeys).range([innerHeight, 0]).padding(cellPad);\n\n const valueExtent = this.d3.extent(data, (d: any) => d.value) as [number, number];\n const minValue = Number.isFinite(valueExtent[0]) ? valueExtent[0] : 0;\n const maxValue = Number.isFinite(valueExtent[1]) ? valueExtent[1] : minValue + 1;\n const palette = options.colors?.filter(Boolean) ?? [];\n const baseColor = options.color ?? 'rgb(99, 102, 241)';\n const rangeMin = options.valueRange?.min ?? minValue;\n const rangeMax = options.valueRange?.max ?? maxValue;\n\n const resolvedColorCache = new Map<string, string>();\n const resolvePaletteColor = (c: string): string => {\n const hit = resolvedColorCache.get(c);\n if (hit !== undefined) return hit;\n const out = resolveCssColorInContext(container, c);\n resolvedColorCache.set(c, out);\n return out;\n };\n const resolvedBase = resolvePaletteColor(baseColor);\n\n const getCellColor = (d: AXHeatmapData): string => {\n // If a palette is provided, choose a stable \"random\" color per cell.\n if (palette.length > 0) {\n const key = `${d.x}-${d.y}`;\n const idx = this.hashStringToUint32(key) % palette.length;\n return resolvePaletteColor(palette[idx] ?? baseColor);\n }\n\n const span = rangeMax - rangeMin;\n const t = span === 0 ? 1 : (d.value - rangeMin) / span;\n const clamped = Math.max(0, Math.min(1, t));\n return this.applyIntensityToResolvedRgb(resolvedBase, clamped);\n };\n\n // --- Axes ---\n const xAxisBuilder = this.d3\n .axisBottom(xScale)\n .tickSize(0)\n .tickFormat((d: string | number) => formatXTick(String(d)));\n if (tickXKeys.length < xKeys.length) {\n xAxisBuilder.tickValues(tickXKeys);\n }\n\n this.drawAxis(g, 'x-axis', xAxisBuilder, 0, innerHeight, options.showXAxis, isRtl);\n g.select('.x-axis').attr('direction', 'ltr');\n this.styleHeatmapXAxisTicks(g, xTickFontSize, rotateX);\n\n if (isRtl) {\n this.drawAxis(g, 'y-axis', this.d3.axisRight(yScale).tickSize(0), innerWidth, 0, options.showYAxis, isRtl);\n } else {\n this.drawAxis(g, 'y-axis', this.d3.axisLeft(yScale).tickSize(0), 0, 0, options.showYAxis, isRtl);\n }\n this.drawAxisLabels(g, innerWidth, innerHeight, options, isRtl, tickAreaHeight);\n\n // --- Cells with Data Join ---\n const easing = getEasingFunction(this.d3, options.animationEasing);\n\n g.selectAll('.cell')\n .data(data, (d: any) => `${d.x}-${d.y}`)\n .join(\n (enter: any) => enter.append('rect').attr('class', 'cell').attr('opacity', 0).attr('fill', resolvedBase),\n (update: any) => update,\n (exit: any) => exit.transition().duration(200).attr('opacity', 0).remove(),\n )\n .on('mouseenter', (event: any, d: AXHeatmapData) => this.showTooltip(event, d, getCellColor(d)))\n .on('mousemove', (event: any) => this.updateTooltipPos(event))\n .on('click', (_event: any, d: AXHeatmapData) => this.cellClick.emit(d))\n .on('mouseleave', () => this.hideTooltip())\n .transition()\n .duration(options.animationDuration)\n .ease(easing)\n .attr('x', (d: any) => xScale(d.x.toString()))\n .attr('y', (d: any) => yScale(d.y.toString()))\n .attr('width', xScale.bandwidth())\n .attr('height', yScale.bandwidth())\n .attr('rx', options.borderRadius)\n .attr('ry', options.borderRadius)\n .attr('opacity', 1)\n .style('fill', (d: AXHeatmapData) => getCellColor(d));\n }\n\n private hashStringToUint32(input: string): number {\n // Simple, fast, deterministic hash (djb2 variant)\n let hash = 5381;\n for (let i = 0; i < input.length; i++) {\n hash = (hash * 33) ^ input.charCodeAt(i);\n }\n return hash >>> 0;\n }\n\n /** `resolvedRgb` must be a computed `rgb()` / `rgba()` string (e.g. from {@link resolveCssColorInContext}). */\n private applyIntensityToResolvedRgb(resolvedRgb: string, t: number): string {\n const clamped = Math.max(0, Math.min(1, t));\n const parsed = this.d3.color(resolvedRgb);\n if (!parsed) return resolvedRgb;\n const rgb = this.d3.rgb(parsed);\n const minOpacity = 0.12;\n const opacity = minOpacity + clamped * (1 - minOpacity);\n return `rgba(${Math.round(rgb.r)},${Math.round(rgb.g)},${Math.round(rgb.b)},${opacity})`;\n }\n\n private drawAxis(g: any, className: string, axisFn: any, x: number, y: number, visible = true, isRtl = false) {\n let axisG = g.select(`.${className}`);\n if (axisG.empty()) axisG = g.append('g').attr('class', className);\n\n axisG\n .attr('transform', `translate(${x},${y})`)\n .style('display', visible ? 'block' : 'none')\n .call(axisFn)\n .call((g: any) => g.select('.domain').remove());\n\n // Ensure tick labels don't overlap the plot in RTL.\n // `text-anchor` is logical (depends on `direction`), so we set both explicitly.\n axisG.attr('direction', isRtl ? 'rtl' : 'ltr');\n axisG\n .selectAll('.tick text')\n .style('fill', 'rgba(var(--ax-comp-heatmap-chart-labels-color), 0.7)')\n .style('font-weight', '400');\n if (className === 'y-axis') {\n axisG.selectAll('.tick text').attr('text-anchor', 'end');\n }\n\n axisG.selectAll('line, path').style('stroke', 'rgba(var(--ax-comp-heatmap-chart-axis-color), 0.2)');\n }\n\n private showTooltip(event: MouseEvent, item: AXHeatmapData, color: string) {\n if (!this.effectiveOptions().showTooltip) return;\n this.tooltipData.set({\n title: `${item.x} / ${item.y}`,\n value: item.label || item.value.toLocaleString(),\n color: color,\n });\n this.tooltipVisible.set(true);\n this.updateTooltipPos(event);\n }\n\n private updateTooltipPos(event: MouseEvent) {\n if (this._tooltipRafId) cancelAnimationFrame(this._tooltipRafId);\n this._tooltipRafId = requestAnimationFrame(() => {\n const containerEl = this.containerRef().nativeElement;\n const rect = containerEl.getBoundingClientRect();\n const tooltipEl = containerEl.querySelector('.chart-tooltip') as HTMLElement;\n const tooltipRect = tooltipEl?.getBoundingClientRect() ?? null;\n const pos = computeTooltipPosition(rect, tooltipRect, event.clientX + 10, event.clientY - 10, 10);\n this.tooltipPosition.set(pos);\n });\n }\n\n private hideTooltip() {\n this.tooltipVisible.set(false);\n }\n\n ngOnDestroy(): void {\n this.directionSub?.unsubscribe();\n this.svg?.remove();\n if (this._tooltipRafId) cancelAnimationFrame(this._tooltipRafId);\n }\n\n private drawAxisLabels(\n g: any,\n innerWidth: number,\n innerHeight: number,\n options: AXHeatmapChartOption,\n isRtl: boolean,\n xTickAreaHeight: number,\n ) {\n const xText = options.xAxisLabel?.trim();\n const yText = options.yAxisLabel?.trim();\n\n const labels = g.selectAll('.axis-labels').data([0]).join('g').attr('class', 'axis-labels');\n\n labels\n .selectAll('.ax-heatmap-chart-axis-label-x')\n .data(xText ? [xText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'ax-heatmap-chart-axis-label ax-heatmap-chart-axis-label-x'),\n (update: any) => update,\n (exit: any) => exit.remove(),\n )\n .attr('x', innerWidth / 2)\n .attr('y', innerHeight + xTickAreaHeight + (xText ? this.X_AXIS_TITLE_GAP : 0))\n .attr('text-anchor', 'middle')\n .attr('direction', 'ltr')\n .style('font-size', `${this.X_AXIS_TITLE_FONT_SIZE}px`)\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-heatmap-chart-axis-label-color))')\n .text((d: string) => d);\n\n const yX = isRtl ? innerWidth + 46 : -46;\n labels\n .selectAll('.ax-heatmap-chart-axis-label-y')\n .data(yText ? [yText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'ax-heatmap-chart-axis-label ax-heatmap-chart-axis-label-y'),\n (update: any) => update,\n (exit: any) => exit.remove(),\n )\n .attr('transform', `translate(${yX}, ${innerHeight / 2}) rotate(-90)`)\n .attr('text-anchor', 'middle')\n .style('font-size', `${this.X_AXIS_TITLE_FONT_SIZE}px`)\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-heatmap-chart-axis-label-color))')\n .text((d: string) => d);\n }\n\n private getHeatmapXTickFontSize(innerWidth: number, itemCount: number): number {\n const baseSize = Math.round(innerWidth / 50);\n let adjustedSize = baseSize;\n if (itemCount > this.VERY_MANY_ITEMS_THRESHOLD) {\n adjustedSize = Math.round(baseSize * 0.7);\n } else if (itemCount > this.MANY_ITEMS_THRESHOLD) {\n adjustedSize = Math.round(baseSize * 0.85);\n }\n return Math.max(this.MIN_FONT_SIZE_X_AXIS, Math.min(this.MAX_FONT_SIZE_X_AXIS, adjustedSize));\n }\n\n private getHeatmapXTickPlan(xKeys: string[]): { tickXKeys: string[]; formatXTick: (d: string) => string } {\n const n = xKeys.length;\n const maxLabelLength = n > this.MANY_ITEMS_THRESHOLD ? 10 : this.MAX_LABEL_LENGTH;\n let tickXKeys = xKeys;\n if (n > this.VERY_MANY_ITEMS_THRESHOLD) {\n tickXKeys = xKeys.filter((_, i) => i % 5 === 0);\n } else if (n > this.MANY_ITEMS_THRESHOLD) {\n tickXKeys = xKeys.filter((_, i) => i % 2 === 0);\n }\n const formatXTick = (d: string) => this.truncateHeatmapLabel(d, maxLabelLength);\n return { tickXKeys, formatXTick };\n }\n\n private truncateHeatmapLabel(label: string, maxLength: number): string {\n if (label.length <= maxLength) return label;\n if (maxLength <= 1) return '…';\n return `${label.substring(0, maxLength - 1)}…`;\n }\n\n private shouldRotateHeatmapXLabels(\n rotateOption: boolean | 'auto' | undefined,\n estimatedLabelWidth: number,\n step: number,\n domainCount: number,\n ): boolean {\n if (rotateOption === true) return true;\n if (rotateOption === false) return false;\n if (domainCount === 0) return false;\n if (domainCount <= this.SMALL_DATASET_THRESHOLD) {\n return estimatedLabelWidth > step * this.ROTATION_TOLERANCE_SMALL_DATASET;\n }\n return estimatedLabelWidth > step;\n }\n\n private styleHeatmapXAxisTicks(g: any, fontSize: number, rotated: boolean): void {\n const texts = g\n .select('.x-axis')\n .selectAll('.tick text')\n .style('font-size', `${fontSize}px`)\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-heatmap-chart-labels-color), 0.7)')\n .attr('direction', 'ltr');\n\n if (rotated) {\n texts.attr('transform', 'rotate(-45)').style('text-anchor', 'end').attr('dx', '-0.8em').attr('dy', '0.15em');\n } else {\n texts.attr('transform', null).style('text-anchor', 'middle').attr('dx', null).attr('dy', '0.71em');\n }\n }\n\n // RTL is tracked via AXPlatform.directionChange\n}\n","<div class=\"ax-heatmap-chart-container\" role=\"img\" #chartContainer>\n <ax-chart-tooltip [data]=\"tooltipData()\" [position]=\"tooltipPosition()\" [visible]=\"tooltipVisible()\">\n </ax-chart-tooltip>\n @if (data()?.length === 0) {\n <div class=\"ax-chart-empty\">\n <div class=\"ax-chart-empty__card\">\n <div class=\"ax-chart-empty__icon\">\n <i [class]=\"effectiveMessages().noDataIcon + ' fa-2x'\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"ax-chart-empty__title\">{{ effectiveMessages().noData }}</div>\n <div class=\"ax-chart-empty__help\">{{ effectiveMessages().noDataHelp }}</div>\n </div>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],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,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDkBY,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEtB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,iBAGb,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,irBAAA,EAAA,MAAA,EAAA,CAAA,ktCAAA,CAAA,EAAA;iVA+B6C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhEjG;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-charts-heatmap-chart.mjs","sources":["../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.config.ts","../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.component.ts","../../../../packages/charts/heatmap-chart/src/lib/heatmap-chart.component.html","../../../../packages/charts/heatmap-chart/src/acorex-charts-heatmap-chart.ts"],"sourcesContent":["import { AX_CHART_DEFAULT_MESSAGES } from '@acorex/charts';\nimport { InjectionToken } from '@angular/core';\nimport { AXHeatmapChartOption } from './heatmap-chart.type';\n\nexport const AXHeatmapChartDefaultConfig: AXHeatmapChartOption = {\n margin: { top: 30, right: 30, bottom: 60, left: 60 },\n color: 'rgb(var(--ax-sys-color-primary-500))',\n cellPadding: 0.05,\n borderRadius: 2,\n showXAxis: true,\n showYAxis: true,\n rotateXAxisLabels: 'auto',\n showTooltip: true,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n messages: {\n ...AX_CHART_DEFAULT_MESSAGES,\n noDataIcon: 'fa-light fa-grid-2',\n },\n};\n\nexport const AX_HEATMAP_CHART_CONFIG = new InjectionToken<AXHeatmapChartOption>('AX_HEATMAP_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => AXHeatmapChartDefaultConfig,\n});\n","import {\n AXChartComponent,\n computeTooltipPosition,\n getEasingFunction,\n mergeChartMessages,\n mergeChartOptions,\n resolveCssColorInContext,\n} from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n afterNextRender,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { map, Subscription } from 'rxjs';\nimport { AX_HEATMAP_CHART_CONFIG } from './heatmap-chart.config';\nimport { AXHeatmapChartOption, AXHeatmapData } from './heatmap-chart.type';\n\n@Component({\n selector: 'ax-heatmap-chart',\n templateUrl: './heatmap-chart.component.html',\n styleUrls: ['./heatmap-chart.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [AXChartTooltipComponent],\n})\nexport class AXHeatmapChartComponent extends AXChartComponent implements OnDestroy {\n /** Fixed `viewBox` side; chart scales with CSS `width` / `height` on the host container. */\n private static readonly VIEW_BOX_SIZE = 400;\n\n // X-axis layout (aligned with bar-chart heuristics)\n private readonly CHAR_WIDTH_RATIO = 0.65;\n private readonly ROTATION_TOLERANCE_SMALL_DATASET = 1.4;\n private readonly SMALL_DATASET_THRESHOLD = 6;\n private readonly MANY_ITEMS_THRESHOLD = 20;\n private readonly VERY_MANY_ITEMS_THRESHOLD = 50;\n private readonly MAX_LABEL_LENGTH = 20;\n private readonly TICK_AREA_PADDING = 6;\n private readonly X_AXIS_TITLE_GAP = 10;\n private readonly X_AXIS_TITLE_FONT_SIZE = 14;\n private readonly MIN_FONT_SIZE_X_AXIS = 8;\n private readonly MAX_FONT_SIZE_X_AXIS = 14;\n\n // Inject config at the top level\n private readonly defaultConfig = inject(AX_HEATMAP_CHART_CONFIG);\n\n // Inputs\n data = input<AXHeatmapData[]>([]);\n options = input<AXHeatmapChartOption>({});\n\n // Outputs\n /** Emitted when a heatmap cell is clicked */\n cellClick = output<AXHeatmapData>();\n\n // View Child\n private readonly containerRef = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // Internal State\n private svg: any;\n protected d3: any;\n private _d3Ready = signal(false);\n private platformService = inject(AXPlatform);\n protected isRtl = signal(this.platformService.isRtl());\n private directionSub?: Subscription;\n\n // Tooltip State\n protected tooltipVisible = signal(false);\n protected tooltipPosition = signal({ x: 0, y: 0 });\n protected tooltipData = signal<AXChartTooltipData>({ title: '', value: '' });\n private _tooltipRafId: number | null = null;\n\n // Computed options (referencing the already injected defaultConfig)\n protected effectiveOptions = computed(() => mergeChartOptions(this.defaultConfig, this.options()));\n\n protected effectiveMessages = computed(() =>\n mergeChartMessages(this.defaultConfig.messages, this.options()?.messages),\n );\n\n constructor() {\n super();\n\n afterNextRender(() => {\n this.init();\n this.directionSub = this.platformService.directionChange.pipe(map((i) => i.data === 'rtl')).subscribe((isRtl) => {\n this.isRtl.set(isRtl);\n if (this._d3Ready()) {\n this.renderChart();\n }\n });\n });\n\n // Reactive render when data, options, or D3 readiness change\n effect(() => {\n this.data();\n this.effectiveOptions();\n if (this._d3Ready()) {\n this.renderChart();\n }\n });\n }\n\n private async init() {\n try {\n this.d3 = await import('d3');\n\n this._d3Ready.set(true);\n } catch (err) {\n console.error('Heatmap: Initialization failed', err);\n }\n }\n\n public updateChart(): void {\n this.renderChart();\n }\n\n private renderChart() {\n const container = this.containerRef().nativeElement;\n const data = this.data() || [];\n\n // Clear SVG if data is empty\n if (data.length === 0) {\n if (this.svg) this.svg.remove();\n this.svg = null;\n return;\n }\n\n const options = this.effectiveOptions();\n const width = AXHeatmapChartComponent.VIEW_BOX_SIZE;\n const height = AXHeatmapChartComponent.VIEW_BOX_SIZE;\n const isRtl = this.isRtl();\n const baseMargin = options.margin || { top: 20, right: 20, bottom: 40, left: 40 };\n // When rendering RTL, the Y axis is on the right; swap side margins so tick labels\n // have the same breathing room they get on the left in LTR.\n let margin = isRtl\n ? { top: baseMargin.top, right: baseMargin.left, bottom: baseMargin.bottom, left: baseMargin.right }\n : { ...baseMargin };\n\n const xKeys = Array.from(new Set(data.map((d) => d.x.toString())));\n const yKeys = Array.from(new Set(data.map((d) => d.y.toString())));\n\n let innerWidth = width - margin.left - margin.right;\n const cellPad = options.cellPadding ?? 0;\n const xScaleProbe = this.d3\n .scaleBand()\n .domain(xKeys)\n .range(isRtl ? [innerWidth, 0] : [0, innerWidth])\n .padding(cellPad);\n\n const xTickFontSize = this.getHeatmapXTickFontSize(innerWidth, xKeys.length);\n const { tickXKeys, formatXTick } = this.getHeatmapXTickPlan(xKeys);\n const longestXLabel = xKeys.reduce((acc, k) => {\n const t = formatXTick(k);\n return t.length > acc.length ? t : acc;\n }, '');\n const estimatedLabelWidth = longestXLabel.length * xTickFontSize * this.CHAR_WIDTH_RATIO;\n const step = xScaleProbe.step();\n const rotateX = this.shouldRotateHeatmapXLabels(options.rotateXAxisLabels, estimatedLabelWidth, step, xKeys.length);\n\n const tickAreaHeight = rotateX\n ? estimatedLabelWidth * Math.SQRT1_2 + xTickFontSize * Math.SQRT1_2 + this.TICK_AREA_PADDING\n : xTickFontSize + this.TICK_AREA_PADDING + 2;\n\n const xAxisTitleReserve = options.xAxisLabel?.trim() ? this.X_AXIS_TITLE_GAP + 16 : 0;\n margin = { ...margin, bottom: Math.max(margin.bottom, tickAreaHeight + xAxisTitleReserve) };\n\n innerWidth = width - margin.left - margin.right;\n const innerHeight = Math.max(1, height - margin.top - margin.bottom);\n\n // Create/Select SVG root\n if (!this.svg) {\n this.svg = this.d3\n .select(container)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('preserveAspectRatio', 'xMidYMid meet')\n .style('display', 'block');\n this.svg.append('g').attr('class', 'chart-group');\n }\n\n this.svg.attr('viewBox', `0 0 ${width} ${height}`);\n const g = this.svg.select('.chart-group').attr('transform', `translate(${margin.left},${margin.top})`);\n\n // --- Scales ---\n const xScale = this.d3\n .scaleBand()\n .domain(xKeys)\n .range(isRtl ? [innerWidth, 0] : [0, innerWidth])\n .padding(cellPad);\n const yScale = this.d3.scaleBand().domain(yKeys).range([innerHeight, 0]).padding(cellPad);\n\n const valueExtent = this.d3.extent(data, (d: any) => d.value) as [number, number];\n const minValue = Number.isFinite(valueExtent[0]) ? valueExtent[0] : 0;\n const maxValue = Number.isFinite(valueExtent[1]) ? valueExtent[1] : minValue + 1;\n const palette = options.colors?.filter(Boolean) ?? [];\n const baseColor = options.color ?? 'rgb(99, 102, 241)';\n const rangeMin = options.valueRange?.min ?? minValue;\n const rangeMax = options.valueRange?.max ?? maxValue;\n\n const resolvedColorCache = new Map<string, string>();\n const resolvePaletteColor = (c: string): string => {\n const hit = resolvedColorCache.get(c);\n if (hit !== undefined) return hit;\n const out = resolveCssColorInContext(container, c);\n resolvedColorCache.set(c, out);\n return out;\n };\n const resolvedBase = resolvePaletteColor(baseColor);\n\n const getCellColor = (d: AXHeatmapData): string => {\n // If a palette is provided, choose a stable \"random\" color per cell.\n if (palette.length > 0) {\n const key = `${d.x}-${d.y}`;\n const idx = this.hashStringToUint32(key) % palette.length;\n return resolvePaletteColor(palette[idx] ?? baseColor);\n }\n\n const span = rangeMax - rangeMin;\n const t = span === 0 ? 1 : (d.value - rangeMin) / span;\n const clamped = Math.max(0, Math.min(1, t));\n return this.applyIntensityToResolvedRgb(resolvedBase, clamped);\n };\n\n // --- Axes ---\n const xAxisBuilder = this.d3\n .axisBottom(xScale)\n .tickSize(0)\n .tickFormat((d: string | number) => formatXTick(String(d)));\n if (tickXKeys.length < xKeys.length) {\n xAxisBuilder.tickValues(tickXKeys);\n }\n\n this.drawAxis(g, 'x-axis', xAxisBuilder, 0, innerHeight, options.showXAxis, isRtl);\n g.select('.x-axis').attr('direction', 'ltr');\n this.styleHeatmapXAxisTicks(g, xTickFontSize, rotateX);\n\n if (isRtl) {\n this.drawAxis(g, 'y-axis', this.d3.axisRight(yScale).tickSize(0), innerWidth, 0, options.showYAxis, isRtl);\n } else {\n this.drawAxis(g, 'y-axis', this.d3.axisLeft(yScale).tickSize(0), 0, 0, options.showYAxis, isRtl);\n }\n this.drawAxisLabels(g, innerWidth, innerHeight, options, isRtl, tickAreaHeight);\n\n // --- Cells with Data Join ---\n const easing = getEasingFunction(this.d3, options.animationEasing);\n\n g.selectAll('.cell')\n .data(data, (d: any) => `${d.x}-${d.y}`)\n .join(\n (enter: any) => enter.append('rect').attr('class', 'cell').attr('opacity', 0).attr('fill', resolvedBase),\n (update: any) => update,\n (exit: any) => exit.transition().duration(200).attr('opacity', 0).remove(),\n )\n .on('mouseenter', (event: any, d: AXHeatmapData) => this.showTooltip(event, d, getCellColor(d)))\n .on('mousemove', (event: any) => this.updateTooltipPos(event))\n .on('click', (_event: any, d: AXHeatmapData) => this.cellClick.emit(d))\n .on('mouseleave', () => this.hideTooltip())\n .transition()\n .duration(options.animationDuration)\n .ease(easing)\n .attr('x', (d: any) => xScale(d.x.toString()))\n .attr('y', (d: any) => yScale(d.y.toString()))\n .attr('width', xScale.bandwidth())\n .attr('height', yScale.bandwidth())\n .attr('rx', options.borderRadius)\n .attr('ry', options.borderRadius)\n .attr('opacity', 1)\n .style('fill', (d: AXHeatmapData) => getCellColor(d));\n }\n\n private hashStringToUint32(input: string): number {\n // Simple, fast, deterministic hash (djb2 variant)\n let hash = 5381;\n for (let i = 0; i < input.length; i++) {\n hash = (hash * 33) ^ input.charCodeAt(i);\n }\n return hash >>> 0;\n }\n\n /** `resolvedRgb` must be a computed `rgb()` / `rgba()` string (e.g. from {@link resolveCssColorInContext}). */\n private applyIntensityToResolvedRgb(resolvedRgb: string, t: number): string {\n const clamped = Math.max(0, Math.min(1, t));\n const parsed = this.d3.color(resolvedRgb);\n if (!parsed) return resolvedRgb;\n const rgb = this.d3.rgb(parsed);\n const minOpacity = 0.12;\n const opacity = minOpacity + clamped * (1 - minOpacity);\n return `rgba(${Math.round(rgb.r)},${Math.round(rgb.g)},${Math.round(rgb.b)},${opacity})`;\n }\n\n private drawAxis(g: any, className: string, axisFn: any, x: number, y: number, visible = true, isRtl = false) {\n let axisG = g.select(`.${className}`);\n if (axisG.empty()) axisG = g.append('g').attr('class', className);\n\n axisG\n .attr('transform', `translate(${x},${y})`)\n .style('display', visible ? 'block' : 'none')\n .call(axisFn)\n .call((g: any) => g.select('.domain').remove());\n\n // Ensure tick labels don't overlap the plot in RTL.\n // `text-anchor` is logical (depends on `direction`), so we set both explicitly.\n axisG.attr('direction', isRtl ? 'rtl' : 'ltr');\n axisG\n .selectAll('.tick text')\n .style('fill', 'rgba(var(--ax-comp-heatmap-chart-labels-color), 0.7)')\n .style('font-weight', '400');\n if (className === 'y-axis') {\n axisG.selectAll('.tick text').attr('text-anchor', 'end');\n }\n\n axisG.selectAll('line, path').style('stroke', 'rgba(var(--ax-comp-heatmap-chart-axis-color), 0.2)');\n }\n\n private showTooltip(event: MouseEvent, item: AXHeatmapData, color: string) {\n if (!this.effectiveOptions().showTooltip) return;\n this.tooltipData.set({\n title: `${item.x} / ${item.y}`,\n value: item.label || item.value.toLocaleString(),\n color: color,\n });\n this.tooltipVisible.set(true);\n this.updateTooltipPos(event);\n }\n\n private updateTooltipPos(event: MouseEvent) {\n if (this._tooltipRafId) cancelAnimationFrame(this._tooltipRafId);\n this.scheduleTooltipPosition(event, 0);\n }\n\n private scheduleTooltipPosition(event: MouseEvent, attempt: number) {\n this._tooltipRafId = requestAnimationFrame(() => {\n const containerEl = this.containerRef().nativeElement;\n const tooltipEl = containerEl.querySelector('.chart-tooltip') as HTMLElement | null;\n if (!tooltipEl && this.tooltipVisible() && attempt < 3) {\n this.scheduleTooltipPosition(event, attempt + 1);\n return;\n }\n\n this._tooltipRafId = null;\n const rect = containerEl.getBoundingClientRect();\n const tooltipRect = tooltipEl?.getBoundingClientRect() ?? null;\n const pos = computeTooltipPosition(rect, tooltipRect, event.clientX + 10, event.clientY - 10, 10);\n this.tooltipPosition.set(pos);\n });\n }\n\n private hideTooltip() {\n this.tooltipVisible.set(false);\n }\n\n ngOnDestroy(): void {\n this.directionSub?.unsubscribe();\n this.svg?.remove();\n if (this._tooltipRafId) cancelAnimationFrame(this._tooltipRafId);\n }\n\n private drawAxisLabels(\n g: any,\n innerWidth: number,\n innerHeight: number,\n options: AXHeatmapChartOption,\n isRtl: boolean,\n xTickAreaHeight: number,\n ) {\n const xText = options.xAxisLabel?.trim();\n const yText = options.yAxisLabel?.trim();\n\n const labels = g.selectAll('.axis-labels').data([0]).join('g').attr('class', 'axis-labels');\n\n labels\n .selectAll('.ax-heatmap-chart-axis-label-x')\n .data(xText ? [xText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'ax-heatmap-chart-axis-label ax-heatmap-chart-axis-label-x'),\n (update: any) => update,\n (exit: any) => exit.remove(),\n )\n .attr('x', innerWidth / 2)\n .attr('y', innerHeight + xTickAreaHeight + (xText ? this.X_AXIS_TITLE_GAP : 0))\n .attr('text-anchor', 'middle')\n .attr('direction', 'ltr')\n .style('font-size', `${this.X_AXIS_TITLE_FONT_SIZE}px`)\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-heatmap-chart-axis-label-color))')\n .text((d: string) => d);\n\n const yX = isRtl ? innerWidth + 46 : -46;\n labels\n .selectAll('.ax-heatmap-chart-axis-label-y')\n .data(yText ? [yText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'ax-heatmap-chart-axis-label ax-heatmap-chart-axis-label-y'),\n (update: any) => update,\n (exit: any) => exit.remove(),\n )\n .attr('transform', `translate(${yX}, ${innerHeight / 2}) rotate(-90)`)\n .attr('text-anchor', 'middle')\n .style('font-size', `${this.X_AXIS_TITLE_FONT_SIZE}px`)\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-heatmap-chart-axis-label-color))')\n .text((d: string) => d);\n }\n\n private getHeatmapXTickFontSize(innerWidth: number, itemCount: number): number {\n const baseSize = Math.round(innerWidth / 50);\n let adjustedSize = baseSize;\n if (itemCount > this.VERY_MANY_ITEMS_THRESHOLD) {\n adjustedSize = Math.round(baseSize * 0.7);\n } else if (itemCount > this.MANY_ITEMS_THRESHOLD) {\n adjustedSize = Math.round(baseSize * 0.85);\n }\n return Math.max(this.MIN_FONT_SIZE_X_AXIS, Math.min(this.MAX_FONT_SIZE_X_AXIS, adjustedSize));\n }\n\n private getHeatmapXTickPlan(xKeys: string[]): { tickXKeys: string[]; formatXTick: (d: string) => string } {\n const n = xKeys.length;\n const maxLabelLength = n > this.MANY_ITEMS_THRESHOLD ? 10 : this.MAX_LABEL_LENGTH;\n let tickXKeys = xKeys;\n if (n > this.VERY_MANY_ITEMS_THRESHOLD) {\n tickXKeys = xKeys.filter((_, i) => i % 5 === 0);\n } else if (n > this.MANY_ITEMS_THRESHOLD) {\n tickXKeys = xKeys.filter((_, i) => i % 2 === 0);\n }\n const formatXTick = (d: string) => this.truncateHeatmapLabel(d, maxLabelLength);\n return { tickXKeys, formatXTick };\n }\n\n private truncateHeatmapLabel(label: string, maxLength: number): string {\n if (label.length <= maxLength) return label;\n if (maxLength <= 1) return '…';\n return `${label.substring(0, maxLength - 1)}…`;\n }\n\n private shouldRotateHeatmapXLabels(\n rotateOption: boolean | 'auto' | undefined,\n estimatedLabelWidth: number,\n step: number,\n domainCount: number,\n ): boolean {\n if (rotateOption === true) return true;\n if (rotateOption === false) return false;\n if (domainCount === 0) return false;\n if (domainCount <= this.SMALL_DATASET_THRESHOLD) {\n return estimatedLabelWidth > step * this.ROTATION_TOLERANCE_SMALL_DATASET;\n }\n return estimatedLabelWidth > step;\n }\n\n private styleHeatmapXAxisTicks(g: any, fontSize: number, rotated: boolean): void {\n const texts = g\n .select('.x-axis')\n .selectAll('.tick text')\n .style('font-size', `${fontSize}px`)\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-heatmap-chart-labels-color), 0.7)')\n .attr('direction', 'ltr');\n\n if (rotated) {\n texts.attr('transform', 'rotate(-45)').style('text-anchor', 'end').attr('dx', '-0.8em').attr('dy', '0.15em');\n } else {\n texts.attr('transform', null).style('text-anchor', 'middle').attr('dx', null).attr('dy', '0.71em');\n }\n }\n\n // RTL is tracked via AXPlatform.directionChange\n}\n","<div class=\"ax-heatmap-chart-container\" role=\"img\" #chartContainer>\n <ax-chart-tooltip [data]=\"tooltipData()\" [position]=\"tooltipPosition()\" [visible]=\"tooltipVisible()\">\n </ax-chart-tooltip>\n @if (data()?.length === 0) {\n <div class=\"ax-chart-empty\">\n <div class=\"ax-chart-empty__card\">\n <div class=\"ax-chart-empty__icon\">\n <i [class]=\"effectiveMessages().noDataIcon + ' fa-2x'\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"ax-chart-empty__title\">{{ effectiveMessages().noData }}</div>\n <div class=\"ax-chart-empty__help\">{{ effectiveMessages().noDataHelp }}</div>\n </div>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,2BAA2B,GAAyB;AAC/D,IAAA,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AACpD,IAAA,KAAK,EAAE,sCAAsC;AAC7C,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,iBAAiB,EAAE,MAAM;AACzB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,iBAAiB,EAAE,GAAG;AACtB,IAAA,eAAe,EAAE,WAAW;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,GAAG,yBAAyB;AAC5B,QAAA,UAAU,EAAE,oBAAoB;AACjC,KAAA;;MAGU,uBAAuB,GAAG,IAAI,cAAc,CAA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uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,iBAGb,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,irBAAA,EAAA,MAAA,EAAA,CAAA,ktCAAA,CAAA,EAAA;iVA+B6C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhEjG;;AAEG;;;;"}
@@ -163,50 +163,42 @@ function resolveCssColorInContext(scopeElement, cssColor) {
163
163
  * considering available space in all directions and preventing overflow.
164
164
  */
165
165
  function computeTooltipPosition(containerRect, tooltipRect, clientX, clientY, gap) {
166
- const cursorX = clientX - containerRect.left;
167
- const cursorY = clientY - containerRect.top;
166
+ const containerLeft = containerRect.left;
167
+ const containerTop = containerRect.top;
168
+ const containerRight = containerRect.right;
169
+ const containerBottom = containerRect.bottom;
168
170
  if (!tooltipRect) {
169
171
  return {
170
- x: Math.min(cursorX + gap, containerRect.width - gap),
171
- y: Math.max(gap, Math.min(cursorY, containerRect.height - gap)),
172
+ x: Math.min(clientX + gap, containerRight - gap),
173
+ y: Math.max(containerTop + gap, Math.min(clientY + gap, containerBottom - gap)),
172
174
  };
173
175
  }
174
- // Calculate available space in each direction
175
- const spaceRight = containerRect.width - cursorX;
176
- const spaceLeft = cursorX;
177
- const spaceBelow = containerRect.height - cursorY;
178
- const spaceAbove = cursorY;
179
- // Determine best horizontal position
176
+ const spaceRight = containerRight - clientX;
177
+ const spaceLeft = clientX - containerLeft;
178
+ const spaceBelow = containerBottom - clientY;
179
+ const spaceAbove = clientY - containerTop;
180
180
  let x;
181
181
  if (spaceRight >= tooltipRect.width + gap) {
182
- // Position to the right of cursor
183
- x = cursorX + gap;
182
+ x = clientX + gap;
184
183
  }
185
184
  else if (spaceLeft >= tooltipRect.width + gap) {
186
- // Position to the left of cursor
187
- x = cursorX - tooltipRect.width - gap;
185
+ x = clientX - tooltipRect.width - gap;
188
186
  }
189
187
  else {
190
- // Center horizontally if neither side has enough space
191
- x = Math.max(gap, Math.min((containerRect.width - tooltipRect.width) / 2, containerRect.width - tooltipRect.width - gap));
188
+ x = Math.max(containerLeft + gap, Math.min(containerLeft + (containerRect.width - tooltipRect.width) / 2, containerRight - tooltipRect.width - gap));
192
189
  }
193
- // Determine best vertical position
194
190
  let y;
195
191
  if (spaceBelow >= tooltipRect.height + gap) {
196
- // Position below cursor
197
- y = cursorY + gap;
192
+ y = clientY + gap;
198
193
  }
199
194
  else if (spaceAbove >= tooltipRect.height + gap) {
200
- // Position above cursor
201
- y = cursorY - tooltipRect.height - gap;
195
+ y = clientY - tooltipRect.height - gap;
202
196
  }
203
197
  else {
204
- // Center vertically if neither direction has enough space
205
- y = Math.max(gap, Math.min((containerRect.height - tooltipRect.height) / 2, containerRect.height - tooltipRect.height - gap));
198
+ y = Math.max(containerTop + gap, Math.min(containerTop + (containerRect.height - tooltipRect.height) / 2, containerBottom - tooltipRect.height - gap));
206
199
  }
207
- // Ensure tooltip stays within container bounds
208
- x = Math.max(gap, Math.min(x, containerRect.width - tooltipRect.width - gap));
209
- y = Math.max(gap, Math.min(y, containerRect.height - tooltipRect.height - gap));
200
+ x = Math.max(containerLeft + gap, Math.min(x, containerRight - tooltipRect.width - gap));
201
+ y = Math.max(containerTop + gap, Math.min(y, containerBottom - tooltipRect.height - gap));
210
202
  return { x, y };
211
203
  }
212
204
  function mapEasingName(option) {
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/lib/chart-colors.ts","../../../../packages/charts/src/lib/chart-component-base.ts","../../../../packages/charts/src/lib/chart-empty-state.ts","../../../../packages/charts/src/lib/chart-messages.ts","../../../../packages/charts/src/lib/chart-utils.ts","../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n// Default color palette for charts\nexport const AX_CHART_COLOR_PALETTE = new InjectionToken<string[]>(\n 'AX_CHART_COLOR_PALETTE',\n {\n providedIn: 'root',\n factory: () => [\n '#FF6B6B', // Vibrant Red\n '#4ECDC4', // Electric Teal\n '#45B7D1', // Bright Blue\n '#96CEB4', // Fresh Green\n '#FFEEAD', // Bright Yellow\n '#D4A5A5', // Rose Pink\n '#9B59B6', // Rich Purple\n '#3498DB', // Deep Blue\n '#E67E22', // Bright Orange\n '#2ECC71', // Emerald Green\n '#E74C3C', // Cherry Red\n '#1ABC9C', // Turquoise\n '#F1C40F', // Golden Yellow\n '#8E44AD', // Deep Purple\n '#16A085', // Dark Teal\n\n // --- Extended Colors (new) ---\n '#27AE60', // Forest Green\n '#2980B9', // Strong Blue\n '#F39C12', // Vivid Orange\n '#C0392B', // Dark Red\n '#7D3C98', // Plum Purple\n '#2C3E50', // Midnight Blue\n '#D35400', // Burnt Orange\n '#BDC3C7', // Soft Silver\n '#34495E', // Slate Gray\n '#1F618D', // Royal Blue\n '#58D68D', // Mint Green\n '#5DADE2', // Sky Blue\n '#F1948A', // Soft Coral\n '#A569BD', // Lavender Purple\n '#F8C471', // Warm Gold\n ],\n }\n);\n\n\n/**\n * Helper function to get a color from the palette by index\n * @param index The index of the color to get\n * @param palette The color palette to use\n * @returns The color at the specified index\n */\nexport function getChartColor(index: number, palette: string[]): string {\n return palette[index % palette.length];\n}\n","import { afterNextRender, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Base component class for all chart components\n * Copied from @acorex/cdk/common NXComponent to remove external dependency\n */\n@Directive()\nexport abstract class AXChartComponent {\n #elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n #isRendered = signal(false);\n\n protected isRendered = this.#isRendered.asReadonly();\n\n #afterNextRender = afterNextRender(() => {\n if (!this.isRendered()) {\n this.nativeElement['__axContext__'] = this;\n this.#isRendered.set(true);\n }\n });\n\n /**\n * Gets the native HTML element of the component\n */\n public get nativeElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n /**\n * Gets the host HTML element of the component (alias for nativeElement)\n * @returns T - The native DOM element associated with this component\n */\n public getHostElement<T = HTMLElement>(): T {\n return this.#elementRef.nativeElement as T;\n }\n}\n","export interface AXChartEmptyMessageContent {\n icon: string;\n title: string;\n help?: string;\n}\n\n/**\n * Renders a centered empty-state message inside a chart container.\n * Clears prior SVG / empty-state nodes; leaves Angular tooltip hosts alone.\n */\nexport function renderChartEmptyMessage(\n d3: { select: (node: HTMLElement) => D3EmptySelection },\n container: HTMLElement,\n message: AXChartEmptyMessageContent,\n): void {\n const root = d3.select(container);\n root.selectAll('svg, .ax-chart-empty').remove();\n\n const card = root.append('div').attr('class', 'ax-chart-empty').append('div').attr('class', 'ax-chart-empty__card');\n\n card\n .append('div')\n .attr('class', 'ax-chart-empty__icon')\n .html(`<i class=\"${message.icon} fa-2x\" aria-hidden=\"true\"></i>`);\n\n card.append('div').attr('class', 'ax-chart-empty__title').text(message.title);\n\n if (message.help) {\n card.append('div').attr('class', 'ax-chart-empty__help').text(message.help);\n }\n}\n\n/** Minimal D3 selection surface used by empty-state rendering. */\ninterface D3EmptySelection {\n selectAll: (selector: string) => { remove: () => unknown };\n append: (tag: string) => D3EmptyAppend;\n}\n\ninterface D3EmptyAppend {\n attr: (name: string, value: string) => D3EmptyAppend;\n append: (tag: string) => D3EmptyAppend;\n html: (value: string) => D3EmptyAppend;\n text: (value: string) => D3EmptyAppend;\n}\n","/**\n * Shared empty-state copy for all charts.\n * Per-chart configs may override icons; default title/help stay consistent.\n */\nexport interface AXChartMessages {\n noData?: string;\n noDataHelp?: string;\n allHidden?: string;\n allHiddenHelp?: string;\n noDataIcon?: string;\n allHiddenIcon?: string;\n}\n\nexport const AX_CHART_DEFAULT_MESSAGES: Required<AXChartMessages> = {\n noData: 'No data available',\n noDataHelp: 'Please provide data to display the chart',\n allHidden: 'All series are hidden',\n allHiddenHelp: 'Click on legend items to show them',\n noDataIcon: 'fa-light fa-chart-simple',\n allHiddenIcon: 'fa-light fa-eye-slash',\n};\n\nexport function mergeChartMessages(\n defaults: AXChartMessages = {},\n overrides?: AXChartMessages,\n): Required<AXChartMessages> {\n return {\n ...AX_CHART_DEFAULT_MESSAGES,\n ...defaults,\n ...overrides,\n };\n}\n\n/** Shallow merge options while preserving nested margin/messages defaults. */\nexport function mergeChartOptions<T extends object>(defaults: T, options?: Partial<T> | null): T {\n const opts = (options ?? {}) as Partial<T>;\n const result = { ...defaults, ...opts } as T & {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n const defaultRecord = defaults as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n const optionRecord = opts as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n if (defaultRecord.messages || optionRecord.messages) {\n result.messages = mergeChartMessages(defaultRecord.messages, optionRecord.messages);\n }\n if (defaultRecord.margins || optionRecord.margins) {\n result.margins = { ...defaultRecord.margins, ...optionRecord.margins };\n }\n if (defaultRecord.margin || optionRecord.margin) {\n result.margin = { ...defaultRecord.margin, ...optionRecord.margin };\n }\n\n return result;\n}\n","export type TooltipPosition = { x: number; y: number };\n\n/**\n * Resolves any CSS `<color>` the browser understands — including\n * `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed\n * `rgb()` / `rgba()` string, using the cascade from `scopeElement` (e.g. the chart\n * container) so design tokens on ancestors apply.\n */\nexport function resolveCssColorInContext(scopeElement: HTMLElement, cssColor: string): string {\n if (typeof window === 'undefined' || typeof document === 'undefined' || !getComputedStyle) {\n return cssColor;\n }\n const input = cssColor?.trim();\n if (!input) {\n return cssColor;\n }\n\n const probe = document.createElement('span');\n probe.style.cssText =\n 'position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;';\n probe.style.color = input;\n scopeElement.appendChild(probe);\n void probe.offsetHeight;\n const resolved = getComputedStyle(probe).color;\n probe.remove();\n\n return resolved || cssColor;\n}\n\n/**\n * Compute edge-aware tooltip position with intelligent placement,\n * considering available space in all directions and preventing overflow.\n */\nexport function computeTooltipPosition(\n containerRect: DOMRect,\n tooltipRect: DOMRect | null,\n clientX: number,\n clientY: number,\n gap: number,\n): TooltipPosition {\n const cursorX = clientX - containerRect.left;\n const cursorY = clientY - containerRect.top;\n\n if (!tooltipRect) {\n return {\n x: Math.min(cursorX + gap, containerRect.width - gap),\n y: Math.max(gap, Math.min(cursorY, containerRect.height - gap)),\n };\n }\n\n // Calculate available space in each direction\n const spaceRight = containerRect.width - cursorX;\n const spaceLeft = cursorX;\n const spaceBelow = containerRect.height - cursorY;\n const spaceAbove = cursorY;\n\n // Determine best horizontal position\n let x: number;\n if (spaceRight >= tooltipRect.width + gap) {\n // Position to the right of cursor\n x = cursorX + gap;\n } else if (spaceLeft >= tooltipRect.width + gap) {\n // Position to the left of cursor\n x = cursorX - tooltipRect.width - gap;\n } else {\n // Center horizontally if neither side has enough space\n x = Math.max(\n gap,\n Math.min((containerRect.width - tooltipRect.width) / 2, containerRect.width - tooltipRect.width - gap),\n );\n }\n\n // Determine best vertical position\n let y: number;\n if (spaceBelow >= tooltipRect.height + gap) {\n // Position below cursor\n y = cursorY + gap;\n } else if (spaceAbove >= tooltipRect.height + gap) {\n // Position above cursor\n y = cursorY - tooltipRect.height - gap;\n } else {\n // Center vertically if neither direction has enough space\n y = Math.max(\n gap,\n Math.min((containerRect.height - tooltipRect.height) / 2, containerRect.height - tooltipRect.height - gap),\n );\n }\n\n // Ensure tooltip stays within container bounds\n x = Math.max(gap, Math.min(x, containerRect.width - tooltipRect.width - gap));\n y = Math.max(gap, Math.min(y, containerRect.height - tooltipRect.height - gap));\n\n return { x, y };\n}\n\n/**\n * Map easing option to d3 easing function name that callers can lookup on d3.\n * Keeps mapping consistent across charts.\n */\nexport type D3EasingName =\n | 'easeLinear'\n | 'easePolyInOut'\n | 'easePolyIn'\n | 'easePolyOut'\n | 'easeCubic'\n | 'easeCubicIn'\n | 'easeCubicOut'\n | 'easeCubicInOut';\n\nexport function mapEasingName(option?: string): D3EasingName {\n switch (option) {\n case 'linear':\n return 'easeLinear';\n case 'ease':\n return 'easePolyInOut';\n case 'ease-in':\n return 'easePolyIn';\n case 'ease-out':\n return 'easePolyOut';\n case 'ease-in-out':\n return 'easePolyInOut';\n case 'cubic':\n return 'easeCubic';\n case 'cubic-in':\n return 'easeCubicIn';\n case 'cubic-out':\n return 'easeCubicOut';\n case 'cubic-in-out':\n return 'easeCubicInOut';\n default:\n return 'easeCubicOut';\n }\n}\n\n/**\n * Formats large numbers with abbreviations (K, M, B, T)\n */\nexport function formatLargeNumber(value: number): string {\n if (value === 0) return '0';\n\n const absValue = Math.abs(value);\n const sign = value < 0 ? '-' : '';\n\n if (absValue >= 1e12) {\n return `${sign}${(absValue / 1e12).toFixed(1)}T`;\n }\n if (absValue >= 1e9) {\n return `${sign}${(absValue / 1e9).toFixed(1)}B`;\n }\n if (absValue >= 1e6) {\n return `${sign}${(absValue / 1e6).toFixed(1)}M`;\n }\n if (absValue >= 1e3) {\n return `${sign}${(absValue / 1e3).toFixed(1)}K`;\n }\n\n return value.toLocaleString();\n}\n\n/**\n * Returns a D3 easing function for the provided option.\n */\nexport function getEasingFunction(d3: typeof import('d3'), option?: string): (t: number) => number {\n const name = mapEasingName(option);\n const easing = (d3 as any)[name];\n return typeof easing === 'function' ? easing : (d3 as any).easeCubicOut;\n}\n\n/** Unique DOM id prefix per chart instance (SVG filters/gradients). */\nexport function createChartInstanceId(prefix = 'ax-chart'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\n/**\n * Normalizes barWidth: values > 1 are treated as 0–100 percentages (config default 80),\n * values ≤ 1 as fractions.\n */\nexport function resolveBarWidthFraction(barWidth: number | undefined, fallbackPercent = 80): number {\n const raw = barWidth ?? fallbackPercent;\n const fraction = raw > 1 ? raw / 100 : raw;\n return Math.min(1, Math.max(0.05, fraction));\n}\n","export const AX_CHARTS = 'ACOREX_CHARTS';\nexport * from './lib/chart-base.interface';\nexport * from './lib/chart-colors';\nexport * from './lib/chart-component-base';\nexport * from './lib/chart-empty-state';\nexport * from './lib/chart-messages';\nexport * from './lib/chart-types';\nexport * from './lib/chart-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;AACb,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;;AAGT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACV,KAAA;AACF,CAAA;AAIH;;;;;AAKG;AACG,SAAU,aAAa,CAAC,KAAa,EAAE,OAAiB,EAAA;IAC5D,OAAO,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;AACxC;;ACnDA;;;AAGG;MAEmB,gBAAgB,CAAA;AACpC,IAAA,WAAW,GAA4B,MAAM,CAAC,UAAU,CAAC;IACzD,WAAW,GAAG,MAAM,CAAC,KAAK;oFAAC;AAEjB,IAAA,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE;AAEpD,IAAA,gBAAgB,GAAG,eAAe,CAAC,MAAK;AACtC,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,E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QAAQ,IAAI,eAAe;AACvC,IAAA,MAAM,QAAQ,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAC1C,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9C;;ACrLO,MAAM,SAAS,GAAG;;ACAzB;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/lib/chart-colors.ts","../../../../packages/charts/src/lib/chart-component-base.ts","../../../../packages/charts/src/lib/chart-empty-state.ts","../../../../packages/charts/src/lib/chart-messages.ts","../../../../packages/charts/src/lib/chart-utils.ts","../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n// Default color palette for charts\nexport const AX_CHART_COLOR_PALETTE = new InjectionToken<string[]>(\n 'AX_CHART_COLOR_PALETTE',\n {\n providedIn: 'root',\n factory: () => [\n '#FF6B6B', // Vibrant Red\n '#4ECDC4', // Electric Teal\n '#45B7D1', // Bright Blue\n '#96CEB4', // Fresh Green\n '#FFEEAD', // Bright Yellow\n '#D4A5A5', // Rose Pink\n '#9B59B6', // Rich Purple\n '#3498DB', // Deep Blue\n '#E67E22', // Bright Orange\n '#2ECC71', // Emerald Green\n '#E74C3C', // Cherry Red\n '#1ABC9C', // Turquoise\n '#F1C40F', // Golden Yellow\n '#8E44AD', // Deep Purple\n '#16A085', // Dark Teal\n\n // --- Extended Colors (new) ---\n '#27AE60', // Forest Green\n '#2980B9', // Strong Blue\n '#F39C12', // Vivid Orange\n '#C0392B', // Dark Red\n '#7D3C98', // Plum Purple\n '#2C3E50', // Midnight Blue\n '#D35400', // Burnt Orange\n '#BDC3C7', // Soft Silver\n '#34495E', // Slate Gray\n '#1F618D', // Royal Blue\n '#58D68D', // Mint Green\n '#5DADE2', // Sky Blue\n '#F1948A', // Soft Coral\n '#A569BD', // Lavender Purple\n '#F8C471', // Warm Gold\n ],\n }\n);\n\n\n/**\n * Helper function to get a color from the palette by index\n * @param index The index of the color to get\n * @param palette The color palette to use\n * @returns The color at the specified index\n */\nexport function getChartColor(index: number, palette: string[]): string {\n return palette[index % palette.length];\n}\n","import { afterNextRender, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Base component class for all chart components\n * Copied from @acorex/cdk/common NXComponent to remove external dependency\n */\n@Directive()\nexport abstract class AXChartComponent {\n #elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n #isRendered = signal(false);\n\n protected isRendered = this.#isRendered.asReadonly();\n\n #afterNextRender = afterNextRender(() => {\n if (!this.isRendered()) {\n this.nativeElement['__axContext__'] = this;\n this.#isRendered.set(true);\n }\n });\n\n /**\n * Gets the native HTML element of the component\n */\n public get nativeElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n /**\n * Gets the host HTML element of the component (alias for nativeElement)\n * @returns T - The native DOM element associated with this component\n */\n public getHostElement<T = HTMLElement>(): T {\n return this.#elementRef.nativeElement as T;\n }\n}\n","export interface AXChartEmptyMessageContent {\n icon: string;\n title: string;\n help?: string;\n}\n\n/**\n * Renders a centered empty-state message inside a chart container.\n * Clears prior SVG / empty-state nodes; leaves Angular tooltip hosts alone.\n */\nexport function renderChartEmptyMessage(\n d3: { select: (node: HTMLElement) => D3EmptySelection },\n container: HTMLElement,\n message: AXChartEmptyMessageContent,\n): void {\n const root = d3.select(container);\n root.selectAll('svg, .ax-chart-empty').remove();\n\n const card = root.append('div').attr('class', 'ax-chart-empty').append('div').attr('class', 'ax-chart-empty__card');\n\n card\n .append('div')\n .attr('class', 'ax-chart-empty__icon')\n .html(`<i class=\"${message.icon} fa-2x\" aria-hidden=\"true\"></i>`);\n\n card.append('div').attr('class', 'ax-chart-empty__title').text(message.title);\n\n if (message.help) {\n card.append('div').attr('class', 'ax-chart-empty__help').text(message.help);\n }\n}\n\n/** Minimal D3 selection surface used by empty-state rendering. */\ninterface D3EmptySelection {\n selectAll: (selector: string) => { remove: () => unknown };\n append: (tag: string) => D3EmptyAppend;\n}\n\ninterface D3EmptyAppend {\n attr: (name: string, value: string) => D3EmptyAppend;\n append: (tag: string) => D3EmptyAppend;\n html: (value: string) => D3EmptyAppend;\n text: (value: string) => D3EmptyAppend;\n}\n","/**\n * Shared empty-state copy for all charts.\n * Per-chart configs may override icons; default title/help stay consistent.\n */\nexport interface AXChartMessages {\n noData?: string;\n noDataHelp?: string;\n allHidden?: string;\n allHiddenHelp?: string;\n noDataIcon?: string;\n allHiddenIcon?: string;\n}\n\nexport const AX_CHART_DEFAULT_MESSAGES: Required<AXChartMessages> = {\n noData: 'No data available',\n noDataHelp: 'Please provide data to display the chart',\n allHidden: 'All series are hidden',\n allHiddenHelp: 'Click on legend items to show them',\n noDataIcon: 'fa-light fa-chart-simple',\n allHiddenIcon: 'fa-light fa-eye-slash',\n};\n\nexport function mergeChartMessages(\n defaults: AXChartMessages = {},\n overrides?: AXChartMessages,\n): Required<AXChartMessages> {\n return {\n ...AX_CHART_DEFAULT_MESSAGES,\n ...defaults,\n ...overrides,\n };\n}\n\n/** Shallow merge options while preserving nested margin/messages defaults. */\nexport function mergeChartOptions<T extends object>(defaults: T, options?: Partial<T> | null): T {\n const opts = (options ?? {}) as Partial<T>;\n const result = { ...defaults, ...opts } as T & {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n const defaultRecord = defaults as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n const optionRecord = opts as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n if (defaultRecord.messages || optionRecord.messages) {\n result.messages = mergeChartMessages(defaultRecord.messages, optionRecord.messages);\n }\n if (defaultRecord.margins || optionRecord.margins) {\n result.margins = { ...defaultRecord.margins, ...optionRecord.margins };\n }\n if (defaultRecord.margin || optionRecord.margin) {\n result.margin = { ...defaultRecord.margin, ...optionRecord.margin };\n }\n\n return result;\n}\n","export type TooltipPosition = { x: number; y: number };\n\n/**\n * Resolves any CSS `<color>` the browser understands — including\n * `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed\n * `rgb()` / `rgba()` string, using the cascade from `scopeElement` (e.g. the chart\n * container) so design tokens on ancestors apply.\n */\nexport function resolveCssColorInContext(scopeElement: HTMLElement, cssColor: string): string {\n if (typeof window === 'undefined' || typeof document === 'undefined' || !getComputedStyle) {\n return cssColor;\n }\n const input = cssColor?.trim();\n if (!input) {\n return cssColor;\n }\n\n const probe = document.createElement('span');\n probe.style.cssText =\n 'position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;';\n probe.style.color = input;\n scopeElement.appendChild(probe);\n void probe.offsetHeight;\n const resolved = getComputedStyle(probe).color;\n probe.remove();\n\n return resolved || cssColor;\n}\n\n/**\n * Compute edge-aware tooltip position with intelligent placement,\n * considering available space in all directions and preventing overflow.\n */\nexport function computeTooltipPosition(\n containerRect: DOMRect,\n tooltipRect: DOMRect | null,\n clientX: number,\n clientY: number,\n gap: number,\n): TooltipPosition {\n const containerLeft = containerRect.left;\n const containerTop = containerRect.top;\n const containerRight = containerRect.right;\n const containerBottom = containerRect.bottom;\n\n if (!tooltipRect) {\n return {\n x: Math.min(clientX + gap, containerRight - gap),\n y: Math.max(containerTop + gap, Math.min(clientY + gap, containerBottom - gap)),\n };\n }\n\n const spaceRight = containerRight - clientX;\n const spaceLeft = clientX - containerLeft;\n const spaceBelow = containerBottom - clientY;\n const spaceAbove = clientY - containerTop;\n\n let x: number;\n if (spaceRight >= tooltipRect.width + gap) {\n x = clientX + gap;\n } else if (spaceLeft >= tooltipRect.width + gap) {\n x = clientX - tooltipRect.width - gap;\n } else {\n x = Math.max(\n containerLeft + gap,\n Math.min(\n containerLeft + (containerRect.width - tooltipRect.width) / 2,\n containerRight - tooltipRect.width - gap,\n ),\n );\n }\n\n let y: number;\n if (spaceBelow >= tooltipRect.height + gap) {\n y = clientY + gap;\n } else if (spaceAbove >= tooltipRect.height + gap) {\n y = clientY - tooltipRect.height - gap;\n } else {\n y = Math.max(\n containerTop + gap,\n Math.min(\n containerTop + (containerRect.height - tooltipRect.height) / 2,\n containerBottom - tooltipRect.height - gap,\n ),\n );\n }\n\n x = Math.max(containerLeft + gap, Math.min(x, containerRight - tooltipRect.width - gap));\n y = Math.max(containerTop + gap, Math.min(y, containerBottom - tooltipRect.height - gap));\n\n return { x, y };\n}\n\n/**\n * Map easing option to d3 easing function name that callers can lookup on d3.\n * Keeps mapping consistent across charts.\n */\nexport type D3EasingName =\n | 'easeLinear'\n | 'easePolyInOut'\n | 'easePolyIn'\n | 'easePolyOut'\n | 'easeCubic'\n | 'easeCubicIn'\n | 'easeCubicOut'\n | 'easeCubicInOut';\n\nexport function mapEasingName(option?: string): D3EasingName {\n switch (option) {\n case 'linear':\n return 'easeLinear';\n case 'ease':\n return 'easePolyInOut';\n case 'ease-in':\n return 'easePolyIn';\n case 'ease-out':\n return 'easePolyOut';\n case 'ease-in-out':\n return 'easePolyInOut';\n case 'cubic':\n return 'easeCubic';\n case 'cubic-in':\n return 'easeCubicIn';\n case 'cubic-out':\n return 'easeCubicOut';\n case 'cubic-in-out':\n return 'easeCubicInOut';\n default:\n return 'easeCubicOut';\n }\n}\n\n/**\n * Formats large numbers with abbreviations (K, M, B, T)\n */\nexport function formatLargeNumber(value: number): string {\n if (value === 0) return '0';\n\n const absValue = Math.abs(value);\n const sign = value < 0 ? '-' : '';\n\n if (absValue >= 1e12) {\n return `${sign}${(absValue / 1e12).toFixed(1)}T`;\n }\n if (absValue >= 1e9) {\n return `${sign}${(absValue / 1e9).toFixed(1)}B`;\n }\n if (absValue >= 1e6) {\n return `${sign}${(absValue / 1e6).toFixed(1)}M`;\n }\n if (absValue >= 1e3) {\n return `${sign}${(absValue / 1e3).toFixed(1)}K`;\n }\n\n return value.toLocaleString();\n}\n\n/**\n * Returns a D3 easing function for the provided option.\n */\nexport function getEasingFunction(d3: typeof import('d3'), option?: string): (t: number) => number {\n const name = mapEasingName(option);\n const easing = (d3 as any)[name];\n return typeof easing === 'function' ? easing : (d3 as any).easeCubicOut;\n}\n\n/** Unique DOM id prefix per chart instance (SVG filters/gradients). */\nexport function createChartInstanceId(prefix = 'ax-chart'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\n/**\n * Normalizes barWidth: values > 1 are treated as 0–100 percentages (config default 80),\n * values ≤ 1 as fractions.\n */\nexport function resolveBarWidthFraction(barWidth: number | undefined, fallbackPercent = 80): number {\n const raw = barWidth ?? fallbackPercent;\n const fraction = raw > 1 ? raw / 100 : raw;\n return Math.min(1, Math.max(0.05, fraction));\n}\n","export const AX_CHARTS = 'ACOREX_CHARTS';\nexport * from './lib/chart-base.interface';\nexport * from './lib/chart-colors';\nexport * from './lib/chart-component-base';\nexport * from './lib/chart-empty-state';\nexport * from './lib/chart-messages';\nexport * from './lib/chart-types';\nexport * from './lib/chart-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;AACb,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;;AAGT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;A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,SAAU,iBAAiB,CAAC,EAAuB,EAAE,MAAe,EAAA;AACxE,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC;AAClC,IAAA,MAAM,MAAM,GAAI,EAAU,CAAC,IAAI,CAAC;AAChC,IAAA,OAAO,OAAO,MAAM,KAAK,UAAU,GAAG,MAAM,GAAI,EAAU,CAAC,YAAY;AACzE;AAEA;AACM,SAAU,qBAAqB,CAAC,MAAM,GAAG,UAAU,EAAA;IACvD,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAC9D;AAEA;;;AAGG;SACa,uBAAuB,CAAC,QAA4B,EAAE,eAAe,GAAG,EAAE,EAAA;AACxF,IAAA,MAAM,GAAG,GAAG,QAAQ,IAAI,eAAe;AACvC,IAAA,MAAM,QAAQ,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAC1C,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9C;;ACnLO,MAAM,SAAS,GAAG;;ACAzB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/charts",
3
- "version": "22.0.0-next.0",
3
+ "version": "22.0.0-next.2",
4
4
  "peerDependencies": {
5
5
  "d3": ">=7.9.0"
6
6
  },
@@ -240,6 +240,7 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
240
240
  */
241
241
  private handleBarHover;
242
242
  private updateTooltipPosition;
243
+ private scheduleTooltipPosition;
243
244
  /**
244
245
  * Enhanced tooltip positioning that considers chart boundaries and prevents overflow
245
246
  */
@@ -270,6 +270,7 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
270
270
  */
271
271
  private handleSegmentLeave;
272
272
  private updateTooltipPosition;
273
+ private scheduleTooltipPosition;
273
274
  /**
274
275
  * Adds center display with total value
275
276
  */
@@ -107,6 +107,7 @@ declare class AXFunnelChartComponent extends AXChartComponent implements OnDestr
107
107
  updateChart(): void;
108
108
  private showTooltip;
109
109
  private updateTooltipPosition;
110
+ private scheduleTooltipPosition;
110
111
  private hideTooltip;
111
112
  cleanupChart(): void;
112
113
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFunnelChartComponent, never>;
@@ -186,6 +186,7 @@ declare class AXGaugeChartComponent extends AXChartComponent implements OnDestro
186
186
  */
187
187
  private showSingleRangeTooltip;
188
188
  private updateTooltipPosition;
189
+ private scheduleTooltipPosition;
189
190
  /**
190
191
  * Hides the tooltip
191
192
  */
@@ -117,6 +117,7 @@ declare class AXHeatmapChartComponent extends AXChartComponent implements OnDest
117
117
  private drawAxis;
118
118
  private showTooltip;
119
119
  private updateTooltipPos;
120
+ private scheduleTooltipPosition;
120
121
  private hideTooltip;
121
122
  ngOnDestroy(): void;
122
123
  private drawAxisLabels;