@acorex/charts 21.1.0-next.1 → 22.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-charts-bar-chart.mjs +33 -19
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs +21 -13
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-tooltip.mjs +17 -11
- package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +41 -21
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-funnel-chart.mjs +25 -15
- package/fesm2022/acorex-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-gauge-chart.mjs +123 -18
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-heatmap-chart.mjs +25 -15
- package/fesm2022/acorex-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +38 -21
- package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +33 -33
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +5 -4
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-charts-gauge-chart.d.ts +23 -0
|
@@ -2,7 +2,7 @@ import { AX_CHART_DEFAULT_MESSAGES, AXChartComponent, mergeChartOptions, mergeCh
|
|
|
2
2
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
3
|
import { AXPlatform } from '@acorex/core/platform';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, inject, input, output, viewChild, signal, computed, afterNextRender, effect,
|
|
5
|
+
import { InjectionToken, inject, input, output, viewChild, signal, computed, afterNextRender, effect, ViewEncapsulation, Component } from '@angular/core';
|
|
6
6
|
import { map } from 'rxjs';
|
|
7
7
|
|
|
8
8
|
const AXHeatmapChartDefaultConfig = {
|
|
@@ -44,28 +44,38 @@ class AXHeatmapChartComponent extends AXChartComponent {
|
|
|
44
44
|
// Inject config at the top level
|
|
45
45
|
defaultConfig = inject(AX_HEATMAP_CHART_CONFIG);
|
|
46
46
|
// Inputs
|
|
47
|
-
data = input([],
|
|
48
|
-
|
|
47
|
+
data = input([], /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
49
|
+
options = input({}, /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
49
51
|
// Outputs
|
|
50
52
|
/** Emitted when a heatmap cell is clicked */
|
|
51
53
|
cellClick = output();
|
|
52
54
|
// View Child
|
|
53
|
-
containerRef = viewChild.required('chartContainer'
|
|
55
|
+
containerRef = viewChild.required('chartContainer', /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "containerRef" }] : /* istanbul ignore next */ []));
|
|
54
57
|
// Internal State
|
|
55
58
|
svg;
|
|
56
59
|
d3;
|
|
57
|
-
_d3Ready = signal(false,
|
|
60
|
+
_d3Ready = signal(false, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "_d3Ready" }] : /* istanbul ignore next */ []));
|
|
58
62
|
platformService = inject(AXPlatform);
|
|
59
|
-
isRtl = signal(this.platformService.isRtl(),
|
|
63
|
+
isRtl = signal(this.platformService.isRtl(), /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
|
|
60
65
|
directionSub;
|
|
61
66
|
// Tooltip State
|
|
62
|
-
tooltipVisible = signal(false,
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
tooltipVisible = signal(false, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "tooltipVisible" }] : /* istanbul ignore next */ []));
|
|
69
|
+
tooltipPosition = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
71
|
+
tooltipData = signal({ title: '', value: '' }, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "tooltipData" }] : /* istanbul ignore next */ []));
|
|
65
73
|
_tooltipRafId = null;
|
|
66
74
|
// Computed options (referencing the already injected defaultConfig)
|
|
67
|
-
effectiveOptions = computed(() => mergeChartOptions(this.defaultConfig, this.options()),
|
|
68
|
-
|
|
75
|
+
effectiveOptions = computed(() => mergeChartOptions(this.defaultConfig, this.options()), /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "effectiveOptions" }] : /* istanbul ignore next */ []));
|
|
77
|
+
effectiveMessages = computed(() => mergeChartMessages(this.defaultConfig.messages, this.options()?.messages), /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "effectiveMessages" }] : /* istanbul ignore next */ []));
|
|
69
79
|
constructor() {
|
|
70
80
|
super();
|
|
71
81
|
afterNextRender(() => {
|
|
@@ -389,12 +399,12 @@ class AXHeatmapChartComponent extends AXChartComponent {
|
|
|
389
399
|
texts.attr('transform', null).style('text-anchor', 'middle').attr('dx', null).attr('dy', '0.71em');
|
|
390
400
|
}
|
|
391
401
|
}
|
|
392
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
393
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXHeatmapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXHeatmapChartComponent, isStandalone: true, selector: "ax-heatmap-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cellClick: "cellClick" }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: ["@reference \"../../../../styles/themes/default.css\";@import \"../../../src/lib/chart-empty-state.css\";@layer components{ax-heatmap-chart{@apply box-border block h-full w-full;min-height:clamp(220px,38vw,360px);--ax-comp-heatmap-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-axis-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-bg-color: 0, 0, 0, 0}ax-heatmap-chart .ax-heatmap-chart-container{@apply relative box-border h-full min-h-0 w-full overflow-hidden p-4;background-color:rgba(var(--ax-comp-heatmap-chart-bg-color))}ax-heatmap-chart .ax-heatmap-chart-container svg{@apply block h-full w-full overflow-visible;}ax-heatmap-chart .ax-heatmap-chart-container svg g:has(text){font-family:inherit}ax-heatmap-chart .ax-heatmap-chart-container svg .cell{transition:stroke .15s ease}ax-heatmap-chart .ax-heatmap-chart-container svg .cell:hover{stroke:rgba(var(--ax-comp-heatmap-chart-labels-color),.6);stroke-width:2px}ax-heatmap-chart .ax-heatmap-chart-container svg line,ax-heatmap-chart .ax-heatmap-chart-container svg .domain{stroke:rgba(var(--ax-comp-heatmap-chart-axis-color),.2)}}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
394
404
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXHeatmapChartComponent, decorators: [{
|
|
396
406
|
type: Component,
|
|
397
|
-
args: [{ selector: 'ax-heatmap-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent],
|
|
407
|
+
args: [{ selector: 'ax-heatmap-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent], template: "<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", styles: ["@reference \"../../../../styles/themes/default.css\";@import \"../../../src/lib/chart-empty-state.css\";@layer components{ax-heatmap-chart{@apply box-border block h-full w-full;min-height:clamp(220px,38vw,360px);--ax-comp-heatmap-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-axis-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-heatmap-chart-bg-color: 0, 0, 0, 0}ax-heatmap-chart .ax-heatmap-chart-container{@apply relative box-border h-full min-h-0 w-full overflow-hidden p-4;background-color:rgba(var(--ax-comp-heatmap-chart-bg-color))}ax-heatmap-chart .ax-heatmap-chart-container svg{@apply block h-full w-full overflow-visible;}ax-heatmap-chart .ax-heatmap-chart-container svg g:has(text){font-family:inherit}ax-heatmap-chart .ax-heatmap-chart-container svg .cell{transition:stroke .15s ease}ax-heatmap-chart .ax-heatmap-chart-container svg .cell:hover{stroke:rgba(var(--ax-comp-heatmap-chart-labels-color),.6);stroke-width:2px}ax-heatmap-chart .ax-heatmap-chart-container svg line,ax-heatmap-chart .ax-heatmap-chart-container svg .domain{stroke:rgba(var(--ax-comp-heatmap-chart-axis-color),.2)}}\n"] }]
|
|
398
408
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], cellClick: [{ type: i0.Output, args: ["cellClick"] }], containerRef: [{ type: i0.ViewChild, args: ['chartContainer', { isSignal: true }] }] } });
|
|
399
409
|
|
|
400
410
|
/**
|
|
@@ -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 { AXChartComponent, computeTooltipPosition, getEasingFunction, mergeChartMessages, mergeChartOptions, resolveCssColorInContext } from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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) =>\n 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) =>\n 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,E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CAAA,IAAA,EAAA,CAAA;;2FAGtB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;+BACE,kBAAkB,EAAA,aAAA,EAGb,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,uBAAuB,CAAC,EAAA,eAAA,EACjB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,irBAAA,EAAA,MAAA,EAAA,CAAA,ktCAAA,CAAA,EAAA;iVA+BgC,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3DjG;;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._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"],"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,CAAuB,yBAAyB,EAAE;AACzG,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,2BAA2B;AAC3C,CAAA;;ACWK,MAAO,uBAAwB,SAAQ,gBAAgB,CAAA;;AAEnD,IAAA,OAAgB,aAAa,GAAG,GAAG;;IAG1B,gBAAgB,GAAG,IAAI;IACvB,gCAAgC,GAAG,GAAG;IACtC,uBAAuB,GAAG,CAAC;IAC3B,oBAAoB,GAAG,EAAE;IACzB,yBAAyB,GAAG,EAAE;IAC9B,gBAAgB,GAAG,EAAE;IACrB,iBAAiB,GAAG,CAAC;IACr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AAA,YAAA,EAAA,cAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnCpC,irBAeA,EAAA,MAAA,EAAA,CAAA,ktCAAA,CAAA,EAAA,YAAA,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,6 +1,6 @@
|
|
|
1
1
|
import { AX_CHART_DEFAULT_MESSAGES, AXChartComponent, mergeChartOptions, mergeChartMessages, renderChartEmptyMessage } from '@acorex/charts';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, viewChild, contentChild, inject, NgZone, ViewContainerRef, signal, input, output, computed, afterNextRender, effect,
|
|
3
|
+
import { InjectionToken, viewChild, contentChild, inject, NgZone, ViewContainerRef, signal, input, output, computed, afterNextRender, effect, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
const AXHierarchyChartDefaultConfig = {
|
|
6
6
|
direction: 'vertical',
|
|
@@ -53,9 +53,11 @@ function hierarchyChartConfig(config = {}) {
|
|
|
53
53
|
*/
|
|
54
54
|
class AXHierarchyChartComponent extends AXChartComponent {
|
|
55
55
|
// Chart container reference
|
|
56
|
-
chartContainer = viewChild.required('chartContainer'
|
|
56
|
+
chartContainer = viewChild.required('chartContainer', /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "chartContainer" }] : /* istanbul ignore next */ []));
|
|
57
58
|
// Custom node template provided by the user
|
|
58
|
-
customNodeTemplate = contentChild('nodeTemplate',
|
|
59
|
+
customNodeTemplate = contentChild('nodeTemplate', /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "customNodeTemplate" }] : /* istanbul ignore next */ []));
|
|
59
61
|
// Services
|
|
60
62
|
ngZone = inject(NgZone);
|
|
61
63
|
viewContainerRef = inject(ViewContainerRef);
|
|
@@ -63,17 +65,26 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
63
65
|
// D3 instance
|
|
64
66
|
d3;
|
|
65
67
|
// Internal state signals
|
|
66
|
-
_expandedNodes = signal(new Map(),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
_expandedNodes = signal(new Map(), /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "_expandedNodes" }] : /* istanbul ignore next */ []));
|
|
70
|
+
_initialized = signal(false, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "_initialized" }] : /* istanbul ignore next */ []));
|
|
72
|
+
_rendered = signal(false, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "_rendered" }] : /* istanbul ignore next */ []));
|
|
74
|
+
_dimensions = signal({ width: 0, height: 0 }, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "_dimensions" }] : /* istanbul ignore next */ []));
|
|
76
|
+
_nodeElements = signal(new Map(), /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "_nodeElements" }] : /* istanbul ignore next */ [])); // Store references to node elements
|
|
78
|
+
_chartData = signal(null, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "_chartData" }] : /* istanbul ignore next */ [])); // Store the current chart data and layout
|
|
72
80
|
embeddedViews = [];
|
|
73
81
|
// Inputs
|
|
74
|
-
data = input([],
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
data = input([], /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
84
|
+
options = input({}, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
86
|
+
nodeTemplate = input(null, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "nodeTemplate" }] : /* istanbul ignore next */ []));
|
|
77
88
|
// Outputs
|
|
78
89
|
itemClick = output();
|
|
79
90
|
nodeToggle = output();
|
|
@@ -82,14 +93,18 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
82
93
|
const data = this.data();
|
|
83
94
|
// Handle both single node and array formats
|
|
84
95
|
return Array.isArray(data) ? { id: 'root', children: data } : data;
|
|
85
|
-
},
|
|
96
|
+
}, /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "processedData" }] : /* istanbul ignore next */ []));
|
|
86
98
|
// Check if custom template is available
|
|
87
99
|
hasCustomTemplate = computed(() => {
|
|
88
100
|
return Boolean(this.customNodeTemplate() || this.nodeTemplate());
|
|
89
|
-
},
|
|
90
|
-
|
|
101
|
+
}, /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "hasCustomTemplate" }] : /* istanbul ignore next */ []));
|
|
103
|
+
effectiveOptions = computed(() => mergeChartOptions(this.configToken, this.options()), /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "effectiveOptions" }] : /* istanbul ignore next */ []));
|
|
91
105
|
// Messages with defaults
|
|
92
|
-
effectiveMessages = computed(() => mergeChartMessages(this.configToken.messages, this.options()?.messages),
|
|
106
|
+
effectiveMessages = computed(() => mergeChartMessages(this.configToken.messages, this.options()?.messages), /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "effectiveMessages" }] : /* istanbul ignore next */ []));
|
|
93
108
|
constructor() {
|
|
94
109
|
super();
|
|
95
110
|
// Dynamically load D3 and initialize the chart when the component is ready
|
|
@@ -621,7 +636,9 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
621
636
|
const container = this.chartContainer()?.nativeElement;
|
|
622
637
|
if (!container)
|
|
623
638
|
return;
|
|
624
|
-
container
|
|
639
|
+
container
|
|
640
|
+
.querySelectorAll('svg, .ax-chart-empty, .ax-hierarchy-chart-no-data-message')
|
|
641
|
+
.forEach((el) => el.remove());
|
|
625
642
|
}
|
|
626
643
|
ngOnDestroy() {
|
|
627
644
|
this.cleanupChart();
|
|
@@ -675,12 +692,12 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
675
692
|
help: messages.noDataHelp,
|
|
676
693
|
});
|
|
677
694
|
}
|
|
678
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
679
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXHierarchyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: AXHierarchyChartComponent, isStandalone: true, selector: "ax-hierarchy-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", nodeToggle: "nodeToggle" }, queries: [{ propertyName: "customNodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chartContainer", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-hierarchy-chart\" role=\"img\" #chartContainer></div>\n", styles: ["@reference \"../../../../styles/themes/default.css\";@import \"../../../src/lib/chart-empty-state.css\";@layer components{ax-hierarchy-chart{@apply box-border block h-full w-full;min-height:clamp(220px,38vw,360px);--ax-comp-hierarchy-chart-node-color: var(--ax-sys-color-primary-500);--ax-comp-hierarchy-chart-node-stroke-color: var(--ax-sys-color-primary-400);--ax-comp-hierarchy-chart-link-color: var(--ax-sys-color-primary-400);--ax-comp-hierarchy-chart-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-hierarchy-chart-bg-color: 0, 0, 0, 0;color:rgb(var(--ax-comp-hierarchy-chart-text-color));background-color:rgba(var(--ax-comp-hierarchy-chart-bg-color))}ax-hierarchy-chart .ax-hierarchy-chart{@apply relative h-full min-h-0 w-full overflow-hidden;}ax-hierarchy-chart .ax-hierarchy-chart svg{@apply h-full max-h-full w-full max-w-full overflow-visible;}ax-hierarchy-chart .ax-hierarchy-chart svg g:has(text){font-family:inherit}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
680
697
|
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXHierarchyChartComponent, decorators: [{
|
|
682
699
|
type: Component,
|
|
683
|
-
args: [{ selector: 'ax-hierarchy-chart', encapsulation: ViewEncapsulation.None,
|
|
700
|
+
args: [{ selector: 'ax-hierarchy-chart', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-hierarchy-chart\" role=\"img\" #chartContainer></div>\n", styles: ["@reference \"../../../../styles/themes/default.css\";@import \"../../../src/lib/chart-empty-state.css\";@layer components{ax-hierarchy-chart{@apply box-border block h-full w-full;min-height:clamp(220px,38vw,360px);--ax-comp-hierarchy-chart-node-color: var(--ax-sys-color-primary-500);--ax-comp-hierarchy-chart-node-stroke-color: var(--ax-sys-color-primary-400);--ax-comp-hierarchy-chart-link-color: var(--ax-sys-color-primary-400);--ax-comp-hierarchy-chart-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-hierarchy-chart-bg-color: 0, 0, 0, 0;color:rgb(var(--ax-comp-hierarchy-chart-text-color));background-color:rgba(var(--ax-comp-hierarchy-chart-bg-color))}ax-hierarchy-chart .ax-hierarchy-chart{@apply relative h-full min-h-0 w-full overflow-hidden;}ax-hierarchy-chart .ax-hierarchy-chart svg{@apply h-full max-h-full w-full max-w-full overflow-visible;}ax-hierarchy-chart .ax-hierarchy-chart svg g:has(text){font-family:inherit}}\n"] }]
|
|
684
701
|
}], ctorParameters: () => [], propDecorators: { chartContainer: [{ type: i0.ViewChild, args: ['chartContainer', { isSignal: true }] }], customNodeTemplate: [{ type: i0.ContentChild, args: ['nodeTemplate', { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], nodeTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTemplate", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], nodeToggle: [{ type: i0.Output, args: ["nodeToggle"] }] } });
|
|
685
702
|
|
|
686
703
|
/**
|