@acorex/charts 21.0.1-next.9 → 21.0.1-next.90
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 +37 -23
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs +4 -4
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-tooltip.mjs +13 -4
- package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +83 -99
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-funnel-chart.mjs +365 -0
- package/fesm2022/acorex-charts-funnel-chart.mjs.map +1 -0
- package/fesm2022/acorex-charts-gauge-chart.mjs +157 -86
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-heatmap-chart.mjs +393 -0
- package/fesm2022/acorex-charts-heatmap-chart.mjs.map +1 -0
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +4 -5
- package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +38 -27
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +28 -4
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/funnel-chart/README.md +3 -0
- package/heatmap-chart/README.md +3 -0
- package/package.json +19 -13
- package/{bar-chart/index.d.ts → types/acorex-charts-bar-chart.d.ts} +7 -6
- package/{chart-tooltip/index.d.ts → types/acorex-charts-chart-tooltip.d.ts} +1 -0
- package/{donut-chart/index.d.ts → types/acorex-charts-donut-chart.d.ts} +12 -11
- package/types/acorex-charts-funnel-chart.d.ts +142 -0
- package/{gauge-chart/index.d.ts → types/acorex-charts-gauge-chart.d.ts} +16 -5
- package/types/acorex-charts-heatmap-chart.d.ts +148 -0
- package/{hierarchy-chart/index.d.ts → types/acorex-charts-hierarchy-chart.d.ts} +4 -3
- package/{line-chart/index.d.ts → types/acorex-charts-line-chart.d.ts} +5 -1
- package/{index.d.ts → types/acorex-charts.d.ts} +8 -1
- /package/{chart-legend/index.d.ts → types/acorex-charts-chart-legend.d.ts} +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { AXChartComponent, resolveCssColorInContext, getEasingFunction, computeTooltipPosition } from '@acorex/charts';
|
|
2
|
+
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
|
+
import { AXPlatform } from '@acorex/core/platform';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { InjectionToken, inject, input, output, viewChild, signal, computed, afterNextRender, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
6
|
+
import { map } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
const AXHeatmapChartDefaultConfig = {
|
|
9
|
+
margin: { top: 30, right: 30, bottom: 60, left: 60 },
|
|
10
|
+
color: 'rgb(var(--ax-sys-color-primary-500))',
|
|
11
|
+
cellPadding: 0.05,
|
|
12
|
+
borderRadius: 2,
|
|
13
|
+
showXAxis: true,
|
|
14
|
+
showYAxis: true,
|
|
15
|
+
rotateXAxisLabels: 'auto',
|
|
16
|
+
showTooltip: true,
|
|
17
|
+
animationDuration: 800,
|
|
18
|
+
animationEasing: 'cubic-out',
|
|
19
|
+
messages: {
|
|
20
|
+
noData: 'No data available',
|
|
21
|
+
noDataHelp: 'Provide X, Y, and Value data to render the heatmap',
|
|
22
|
+
noDataIcon: 'fa-light fa-grid-2',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const AX_HEATMAP_CHART_CONFIG = new InjectionToken('AX_HEATMAP_CHART_CONFIG', {
|
|
26
|
+
providedIn: 'root',
|
|
27
|
+
factory: () => AXHeatmapChartDefaultConfig,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
class AXHeatmapChartComponent extends AXChartComponent {
|
|
31
|
+
/** Fixed `viewBox` side; chart scales with CSS `width` / `height` on the host container. */
|
|
32
|
+
static VIEW_BOX_SIZE = 400;
|
|
33
|
+
// X-axis layout (aligned with bar-chart heuristics)
|
|
34
|
+
CHAR_WIDTH_RATIO = 0.65;
|
|
35
|
+
ROTATION_TOLERANCE_SMALL_DATASET = 1.4;
|
|
36
|
+
SMALL_DATASET_THRESHOLD = 6;
|
|
37
|
+
MANY_ITEMS_THRESHOLD = 20;
|
|
38
|
+
VERY_MANY_ITEMS_THRESHOLD = 50;
|
|
39
|
+
MAX_LABEL_LENGTH = 20;
|
|
40
|
+
TICK_AREA_PADDING = 6;
|
|
41
|
+
X_AXIS_TITLE_GAP = 10;
|
|
42
|
+
MIN_FONT_SIZE_X_AXIS = 8;
|
|
43
|
+
MAX_FONT_SIZE_X_AXIS = 14;
|
|
44
|
+
// Inject config at the top level
|
|
45
|
+
defaultConfig = inject(AX_HEATMAP_CHART_CONFIG);
|
|
46
|
+
// Inputs
|
|
47
|
+
data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
48
|
+
options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
49
|
+
// Outputs
|
|
50
|
+
/** Emitted when a heatmap cell is clicked */
|
|
51
|
+
cellClick = output();
|
|
52
|
+
// View Child
|
|
53
|
+
containerRef = viewChild.required('chartContainer');
|
|
54
|
+
// Internal State
|
|
55
|
+
svg;
|
|
56
|
+
d3;
|
|
57
|
+
_d3Ready = signal(false, ...(ngDevMode ? [{ debugName: "_d3Ready" }] : []));
|
|
58
|
+
platformService = inject(AXPlatform);
|
|
59
|
+
isRtl = signal(this.platformService.isRtl(), ...(ngDevMode ? [{ debugName: "isRtl" }] : []));
|
|
60
|
+
directionSub;
|
|
61
|
+
// Tooltip State
|
|
62
|
+
tooltipVisible = signal(false, ...(ngDevMode ? [{ debugName: "tooltipVisible" }] : []));
|
|
63
|
+
tooltipPosition = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "tooltipPosition" }] : []));
|
|
64
|
+
tooltipData = signal({ title: '', value: '' }, ...(ngDevMode ? [{ debugName: "tooltipData" }] : []));
|
|
65
|
+
_tooltipRafId = null;
|
|
66
|
+
// Computed options (referencing the already injected defaultConfig)
|
|
67
|
+
effectiveOptions = computed(() => ({
|
|
68
|
+
...this.defaultConfig,
|
|
69
|
+
...this.options(),
|
|
70
|
+
}), ...(ngDevMode ? [{ debugName: "effectiveOptions" }] : []));
|
|
71
|
+
constructor() {
|
|
72
|
+
super();
|
|
73
|
+
afterNextRender(() => {
|
|
74
|
+
this.init();
|
|
75
|
+
this.directionSub = this.platformService.directionChange.pipe(map((i) => i.data === 'rtl')).subscribe((isRtl) => {
|
|
76
|
+
this.isRtl.set(isRtl);
|
|
77
|
+
if (this._d3Ready()) {
|
|
78
|
+
this.renderChart();
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
// Reactive render when data, options, or D3 readiness change
|
|
83
|
+
effect(() => {
|
|
84
|
+
this.data();
|
|
85
|
+
this.effectiveOptions();
|
|
86
|
+
if (this._d3Ready()) {
|
|
87
|
+
this.renderChart();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async init() {
|
|
92
|
+
try {
|
|
93
|
+
this.d3 = await import('d3');
|
|
94
|
+
this._d3Ready.set(true);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
console.error('Heatmap: Initialization failed', err);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
updateChart() {
|
|
101
|
+
this.renderChart();
|
|
102
|
+
}
|
|
103
|
+
renderChart() {
|
|
104
|
+
const container = this.containerRef().nativeElement;
|
|
105
|
+
const data = this.data() || [];
|
|
106
|
+
// Clear SVG if data is empty
|
|
107
|
+
if (data.length === 0) {
|
|
108
|
+
if (this.svg)
|
|
109
|
+
this.svg.remove();
|
|
110
|
+
this.svg = null;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const options = this.effectiveOptions();
|
|
114
|
+
const width = AXHeatmapChartComponent.VIEW_BOX_SIZE;
|
|
115
|
+
const height = AXHeatmapChartComponent.VIEW_BOX_SIZE;
|
|
116
|
+
const isRtl = this.isRtl();
|
|
117
|
+
const baseMargin = options.margin || { top: 20, right: 20, bottom: 40, left: 40 };
|
|
118
|
+
// When rendering RTL, the Y axis is on the right; swap side margins so tick labels
|
|
119
|
+
// have the same breathing room they get on the left in LTR.
|
|
120
|
+
let margin = isRtl
|
|
121
|
+
? { top: baseMargin.top, right: baseMargin.left, bottom: baseMargin.bottom, left: baseMargin.right }
|
|
122
|
+
: { ...baseMargin };
|
|
123
|
+
const xKeys = Array.from(new Set(data.map((d) => d.x.toString())));
|
|
124
|
+
const yKeys = Array.from(new Set(data.map((d) => d.y.toString())));
|
|
125
|
+
let innerWidth = width - margin.left - margin.right;
|
|
126
|
+
const cellPad = options.cellPadding ?? 0;
|
|
127
|
+
const xScaleProbe = this.d3
|
|
128
|
+
.scaleBand()
|
|
129
|
+
.domain(xKeys)
|
|
130
|
+
.range(isRtl ? [innerWidth, 0] : [0, innerWidth])
|
|
131
|
+
.padding(cellPad);
|
|
132
|
+
const xTickFontSize = this.getHeatmapXTickFontSize(innerWidth, xKeys.length);
|
|
133
|
+
const { tickXKeys, formatXTick } = this.getHeatmapXTickPlan(xKeys);
|
|
134
|
+
const longestXLabel = xKeys.reduce((acc, k) => {
|
|
135
|
+
const t = formatXTick(k);
|
|
136
|
+
return t.length > acc.length ? t : acc;
|
|
137
|
+
}, '');
|
|
138
|
+
const estimatedLabelWidth = longestXLabel.length * xTickFontSize * this.CHAR_WIDTH_RATIO;
|
|
139
|
+
const step = xScaleProbe.step();
|
|
140
|
+
const rotateX = this.shouldRotateHeatmapXLabels(options.rotateXAxisLabels, estimatedLabelWidth, step, xKeys.length);
|
|
141
|
+
const tickAreaHeight = rotateX
|
|
142
|
+
? estimatedLabelWidth * Math.SQRT1_2 + xTickFontSize * Math.SQRT1_2 + this.TICK_AREA_PADDING
|
|
143
|
+
: xTickFontSize + this.TICK_AREA_PADDING + 2;
|
|
144
|
+
const xAxisTitleReserve = options.xAxisLabel?.trim() ? this.X_AXIS_TITLE_GAP + 16 : 0;
|
|
145
|
+
margin = { ...margin, bottom: Math.max(margin.bottom, tickAreaHeight + xAxisTitleReserve) };
|
|
146
|
+
innerWidth = width - margin.left - margin.right;
|
|
147
|
+
const innerHeight = Math.max(1, height - margin.top - margin.bottom);
|
|
148
|
+
// Create/Select SVG root
|
|
149
|
+
if (!this.svg) {
|
|
150
|
+
this.svg = this.d3
|
|
151
|
+
.select(container)
|
|
152
|
+
.append('svg')
|
|
153
|
+
.attr('width', '100%')
|
|
154
|
+
.attr('height', '100%')
|
|
155
|
+
.attr('preserveAspectRatio', 'xMidYMid meet')
|
|
156
|
+
.style('display', 'block');
|
|
157
|
+
this.svg.append('g').attr('class', 'chart-group');
|
|
158
|
+
}
|
|
159
|
+
this.svg.attr('viewBox', `0 0 ${width} ${height}`);
|
|
160
|
+
const g = this.svg.select('.chart-group').attr('transform', `translate(${margin.left},${margin.top})`);
|
|
161
|
+
// --- Scales ---
|
|
162
|
+
const xScale = this.d3
|
|
163
|
+
.scaleBand()
|
|
164
|
+
.domain(xKeys)
|
|
165
|
+
.range(isRtl ? [innerWidth, 0] : [0, innerWidth])
|
|
166
|
+
.padding(cellPad);
|
|
167
|
+
const yScale = this.d3.scaleBand().domain(yKeys).range([innerHeight, 0]).padding(cellPad);
|
|
168
|
+
const valueExtent = this.d3.extent(data, (d) => d.value);
|
|
169
|
+
const minValue = Number.isFinite(valueExtent[0]) ? valueExtent[0] : 0;
|
|
170
|
+
const maxValue = Number.isFinite(valueExtent[1]) ? valueExtent[1] : minValue + 1;
|
|
171
|
+
const palette = options.colors?.filter(Boolean) ?? [];
|
|
172
|
+
const baseColor = options.color ?? 'rgb(99, 102, 241)';
|
|
173
|
+
const rangeMin = options.valueRange?.min ?? minValue;
|
|
174
|
+
const rangeMax = options.valueRange?.max ?? maxValue;
|
|
175
|
+
const resolvedColorCache = new Map();
|
|
176
|
+
const resolvePaletteColor = (c) => {
|
|
177
|
+
const hit = resolvedColorCache.get(c);
|
|
178
|
+
if (hit !== undefined)
|
|
179
|
+
return hit;
|
|
180
|
+
const out = resolveCssColorInContext(container, c);
|
|
181
|
+
resolvedColorCache.set(c, out);
|
|
182
|
+
return out;
|
|
183
|
+
};
|
|
184
|
+
const resolvedBase = resolvePaletteColor(baseColor);
|
|
185
|
+
const getCellColor = (d) => {
|
|
186
|
+
// If a palette is provided, choose a stable "random" color per cell.
|
|
187
|
+
if (palette.length > 0) {
|
|
188
|
+
const key = `${d.x}-${d.y}`;
|
|
189
|
+
const idx = this.hashStringToUint32(key) % palette.length;
|
|
190
|
+
return resolvePaletteColor(palette[idx] ?? baseColor);
|
|
191
|
+
}
|
|
192
|
+
const span = rangeMax - rangeMin;
|
|
193
|
+
const t = span === 0 ? 1 : (d.value - rangeMin) / span;
|
|
194
|
+
const clamped = Math.max(0, Math.min(1, t));
|
|
195
|
+
return this.applyIntensityToResolvedRgb(resolvedBase, clamped);
|
|
196
|
+
};
|
|
197
|
+
// --- Axes ---
|
|
198
|
+
const xAxisBuilder = this.d3
|
|
199
|
+
.axisBottom(xScale)
|
|
200
|
+
.tickSize(0)
|
|
201
|
+
.tickFormat((d) => formatXTick(String(d)));
|
|
202
|
+
if (tickXKeys.length < xKeys.length) {
|
|
203
|
+
xAxisBuilder.tickValues(tickXKeys);
|
|
204
|
+
}
|
|
205
|
+
this.drawAxis(g, 'x-axis', xAxisBuilder, 0, innerHeight, options.showXAxis, isRtl);
|
|
206
|
+
g.select('.x-axis').attr('direction', 'ltr');
|
|
207
|
+
this.styleHeatmapXAxisTicks(g, xTickFontSize, rotateX);
|
|
208
|
+
if (isRtl) {
|
|
209
|
+
this.drawAxis(g, 'y-axis', this.d3.axisRight(yScale).tickSize(0), innerWidth, 0, options.showYAxis, isRtl);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.drawAxis(g, 'y-axis', this.d3.axisLeft(yScale).tickSize(0), 0, 0, options.showYAxis, isRtl);
|
|
213
|
+
}
|
|
214
|
+
this.drawAxisLabels(g, innerWidth, innerHeight, options, isRtl, tickAreaHeight);
|
|
215
|
+
// --- Cells with Data Join ---
|
|
216
|
+
const easing = getEasingFunction(this.d3, options.animationEasing);
|
|
217
|
+
g.selectAll('.cell')
|
|
218
|
+
.data(data, (d) => `${d.x}-${d.y}`)
|
|
219
|
+
.join((enter) => enter.append('rect').attr('class', 'cell').attr('opacity', 0).attr('fill', resolvedBase), (update) => update, (exit) => exit.transition().duration(200).attr('opacity', 0).remove())
|
|
220
|
+
.on('mouseenter', (event, d) => this.showTooltip(event, d, getCellColor(d)))
|
|
221
|
+
.on('mousemove', (event) => this.updateTooltipPos(event))
|
|
222
|
+
.on('click', (_event, d) => this.cellClick.emit(d))
|
|
223
|
+
.on('mouseleave', () => this.hideTooltip())
|
|
224
|
+
.transition()
|
|
225
|
+
.duration(options.animationDuration)
|
|
226
|
+
.ease(easing)
|
|
227
|
+
.attr('x', (d) => xScale(d.x.toString()))
|
|
228
|
+
.attr('y', (d) => yScale(d.y.toString()))
|
|
229
|
+
.attr('width', xScale.bandwidth())
|
|
230
|
+
.attr('height', yScale.bandwidth())
|
|
231
|
+
.attr('rx', options.borderRadius)
|
|
232
|
+
.attr('ry', options.borderRadius)
|
|
233
|
+
.attr('opacity', 1)
|
|
234
|
+
.style('fill', (d) => getCellColor(d));
|
|
235
|
+
}
|
|
236
|
+
hashStringToUint32(input) {
|
|
237
|
+
// Simple, fast, deterministic hash (djb2 variant)
|
|
238
|
+
let hash = 5381;
|
|
239
|
+
for (let i = 0; i < input.length; i++) {
|
|
240
|
+
hash = (hash * 33) ^ input.charCodeAt(i);
|
|
241
|
+
}
|
|
242
|
+
return hash >>> 0;
|
|
243
|
+
}
|
|
244
|
+
/** `resolvedRgb` must be a computed `rgb()` / `rgba()` string (e.g. from {@link resolveCssColorInContext}). */
|
|
245
|
+
applyIntensityToResolvedRgb(resolvedRgb, t) {
|
|
246
|
+
const clamped = Math.max(0, Math.min(1, t));
|
|
247
|
+
const parsed = this.d3.color(resolvedRgb);
|
|
248
|
+
if (!parsed)
|
|
249
|
+
return resolvedRgb;
|
|
250
|
+
const rgb = this.d3.rgb(parsed);
|
|
251
|
+
const minOpacity = 0.12;
|
|
252
|
+
const opacity = minOpacity + clamped * (1 - minOpacity);
|
|
253
|
+
return `rgba(${Math.round(rgb.r)},${Math.round(rgb.g)},${Math.round(rgb.b)},${opacity})`;
|
|
254
|
+
}
|
|
255
|
+
drawAxis(g, className, axisFn, x, y, visible = true, isRtl = false) {
|
|
256
|
+
let axisG = g.select(`.${className}`);
|
|
257
|
+
if (axisG.empty())
|
|
258
|
+
axisG = g.append('g').attr('class', className);
|
|
259
|
+
axisG
|
|
260
|
+
.attr('transform', `translate(${x},${y})`)
|
|
261
|
+
.style('display', visible ? 'block' : 'none')
|
|
262
|
+
.call(axisFn)
|
|
263
|
+
.call((g) => g.select('.domain').remove());
|
|
264
|
+
// Ensure tick labels don't overlap the plot in RTL.
|
|
265
|
+
// `text-anchor` is logical (depends on `direction`), so we set both explicitly.
|
|
266
|
+
axisG.attr('direction', isRtl ? 'rtl' : 'ltr');
|
|
267
|
+
if (className === 'y-axis') {
|
|
268
|
+
axisG.selectAll('.tick text').attr('text-anchor', 'end');
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
showTooltip(event, item, color) {
|
|
272
|
+
if (!this.effectiveOptions().showTooltip)
|
|
273
|
+
return;
|
|
274
|
+
this.tooltipData.set({
|
|
275
|
+
title: `${item.x} / ${item.y}`,
|
|
276
|
+
value: item.label || item.value.toLocaleString(),
|
|
277
|
+
color: color,
|
|
278
|
+
});
|
|
279
|
+
this.tooltipVisible.set(true);
|
|
280
|
+
this.updateTooltipPos(event);
|
|
281
|
+
}
|
|
282
|
+
updateTooltipPos(event) {
|
|
283
|
+
if (this._tooltipRafId)
|
|
284
|
+
cancelAnimationFrame(this._tooltipRafId);
|
|
285
|
+
this._tooltipRafId = requestAnimationFrame(() => {
|
|
286
|
+
const containerEl = this.containerRef().nativeElement;
|
|
287
|
+
const rect = containerEl.getBoundingClientRect();
|
|
288
|
+
const tooltipEl = containerEl.querySelector('.chart-tooltip');
|
|
289
|
+
const tooltipRect = tooltipEl?.getBoundingClientRect() ?? null;
|
|
290
|
+
const pos = computeTooltipPosition(rect, tooltipRect, event.clientX + 10, event.clientY - 10, 10);
|
|
291
|
+
this.tooltipPosition.set(pos);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
hideTooltip() {
|
|
295
|
+
this.tooltipVisible.set(false);
|
|
296
|
+
}
|
|
297
|
+
ngOnDestroy() {
|
|
298
|
+
this.directionSub?.unsubscribe();
|
|
299
|
+
this.svg?.remove();
|
|
300
|
+
if (this._tooltipRafId)
|
|
301
|
+
cancelAnimationFrame(this._tooltipRafId);
|
|
302
|
+
}
|
|
303
|
+
drawAxisLabels(g, innerWidth, innerHeight, options, isRtl, xTickAreaHeight) {
|
|
304
|
+
const xText = options.xAxisLabel?.trim();
|
|
305
|
+
const yText = options.yAxisLabel?.trim();
|
|
306
|
+
const labels = g.selectAll('.axis-labels').data([0]).join('g').attr('class', 'axis-labels');
|
|
307
|
+
labels
|
|
308
|
+
.selectAll('.axis-label-x')
|
|
309
|
+
.data(xText ? [xText] : [])
|
|
310
|
+
.join((enter) => enter.append('text').attr('class', 'axis-label axis-label-x'), (update) => update, (exit) => exit.remove())
|
|
311
|
+
.attr('x', innerWidth / 2)
|
|
312
|
+
.attr('y', innerHeight + xTickAreaHeight + (xText ? this.X_AXIS_TITLE_GAP : 0))
|
|
313
|
+
.attr('text-anchor', 'middle')
|
|
314
|
+
.text((d) => d);
|
|
315
|
+
const yX = isRtl ? innerWidth + 46 : -46;
|
|
316
|
+
labels
|
|
317
|
+
.selectAll('.axis-label-y')
|
|
318
|
+
.data(yText ? [yText] : [])
|
|
319
|
+
.join((enter) => enter.append('text').attr('class', 'axis-label axis-label-y'), (update) => update, (exit) => exit.remove())
|
|
320
|
+
.attr('transform', `translate(${yX}, ${innerHeight / 2}) rotate(-90)`)
|
|
321
|
+
.attr('text-anchor', 'middle')
|
|
322
|
+
.text((d) => d);
|
|
323
|
+
}
|
|
324
|
+
getHeatmapXTickFontSize(innerWidth, itemCount) {
|
|
325
|
+
const baseSize = Math.round(innerWidth / 50);
|
|
326
|
+
let adjustedSize = baseSize;
|
|
327
|
+
if (itemCount > this.VERY_MANY_ITEMS_THRESHOLD) {
|
|
328
|
+
adjustedSize = Math.round(baseSize * 0.7);
|
|
329
|
+
}
|
|
330
|
+
else if (itemCount > this.MANY_ITEMS_THRESHOLD) {
|
|
331
|
+
adjustedSize = Math.round(baseSize * 0.85);
|
|
332
|
+
}
|
|
333
|
+
return Math.max(this.MIN_FONT_SIZE_X_AXIS, Math.min(this.MAX_FONT_SIZE_X_AXIS, adjustedSize));
|
|
334
|
+
}
|
|
335
|
+
getHeatmapXTickPlan(xKeys) {
|
|
336
|
+
const n = xKeys.length;
|
|
337
|
+
const maxLabelLength = n > this.MANY_ITEMS_THRESHOLD ? 10 : this.MAX_LABEL_LENGTH;
|
|
338
|
+
let tickXKeys = xKeys;
|
|
339
|
+
if (n > this.VERY_MANY_ITEMS_THRESHOLD) {
|
|
340
|
+
tickXKeys = xKeys.filter((_, i) => i % 5 === 0);
|
|
341
|
+
}
|
|
342
|
+
else if (n > this.MANY_ITEMS_THRESHOLD) {
|
|
343
|
+
tickXKeys = xKeys.filter((_, i) => i % 2 === 0);
|
|
344
|
+
}
|
|
345
|
+
const formatXTick = (d) => this.truncateHeatmapLabel(d, maxLabelLength);
|
|
346
|
+
return { tickXKeys, formatXTick };
|
|
347
|
+
}
|
|
348
|
+
truncateHeatmapLabel(label, maxLength) {
|
|
349
|
+
if (label.length <= maxLength)
|
|
350
|
+
return label;
|
|
351
|
+
if (maxLength <= 1)
|
|
352
|
+
return '…';
|
|
353
|
+
return `${label.substring(0, maxLength - 1)}…`;
|
|
354
|
+
}
|
|
355
|
+
shouldRotateHeatmapXLabels(rotateOption, estimatedLabelWidth, step, domainCount) {
|
|
356
|
+
if (rotateOption === true)
|
|
357
|
+
return true;
|
|
358
|
+
if (rotateOption === false)
|
|
359
|
+
return false;
|
|
360
|
+
if (domainCount === 0)
|
|
361
|
+
return false;
|
|
362
|
+
if (domainCount <= this.SMALL_DATASET_THRESHOLD) {
|
|
363
|
+
return estimatedLabelWidth > step * this.ROTATION_TOLERANCE_SMALL_DATASET;
|
|
364
|
+
}
|
|
365
|
+
return estimatedLabelWidth > step;
|
|
366
|
+
}
|
|
367
|
+
styleHeatmapXAxisTicks(g, fontSize, rotated) {
|
|
368
|
+
const texts = g
|
|
369
|
+
.select('.x-axis')
|
|
370
|
+
.selectAll('.tick text')
|
|
371
|
+
.style('font-size', `${fontSize}px`)
|
|
372
|
+
.style('font-weight', '400');
|
|
373
|
+
if (rotated) {
|
|
374
|
+
texts.attr('transform', 'rotate(-45)').style('text-anchor', 'end').attr('dx', '-0.8em').attr('dy', '0.15em');
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
texts.attr('transform', null).style('text-anchor', 'middle').attr('dx', null).attr('dy', '0.71em');
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXHeatmapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
381
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", 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 @if (data()?.length === 0) {\n <div class=\"ax-heatmap-no-data\">\n <i [class]=\"effectiveOptions().messages?.noDataIcon\"></i>\n <p class=\"ax-heatmap-no-data-text\">{{ effectiveOptions().messages?.noData }}</p>\n </div>\n }\n</div>\n\n<ax-chart-tooltip [data]=\"tooltipData()\" [position]=\"tooltipPosition()\" [visible]=\"tooltipVisible()\">\n</ax-chart-tooltip>\n", styles: ["ax-heatmap-chart{display:block;width:100%;height:100%;min-height:0;box-sizing:border-box;--ax-comp-heatmap-chart-bg-color: transparent;--ax-comp-heatmap-chart-text-color: var(--ax-sys-color-on-surface-variant, 28, 27, 31);--ax-comp-heatmap-chart-axis-color: var(--ax-sys-color-outline-variant, 202, 196, 208)}ax-heatmap-chart .ax-heatmap-chart-container{position:relative;width:100%;height:100%;min-height:0;box-sizing:border-box;padding:1rem;overflow:hidden;background-color:var(--ax-comp-heatmap-chart-bg-color)}ax-heatmap-chart .ax-heatmap-chart-container svg{display:block;width:100%;height:100%;overflow:visible}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-text-color),.6);stroke-width:2px}ax-heatmap-chart .ax-heatmap-chart-container svg .axis-label{font-size:12px;font-weight:600;fill:rgb(var(--ax-comp-heatmap-chart-text-color))}ax-heatmap-chart .ax-heatmap-chart-container svg .tick text{font-size:11px;fill:rgba(var(--ax-comp-heatmap-chart-text-color),.7)}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),.5)}ax-heatmap-chart .ax-heatmap-no-data{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;color:rgba(var(--ax-comp-heatmap-chart-text-color),.6)}ax-heatmap-chart .ax-heatmap-no-data i{font-size:2rem;margin-bottom:.5rem}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
382
|
+
}
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXHeatmapChartComponent, decorators: [{
|
|
384
|
+
type: Component,
|
|
385
|
+
args: [{ selector: 'ax-heatmap-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-heatmap-chart-container\" role=\"img\" #chartContainer>\n @if (data()?.length === 0) {\n <div class=\"ax-heatmap-no-data\">\n <i [class]=\"effectiveOptions().messages?.noDataIcon\"></i>\n <p class=\"ax-heatmap-no-data-text\">{{ effectiveOptions().messages?.noData }}</p>\n </div>\n }\n</div>\n\n<ax-chart-tooltip [data]=\"tooltipData()\" [position]=\"tooltipPosition()\" [visible]=\"tooltipVisible()\">\n</ax-chart-tooltip>\n", styles: ["ax-heatmap-chart{display:block;width:100%;height:100%;min-height:0;box-sizing:border-box;--ax-comp-heatmap-chart-bg-color: transparent;--ax-comp-heatmap-chart-text-color: var(--ax-sys-color-on-surface-variant, 28, 27, 31);--ax-comp-heatmap-chart-axis-color: var(--ax-sys-color-outline-variant, 202, 196, 208)}ax-heatmap-chart .ax-heatmap-chart-container{position:relative;width:100%;height:100%;min-height:0;box-sizing:border-box;padding:1rem;overflow:hidden;background-color:var(--ax-comp-heatmap-chart-bg-color)}ax-heatmap-chart .ax-heatmap-chart-container svg{display:block;width:100%;height:100%;overflow:visible}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-text-color),.6);stroke-width:2px}ax-heatmap-chart .ax-heatmap-chart-container svg .axis-label{font-size:12px;font-weight:600;fill:rgb(var(--ax-comp-heatmap-chart-text-color))}ax-heatmap-chart .ax-heatmap-chart-container svg .tick text{font-size:11px;fill:rgba(var(--ax-comp-heatmap-chart-text-color),.7)}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),.5)}ax-heatmap-chart .ax-heatmap-no-data{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;color:rgba(var(--ax-comp-heatmap-chart-text-color),.6)}ax-heatmap-chart .ax-heatmap-no-data i{font-size:2rem;margin-bottom:.5rem}\n"] }]
|
|
386
|
+
}], 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 }] }] } });
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Generated bundle index. Do not edit.
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
export { AXHeatmapChartComponent, AXHeatmapChartDefaultConfig, AX_HEATMAP_CHART_CONFIG };
|
|
393
|
+
//# sourceMappingURL=acorex-charts-heatmap-chart.mjs.map
|
|
@@ -0,0 +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 { 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 noData: 'No data available',\n noDataHelp: 'Provide X, Y, and Value data to render the heatmap',\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, 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 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(() => ({\n ...this.defaultConfig,\n ...this.options(),\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 if (className === 'y-axis') {\n axisG.selectAll('.tick text').attr('text-anchor', 'end');\n }\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('.axis-label-x')\n .data(xText ? [xText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'axis-label 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 .text((d: string) => d);\n\n const yX = isRtl ? innerWidth + 46 : -46;\n labels\n .selectAll('.axis-label-y')\n .data(yText ? [yText] : [])\n .join(\n (enter: any) => enter.append('text').attr('class', 'axis-label 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 .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\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 @if (data()?.length === 0) {\n <div class=\"ax-heatmap-no-data\">\n <i [class]=\"effectiveOptions().messages?.noDataIcon\"></i>\n <p class=\"ax-heatmap-no-data-text\">{{ effectiveOptions().messages?.noData }}</p>\n </div>\n }\n</div>\n\n<ax-chart-tooltip [data]=\"tooltipData()\" [position]=\"tooltipPosition()\" [visible]=\"tooltipVisible()\">\n</ax-chart-tooltip>\n","/**\n * Generated bundle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,EAAA,CAAA;;AE1DjG;;AAEG;;;;"}
|
|
@@ -277,8 +277,7 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
277
277
|
// Apply zoom behavior to SVG
|
|
278
278
|
svg.call(zoom);
|
|
279
279
|
// Set initial transform to match the centering
|
|
280
|
-
const initialTransform = this.d3.zoomIdentity
|
|
281
|
-
.translate(isHorizontal ? margin.left : width / 2, isHorizontal ? height / 2 - centerX : margin.top);
|
|
280
|
+
const initialTransform = this.d3.zoomIdentity.translate(isHorizontal ? margin.left : width / 2, isHorizontal ? height / 2 - centerX : margin.top);
|
|
282
281
|
svg.call(zoom.transform, initialTransform);
|
|
283
282
|
// Draw links between nodes
|
|
284
283
|
const links = g
|
|
@@ -710,10 +709,10 @@ class AXHierarchyChartComponent extends AXChartComponent {
|
|
|
710
709
|
.style('opacity', '0.6')
|
|
711
710
|
.text(this.effectiveMessages().noDataHelp);
|
|
712
711
|
}
|
|
713
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
714
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXHierarchyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.3", 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: ["ax-hierarchy-chart{display:block;width:100%;height:100%;min-height:300px;--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{width:100%;height:100%;min-height:300px;position:relative;overflow:hidden}ax-hierarchy-chart .ax-hierarchy-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-hierarchy-chart .ax-hierarchy-chart svg g:has(text){font-family:inherit}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message{position:absolute;text-align:center;transform:translate(-50%,-50%);background-color:rgb(var(--ax-comp-hierarchy-chart-bg-color));padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
715
714
|
}
|
|
716
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXHierarchyChartComponent, decorators: [{
|
|
717
716
|
type: Component,
|
|
718
717
|
args: [{ selector: 'ax-hierarchy-chart', standalone: true, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-hierarchy-chart\" role=\"img\" #chartContainer></div>\n", styles: ["ax-hierarchy-chart{display:block;width:100%;height:100%;min-height:300px;--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{width:100%;height:100%;min-height:300px;position:relative;overflow:hidden}ax-hierarchy-chart .ax-hierarchy-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-hierarchy-chart .ax-hierarchy-chart svg g:has(text){font-family:inherit}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message{position:absolute;text-align:center;transform:translate(-50%,-50%);background-color:rgb(var(--ax-comp-hierarchy-chart-bg-color));padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-hierarchy-chart .ax-hierarchy-chart-no-data-message .ax-hierarchy-chart-no-data-help{font-size:.8rem;opacity:.6}\n"] }]
|
|
719
718
|
}], 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"] }] } });
|