@acorex/charts 19.14.3 → 19.14.4
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/bar-chart/lib/bar-chart.component.d.ts +1 -4
- package/donut-chart/lib/donut-chart.component.d.ts +1 -4
- package/fesm2022/acorex-charts-bar-chart.mjs +6 -23
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +11 -28
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +12 -24
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +34 -1
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/chart-colors.d.ts +9 -0
- package/line-chart/lib/line-chart.component.d.ts +1 -4
- package/package.json +1 -1
|
@@ -3,10 +3,6 @@ import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
|
3
3
|
import { OnDestroy } from '@angular/core';
|
|
4
4
|
import { AXBarChartClickEvent, AXBarChartData, AXBarChartOption } from './bar-chart.type';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare const AXBarChartColors: {
|
|
7
|
-
defaultColors: string[];
|
|
8
|
-
getColor: (index: number, customPalette?: string[]) => string;
|
|
9
|
-
};
|
|
10
6
|
/**
|
|
11
7
|
* Bar Chart Component
|
|
12
8
|
* Renders data as vertical bars with interactive hover effects and animations
|
|
@@ -42,6 +38,7 @@ export declare class AXBarChartComponent extends NXComponent implements OnDestro
|
|
|
42
38
|
}>;
|
|
43
39
|
protected tooltipData: import("@angular/core").Signal<AXChartTooltipData>;
|
|
44
40
|
private configToken;
|
|
41
|
+
private chartColors;
|
|
45
42
|
protected effectiveOptions: import("@angular/core").Signal<{
|
|
46
43
|
width?: number;
|
|
47
44
|
height?: number;
|
|
@@ -2,10 +2,6 @@ import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
3
|
import { AXDonutChartData, AXDonutChartOption, AXDonutChartValue } from './donut-chart.type';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare const AXDonutChartColors: {
|
|
6
|
-
defaultColors: string[];
|
|
7
|
-
getColor: (index: number, customPalette?: string[]) => string;
|
|
8
|
-
};
|
|
9
5
|
/**
|
|
10
6
|
* Donut Chart Component
|
|
11
7
|
* Displays data in a circular donut chart with interactive segments
|
|
@@ -39,6 +35,7 @@ export declare class AXDonutChartComponent implements OnDestroy {
|
|
|
39
35
|
}>;
|
|
40
36
|
protected tooltipData: import("@angular/core").Signal<AXChartTooltipData>;
|
|
41
37
|
private configToken;
|
|
38
|
+
private chartColors;
|
|
42
39
|
protected effectiveOptions: import("@angular/core").Signal<{
|
|
43
40
|
width?: number;
|
|
44
41
|
height?: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NXComponent } from '@acorex/cdk/common';
|
|
2
|
+
import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';
|
|
2
3
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
4
|
import { CommonModule } from '@angular/common';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
@@ -33,26 +34,6 @@ function barChartConfig(config = {}) {
|
|
|
33
34
|
return result;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
const AXBarChartColors = {
|
|
37
|
-
// Modern color palette suitable for data visualization
|
|
38
|
-
defaultColors: [
|
|
39
|
-
'#4361ee', // Blue
|
|
40
|
-
'#3a0ca3', // Purple
|
|
41
|
-
'#7209b7', // Violet
|
|
42
|
-
'#f72585', // Pink
|
|
43
|
-
'#4cc9f0', // Light Blue
|
|
44
|
-
'#4895ef', // Sky Blue
|
|
45
|
-
'#560bad', // Deep Purple
|
|
46
|
-
'#f15bb5', // Light Pink
|
|
47
|
-
'#00bbf9', // Cyan
|
|
48
|
-
'#00f5d4', // Teal
|
|
49
|
-
],
|
|
50
|
-
// Get a color from the palette by index with wraparound
|
|
51
|
-
getColor: (index, customPalette) => {
|
|
52
|
-
const palette = customPalette || AXBarChartColors.defaultColors;
|
|
53
|
-
return palette[index % palette.length];
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
37
|
/**
|
|
57
38
|
* Bar Chart Component
|
|
58
39
|
* Renders data as vertical bars with interactive hover effects and animations
|
|
@@ -101,6 +82,8 @@ class AXBarChartComponent extends NXComponent {
|
|
|
101
82
|
tooltipData = this._tooltipData.asReadonly();
|
|
102
83
|
// Inject configuration
|
|
103
84
|
configToken = inject(AX_BAR_CHART_CONFIG);
|
|
85
|
+
// Inject the chart colors
|
|
86
|
+
chartColors = inject(AX_CHART_COLOR_PALETTE);
|
|
104
87
|
// Configuration with defaults
|
|
105
88
|
effectiveOptions = computed(() => {
|
|
106
89
|
return {
|
|
@@ -392,7 +375,7 @@ class AXBarChartComponent extends NXComponent {
|
|
|
392
375
|
.attr('height', 0) // Start with height 0 for animation
|
|
393
376
|
.attr('rx', radius) // Rounded corners
|
|
394
377
|
.attr('ry', radius) // Rounded corners
|
|
395
|
-
.attr('fill', (d, i) => d.color ||
|
|
378
|
+
.attr('fill', (d, i) => d.color || getChartColor(i, this.chartColors));
|
|
396
379
|
// Add data labels if they're enabled
|
|
397
380
|
if (this.effectiveOptions().showDataLabels !== false) {
|
|
398
381
|
barGroups
|
|
@@ -495,7 +478,7 @@ class AXBarChartComponent extends NXComponent {
|
|
|
495
478
|
handleBarHover(event, datum) {
|
|
496
479
|
if (this.effectiveOptions().showTooltip !== false) {
|
|
497
480
|
const index = this.data().findIndex((item) => item.id === datum.id);
|
|
498
|
-
const color = datum.color ||
|
|
481
|
+
const color = datum.color || getChartColor(index, this.chartColors);
|
|
499
482
|
// Calculate percentage of total
|
|
500
483
|
const total = this.data().reduce((sum, item) => sum + item.value, 0);
|
|
501
484
|
const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';
|
|
@@ -595,5 +578,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
595
578
|
* Generated bundle index. Do not edit.
|
|
596
579
|
*/
|
|
597
580
|
|
|
598
|
-
export {
|
|
581
|
+
export { AXBarChartComponent, AXBarChartDefaultConfig, AX_BAR_CHART_CONFIG, barChartConfig };
|
|
599
582
|
//# sourceMappingURL=acorex-charts-bar-chart.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-charts-bar-chart.mjs","sources":["../../../../packages/charts/bar-chart/src/lib/bar-chart.config.ts","../../../../packages/charts/bar-chart/src/lib/bar-chart.component.ts","../../../../packages/charts/bar-chart/src/lib/bar-chart.component.html","../../../../packages/charts/bar-chart/src/acorex-charts-bar-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXBarChartOption } from './bar-chart.type';\n\nexport const AXBarChartDefaultConfig: AXBarChartOption = {\n showXAxis: true,\n showYAxis: true,\n showGrid: true,\n showDataLabels: true,\n showTooltip: true,\n barWidth: 80,\n cornerRadius: 4,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_BAR_CHART_CONFIG = new InjectionToken<AXBarChartOption>('AX_BAR_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.barChart', AXBarChartDefaultConfig);\n return AXBarChartDefaultConfig;\n },\n});\n\nexport type PartialBarChartConfig = Partial<AXBarChartOption>;\n\nexport function barChartConfig(config: PartialBarChartConfig = {}): AXBarChartOption {\n const result = {\n ...AXBarChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { NXComponent } from '@acorex/cdk/common';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\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 { AX_BAR_CHART_CONFIG } from './bar-chart.config';\nimport { AXBarChartClickEvent, AXBarChartData, AXBarChartOption } from './bar-chart.type';\n\nexport const AXBarChartColors = {\n // Modern color palette suitable for data visualization\n defaultColors: [\n '#4361ee', // Blue\n '#3a0ca3', // Purple\n '#7209b7', // Violet\n '#f72585', // Pink\n '#4cc9f0', // Light Blue\n '#4895ef', // Sky Blue\n '#560bad', // Deep Purple\n '#f15bb5', // Light Pink\n '#00bbf9', // Cyan\n '#00f5d4', // Teal\n ],\n\n // Get a color from the palette by index with wraparound\n getColor: (index: number, customPalette?: string[]): string => {\n const palette = customPalette || AXBarChartColors.defaultColors;\n return palette[index % palette.length];\n },\n};\n\n/**\n * Bar Chart Component\n * Renders data as vertical bars with interactive hover effects and animations\n */\n@Component({\n selector: 'ax-bar-chart',\n templateUrl: './bar-chart.component.html',\n styleUrls: ['./bar-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXBarChartComponent extends NXComponent implements OnDestroy {\n // Inputs\n /** Chart data input */\n data = input<AXBarChartData[]>([]);\n\n /** Chart options input */\n options = input<AXBarChartOption>({});\n\n // Outputs\n /** Emitted when a bar is clicked */\n barClick = output<AXBarChartClickEvent>();\n\n // Chart container reference\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // D3 reference - loaded asynchronously\n protected d3!: typeof import('d3');\n\n // Chart elements\n private svg!: any;\n private chart!: any;\n private xScale!: any;\n private yScale!: any;\n private xAxis!: any;\n private yAxis!: any;\n\n // Chart dimensions\n private width!: number;\n private height!: number;\n private margin = { top: 20, right: 20, bottom: 30, left: 40 };\n\n // Animation state\n private _initialAnimationComplete = signal(false);\n\n // Tooltip state\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: '0',\n percentage: '0%',\n color: '',\n });\n\n // Signals for component state\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n // Tooltip accessors\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_BAR_CHART_CONFIG);\n\n // Configuration with defaults\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n constructor() {\n super();\n // Dynamically load D3 and initialize the chart when the component is ready\n afterNextRender(() => {\n this._initialized.set(true);\n this.loadD3();\n // Create chart after D3 is loaded and container is available\n if (this.d3 && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n });\n\n // Watch for changes to redraw the chart\n effect(() => {\n // Access inputs to track them\n this.data();\n this.effectiveOptions();\n\n // Only update if already rendered\n if (this._rendered()) {\n this.updateChart();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n /**\n * Loads D3.js dynamically\n */\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n // If container is ready, create chart\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n /**\n * Creates the bar chart SVG and renders all elements\n */\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n const containerElement = this.chartContainerEl().nativeElement;\n const data = this.data() || [];\n\n // Clear existing chart\n this.d3.select(containerElement).selectAll('svg').remove();\n\n // Early return if no data\n if (!data.length) {\n this.showNoDataMessage(containerElement);\n return;\n }\n\n // Get options and setup dimensions\n const chartOptions = this.effectiveOptions();\n this.setupDimensions(containerElement, chartOptions);\n\n // Create scales and axes\n this.setupScales(data);\n this.createAxes(chartOptions);\n\n // Render the bars\n this.renderBars(data);\n }\n\n /**\n * Updates the chart when inputs change\n */\n protected updateChart(): void {\n this.createChart();\n }\n\n /**\n * Cleans up chart resources\n */\n protected cleanupChart(): void {\n if (this.svg) {\n this.d3?.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.chart = null;\n }\n this._tooltipVisible.set(false);\n }\n\n /**\n * Sets up chart dimensions and creates SVG with responsive attributes\n */\n private setupDimensions(containerElement: HTMLElement, options: AXBarChartOption): void {\n // Calculate margins based on options\n this.calculateMargins(options);\n\n // Get container dimensions\n const containerWidth = containerElement.clientWidth;\n const containerHeight = containerElement.clientHeight;\n\n // If options specify width and height, use those, otherwise default to container size\n const minDim = Math.min(200, containerWidth, containerHeight); // Ensure reasonable minimum\n\n if (options.width && options.height) {\n // Explicit dimensions provided\n this.width = options.width - this.margin.left - this.margin.right;\n this.height = options.height - this.margin.top - this.margin.bottom;\n } else {\n // Responsive dimensions\n this.width = Math.max(containerWidth, minDim) - this.margin.left - this.margin.right;\n this.height = Math.max(containerHeight, minDim) - this.margin.top - this.margin.bottom;\n }\n\n // Create responsive SVG that scales with its container\n const svg = this.d3\n .select(containerElement)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr(\n 'viewBox',\n `0 0 ${this.width + this.margin.left + this.margin.right} ${this.height + this.margin.top + this.margin.bottom}`,\n )\n .attr('preserveAspectRatio', 'xMidYMid meet');\n\n this.svg = svg;\n\n // Create chart group with margins\n this.chart = this.svg.append('g').attr('transform', `translate(${this.margin.left},${this.margin.top})`);\n }\n\n /**\n * Calculates chart margins based on options\n */\n private calculateMargins(options: AXBarChartOption): void {\n // Start with default margins\n this.margin = {\n top: 20,\n right: 20,\n bottom: 30,\n left: 40,\n };\n\n // Adjust margins if axis labels are present\n if (options.xAxisLabel) {\n const xLabelLength = options.xAxisLabel.length;\n const extraBottomMargin = Math.min(20, Math.max(10, xLabelLength * 0.8));\n this.margin.bottom = Math.max(this.margin.bottom, 30 + extraBottomMargin);\n }\n\n if (options.yAxisLabel) {\n const yLabelLength = options.yAxisLabel.length;\n const extraLeftMargin = Math.min(20, Math.max(10, yLabelLength * 0.8));\n this.margin.left = Math.max(this.margin.left, 40 + extraLeftMargin);\n }\n\n // Ensure minimum margins for axes\n if (options.showXAxis !== false) {\n this.margin.bottom = Math.max(this.margin.bottom, 35);\n }\n\n if (options.showYAxis !== false) {\n this.margin.left = Math.max(this.margin.left, 45);\n }\n }\n\n /**\n * Creates x and y scales for the chart\n */\n private setupScales(data: AXBarChartData[]): void {\n // Get the bar width percentage (default 80%)\n const barWidthPercent = this.effectiveOptions().barWidth ?? 60 / 100;\n // Calculate padding based on barWidth (inverse relationship)\n const padding = Math.max(0.1, 1 - barWidthPercent);\n\n // Create x scale (band scale for categorical data)\n this.xScale = this.d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, this.width])\n .padding(padding);\n\n // Create y scale (linear scale for values)\n this.yScale = this.d3\n .scaleLinear()\n .domain([0, this.d3.max(data, (d) => d.value) || 0])\n .nice()\n .range([this.height, 0]);\n }\n\n /**\n * Creates x and y axes with grid lines\n */\n private createAxes(options: AXBarChartOption): void {\n // Only create axes if they are enabled in options\n const showXAxis = options.showXAxis !== false;\n const showYAxis = options.showYAxis !== false;\n const showGrid = options.showGrid !== false;\n\n // Create a group for all axes\n const axesGroup = this.chart.append('g').attr('class', 'ax-bar-chart-axes');\n\n if (showXAxis) {\n // Create X axis\n this.xAxis = axesGroup\n .append('g')\n .attr('class', 'ax-bar-chart-axis-x')\n .attr('transform', `translate(0,${this.height})`)\n .call(this.d3.axisBottom(this.xScale));\n\n // Style the axis text\n this.xAxis\n .selectAll('text')\n .style('font-size', '11px')\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)');\n\n // Style all lines in the x-axis (path, ticks)\n this.xAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');\n\n // Add X axis label if provided\n if (options.xAxisLabel) {\n const labelY = this.height + this.margin.bottom * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-bar-chart-axis-label ax-x-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('x', this.width / 2)\n .attr('y', labelY)\n .style('font-size', '13px')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')\n .text(options.xAxisLabel);\n }\n }\n\n if (showYAxis) {\n // Create Y axis\n this.yAxis = axesGroup.append('g').attr('class', 'ax-bar-chart-axis-y').call(this.d3.axisLeft(this.yScale));\n\n // Style the axis text\n this.yAxis\n .selectAll('text')\n .style('font-size', '11px')\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)');\n\n // Style all lines in the y-axis (path, ticks)\n this.yAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');\n\n // Add Y axis label if provided\n if (options.yAxisLabel) {\n const labelX = -this.height / 2;\n const labelY = -this.margin.left * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-bar-chart-axis-label ax-y-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('transform', 'rotate(-90)')\n .attr('x', labelX)\n .attr('y', labelY)\n .style('font-size', '13px')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')\n .text(options.yAxisLabel);\n }\n }\n\n if (showGrid) {\n // Add horizontal grid lines\n this.chart\n .append('g')\n .attr('class', 'ax-bar-chart-grid')\n .call(\n this.d3\n .axisLeft(this.yScale)\n .tickSize(-this.width)\n .tickFormat(() => ''),\n )\n .selectAll('line')\n .style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))')\n .style('stroke-opacity', 0.2);\n\n // Remove unneeded elements from grid\n this.chart.select('.ax-bar-chart-grid').selectAll('path, text').remove();\n }\n }\n\n /**\n * Renders the bars with animations\n */\n private renderBars(data: AXBarChartData[]): void {\n // Reset animation state\n this._initialAnimationComplete.set(false);\n\n // Get corner radius from options\n const radius = this.effectiveOptions().cornerRadius;\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n // Create a container for all bars\n const barsContainer = this.chart.append('g').attr('class', 'ax-bar-chart-bars-container');\n\n // Create groups for each bar to handle transformations\n const barGroups = barsContainer\n .selectAll('.ax-bar-chart-bar-group')\n .data(data)\n .enter()\n .append('g')\n .style('cursor', 'pointer')\n .attr('class', 'ax-bar-chart-bar-group');\n\n // Add bars inside groups\n const bars = barGroups\n .append('rect')\n .attr('class', 'ax-bar-chart-bar')\n .attr('x', (d: AXBarChartData) => this.xScale(d.label))\n .attr('width', this.xScale.bandwidth())\n .attr('y', this.height) // Start from bottom for animation\n .attr('height', 0) // Start with height 0 for animation\n .attr('rx', radius) // Rounded corners\n .attr('ry', radius) // Rounded corners\n .attr('fill', (d: AXBarChartData, i: number) => d.color || AXBarChartColors.getColor(i));\n\n // Add data labels if they're enabled\n if (this.effectiveOptions().showDataLabels !== false) {\n barGroups\n .append('text')\n .attr('class', 'ax-bar-chart-data-label')\n .attr('text-anchor', 'middle')\n .attr('x', (d: AXBarChartData) => this.xScale(d.label) + this.xScale.bandwidth() / 2)\n .attr('y', this.height) // Start from bottom for animation\n .style('font-size', 'clamp(8px, 2vmin, 12px)')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-data-labels-color))')\n .style('opacity', 0) // Start invisible for animation\n .text((d: AXBarChartData) => d.value);\n\n // Animate data labels\n barGroups\n .selectAll('.ax-bar-chart-data-label')\n .transition()\n .duration(animationDuration)\n .delay((d: AXBarChartData, i: number) => i * 50 + 100) // Slightly delayed after bar animation\n .attr('y', (d: AXBarChartData) => this.yScale(d.value) - 8) // Position above bar\n .style('opacity', 1)\n .ease(animationEasing);\n }\n\n // Set up event handlers on each group\n barGroups\n .on('mouseenter', (event: MouseEvent, d: AXBarChartData) => {\n // Only apply hover effects if initial animation is complete\n if (!this._initialAnimationComplete()) return;\n\n const barEl = this.d3.select(event.currentTarget).select('rect');\n\n // Standard hover effect - darken the bar slightly and add a subtle shadow\n barEl.transition().duration(150).style('filter', 'brightness(0.7) drop-shadow(0 0 2px rgba(0,0,0,0.1))');\n\n this.handleBarHover(event, d);\n })\n .on('mousemove', (event: MouseEvent) => {\n // Only update tooltip if initial animation is complete\n if (this._initialAnimationComplete()) {\n this.updateTooltipPosition(event);\n }\n })\n .on('mouseleave', (event: MouseEvent, d: AXBarChartData) => {\n // Only apply hover effects if initial animation is complete\n if (!this._initialAnimationComplete()) return;\n\n const barEl = this.d3.select(event.currentTarget).select('rect');\n\n // Remove hover effect\n barEl.transition().duration(150).style('filter', null);\n\n this._tooltipVisible.set(false);\n })\n .on('click', (event: MouseEvent, d: AXBarChartData) => {\n // Only trigger click events if initial animation is complete\n if (this._initialAnimationComplete()) {\n this.handleBarClick(event, d);\n }\n });\n\n // Add animation\n bars\n .transition()\n .duration(animationDuration)\n .delay((d: AXBarChartData, i: number) => i * 50) // Stagger each bar animation\n .attr('y', (d: AXBarChartData) => this.yScale(d.value))\n .attr('height', (d: AXBarChartData) => this.height - this.yScale(d.value))\n .ease(animationEasing) // Use the configured easing function\n .end() // Wait for all animations to complete\n .then(() => {\n // Mark animation as complete to enable hover effects\n this._initialAnimationComplete.set(true);\n });\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n\n /**\n * Handles bar hover event and shows tooltip\n */\n private handleBarHover(event: MouseEvent, datum: AXBarChartData): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const index = this.data().findIndex((item) => item.id === datum.id);\n const color = datum.color || AXBarChartColors.getColor(index);\n\n // Calculate percentage of total\n const total = this.data().reduce((sum, item) => sum + item.value, 0);\n const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';\n\n this._tooltipData.set({\n title: datum.tooltipLabel || datum.label,\n value: datum.value.toString(),\n percentage: `${percentage}%`,\n color: color,\n });\n\n this.updateTooltipPosition(event);\n this._tooltipVisible.set(true);\n }\n }\n\n /**\n * Updates tooltip position based on mouse coordinates\n */\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n let x = event.clientX - container.left;\n const y = event.clientY - container.top;\n\n // Adjust position if near the right edge\n if (x + tooltipRect.width + 10 > container.width) {\n x = x - tooltipRect.width - 10;\n } else {\n x = x + 10;\n }\n\n this._tooltipPosition.set({ x, y });\n }\n\n /**\n * Handles bar click event\n */\n private handleBarClick(event: MouseEvent, datum: AXBarChartData): void {\n this.barClick.emit({ item: datum, event: { nativeEvent: event, sender: this } });\n }\n\n /**\n * Shows a message when no data is available\n */\n private showNoDataMessage(containerElement: HTMLElement): void {\n // Clear existing contents first\n this.d3.select(containerElement).selectAll('*').remove();\n\n const messageContainer = this.d3\n .select(containerElement)\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-message')\n .style('position', 'absolute')\n .style('left', '50%')\n .style('top', '50%')\n .style('transform', 'translate(-50%, -50%)')\n .style('text-align', 'center')\n .style('background-color', 'rgb(var(--ax-comp-bar-chart-bg-color))')\n .style('padding', '1.5rem')\n .style('border-radius', '0.5rem')\n .style('box-shadow', '0 2px 12px rgba(0, 0, 0, 0.08)')\n .style('width', '80%')\n .style('max-width', '300px');\n\n // Add an icon\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-icon')\n .style('opacity', '0.6')\n .style('margin-bottom', '0.75rem')\n .html('<i class=\"fa-light fa-chart-column fa-2x\"></i>');\n\n // Add text message\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-text')\n .style('font-size', '1rem')\n .style('font-weight', '600')\n .style('margin-bottom', '0.5rem')\n .text('No data available');\n\n // Add help text\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-help')\n .style('font-size', '0.8rem')\n .style('opacity', '0.6')\n .text('Please provide data to display the chart');\n }\n}\n","<div class=\"ax-bar-chart\" #chartContainer>\n <!-- Shared tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKa,MAAA,uBAAuB,GAAqB;AACvD,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,iBAAiB,EAAE,GAAG;AACtB,IAAA,eAAe,EAAE,WAAW;;MAGjB,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB,EAAE;AAC7F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAA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MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAGpC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAGT,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,YAAY,EAAE,uBAAuB,CAAC,EAC/B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,iRAAA,EAAA,MAAA,EAAA,CAAA,k3CAAA,CAAA,EAAA;;;AErDjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-charts-bar-chart.mjs","sources":["../../../../packages/charts/bar-chart/src/lib/bar-chart.config.ts","../../../../packages/charts/bar-chart/src/lib/bar-chart.component.ts","../../../../packages/charts/bar-chart/src/lib/bar-chart.component.html","../../../../packages/charts/bar-chart/src/acorex-charts-bar-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXBarChartOption } from './bar-chart.type';\n\nexport const AXBarChartDefaultConfig: AXBarChartOption = {\n showXAxis: true,\n showYAxis: true,\n showGrid: true,\n showDataLabels: true,\n showTooltip: true,\n barWidth: 80,\n cornerRadius: 4,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_BAR_CHART_CONFIG = new InjectionToken<AXBarChartOption>('AX_BAR_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.barChart', AXBarChartDefaultConfig);\n return AXBarChartDefaultConfig;\n },\n});\n\nexport type PartialBarChartConfig = Partial<AXBarChartOption>;\n\nexport function barChartConfig(config: PartialBarChartConfig = {}): AXBarChartOption {\n const result = {\n ...AXBarChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { NXComponent } from '@acorex/cdk/common';\nimport { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\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 { AX_BAR_CHART_CONFIG } from './bar-chart.config';\nimport { AXBarChartClickEvent, AXBarChartData, AXBarChartOption } from './bar-chart.type';\n\n/**\n * Bar Chart Component\n * Renders data as vertical bars with interactive hover effects and animations\n */\n@Component({\n selector: 'ax-bar-chart',\n templateUrl: './bar-chart.component.html',\n styleUrls: ['./bar-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXBarChartComponent extends NXComponent implements OnDestroy {\n // Inputs\n /** Chart data input */\n data = input<AXBarChartData[]>([]);\n\n /** Chart options input */\n options = input<AXBarChartOption>({});\n\n // Outputs\n /** Emitted when a bar is clicked */\n barClick = output<AXBarChartClickEvent>();\n\n // Chart container reference\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // D3 reference - loaded asynchronously\n protected d3!: typeof import('d3');\n\n // Chart elements\n private svg!: any;\n private chart!: any;\n private xScale!: any;\n private yScale!: any;\n private xAxis!: any;\n private yAxis!: any;\n\n // Chart dimensions\n private width!: number;\n private height!: number;\n private margin = { top: 20, right: 20, bottom: 30, left: 40 };\n\n // Animation state\n private _initialAnimationComplete = signal(false);\n\n // Tooltip state\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: '0',\n percentage: '0%',\n color: '',\n });\n\n // Signals for component state\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n // Tooltip accessors\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_BAR_CHART_CONFIG);\n\n // Inject the chart colors\n private chartColors = inject(AX_CHART_COLOR_PALETTE);\n\n // Configuration with defaults\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n constructor() {\n super();\n // Dynamically load D3 and initialize the chart when the component is ready\n afterNextRender(() => {\n this._initialized.set(true);\n this.loadD3();\n // Create chart after D3 is loaded and container is available\n if (this.d3 && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n });\n\n // Watch for changes to redraw the chart\n effect(() => {\n // Access inputs to track them\n this.data();\n this.effectiveOptions();\n\n // Only update if already rendered\n if (this._rendered()) {\n this.updateChart();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n /**\n * Loads D3.js dynamically\n */\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n // If container is ready, create chart\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n /**\n * Creates the bar chart SVG and renders all elements\n */\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n const containerElement = this.chartContainerEl().nativeElement;\n const data = this.data() || [];\n\n // Clear existing chart\n this.d3.select(containerElement).selectAll('svg').remove();\n\n // Early return if no data\n if (!data.length) {\n this.showNoDataMessage(containerElement);\n return;\n }\n\n // Get options and setup dimensions\n const chartOptions = this.effectiveOptions();\n this.setupDimensions(containerElement, chartOptions);\n\n // Create scales and axes\n this.setupScales(data);\n this.createAxes(chartOptions);\n\n // Render the bars\n this.renderBars(data);\n }\n\n /**\n * Updates the chart when inputs change\n */\n protected updateChart(): void {\n this.createChart();\n }\n\n /**\n * Cleans up chart resources\n */\n protected cleanupChart(): void {\n if (this.svg) {\n this.d3?.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.chart = null;\n }\n this._tooltipVisible.set(false);\n }\n\n /**\n * Sets up chart dimensions and creates SVG with responsive attributes\n */\n private setupDimensions(containerElement: HTMLElement, options: AXBarChartOption): void {\n // Calculate margins based on options\n this.calculateMargins(options);\n\n // Get container dimensions\n const containerWidth = containerElement.clientWidth;\n const containerHeight = containerElement.clientHeight;\n\n // If options specify width and height, use those, otherwise default to container size\n const minDim = Math.min(200, containerWidth, containerHeight); // Ensure reasonable minimum\n\n if (options.width && options.height) {\n // Explicit dimensions provided\n this.width = options.width - this.margin.left - this.margin.right;\n this.height = options.height - this.margin.top - this.margin.bottom;\n } else {\n // Responsive dimensions\n this.width = Math.max(containerWidth, minDim) - this.margin.left - this.margin.right;\n this.height = Math.max(containerHeight, minDim) - this.margin.top - this.margin.bottom;\n }\n\n // Create responsive SVG that scales with its container\n const svg = this.d3\n .select(containerElement)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr(\n 'viewBox',\n `0 0 ${this.width + this.margin.left + this.margin.right} ${this.height + this.margin.top + this.margin.bottom}`,\n )\n .attr('preserveAspectRatio', 'xMidYMid meet');\n\n this.svg = svg;\n\n // Create chart group with margins\n this.chart = this.svg.append('g').attr('transform', `translate(${this.margin.left},${this.margin.top})`);\n }\n\n /**\n * Calculates chart margins based on options\n */\n private calculateMargins(options: AXBarChartOption): void {\n // Start with default margins\n this.margin = {\n top: 20,\n right: 20,\n bottom: 30,\n left: 40,\n };\n\n // Adjust margins if axis labels are present\n if (options.xAxisLabel) {\n const xLabelLength = options.xAxisLabel.length;\n const extraBottomMargin = Math.min(20, Math.max(10, xLabelLength * 0.8));\n this.margin.bottom = Math.max(this.margin.bottom, 30 + extraBottomMargin);\n }\n\n if (options.yAxisLabel) {\n const yLabelLength = options.yAxisLabel.length;\n const extraLeftMargin = Math.min(20, Math.max(10, yLabelLength * 0.8));\n this.margin.left = Math.max(this.margin.left, 40 + extraLeftMargin);\n }\n\n // Ensure minimum margins for axes\n if (options.showXAxis !== false) {\n this.margin.bottom = Math.max(this.margin.bottom, 35);\n }\n\n if (options.showYAxis !== false) {\n this.margin.left = Math.max(this.margin.left, 45);\n }\n }\n\n /**\n * Creates x and y scales for the chart\n */\n private setupScales(data: AXBarChartData[]): void {\n // Get the bar width percentage (default 80%)\n const barWidthPercent = this.effectiveOptions().barWidth ?? 60 / 100;\n // Calculate padding based on barWidth (inverse relationship)\n const padding = Math.max(0.1, 1 - barWidthPercent);\n\n // Create x scale (band scale for categorical data)\n this.xScale = this.d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, this.width])\n .padding(padding);\n\n // Create y scale (linear scale for values)\n this.yScale = this.d3\n .scaleLinear()\n .domain([0, this.d3.max(data, (d) => d.value) || 0])\n .nice()\n .range([this.height, 0]);\n }\n\n /**\n * Creates x and y axes with grid lines\n */\n private createAxes(options: AXBarChartOption): void {\n // Only create axes if they are enabled in options\n const showXAxis = options.showXAxis !== false;\n const showYAxis = options.showYAxis !== false;\n const showGrid = options.showGrid !== false;\n\n // Create a group for all axes\n const axesGroup = this.chart.append('g').attr('class', 'ax-bar-chart-axes');\n\n if (showXAxis) {\n // Create X axis\n this.xAxis = axesGroup\n .append('g')\n .attr('class', 'ax-bar-chart-axis-x')\n .attr('transform', `translate(0,${this.height})`)\n .call(this.d3.axisBottom(this.xScale));\n\n // Style the axis text\n this.xAxis\n .selectAll('text')\n .style('font-size', '11px')\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)');\n\n // Style all lines in the x-axis (path, ticks)\n this.xAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');\n\n // Add X axis label if provided\n if (options.xAxisLabel) {\n const labelY = this.height + this.margin.bottom * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-bar-chart-axis-label ax-x-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('x', this.width / 2)\n .attr('y', labelY)\n .style('font-size', '13px')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')\n .text(options.xAxisLabel);\n }\n }\n\n if (showYAxis) {\n // Create Y axis\n this.yAxis = axesGroup.append('g').attr('class', 'ax-bar-chart-axis-y').call(this.d3.axisLeft(this.yScale));\n\n // Style the axis text\n this.yAxis\n .selectAll('text')\n .style('font-size', '11px')\n .style('font-weight', '400')\n .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)');\n\n // Style all lines in the y-axis (path, ticks)\n this.yAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');\n\n // Add Y axis label if provided\n if (options.yAxisLabel) {\n const labelX = -this.height / 2;\n const labelY = -this.margin.left * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-bar-chart-axis-label ax-y-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('transform', 'rotate(-90)')\n .attr('x', labelX)\n .attr('y', labelY)\n .style('font-size', '13px')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')\n .text(options.yAxisLabel);\n }\n }\n\n if (showGrid) {\n // Add horizontal grid lines\n this.chart\n .append('g')\n .attr('class', 'ax-bar-chart-grid')\n .call(\n this.d3\n .axisLeft(this.yScale)\n .tickSize(-this.width)\n .tickFormat(() => ''),\n )\n .selectAll('line')\n .style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))')\n .style('stroke-opacity', 0.2);\n\n // Remove unneeded elements from grid\n this.chart.select('.ax-bar-chart-grid').selectAll('path, text').remove();\n }\n }\n\n /**\n * Renders the bars with animations\n */\n private renderBars(data: AXBarChartData[]): void {\n // Reset animation state\n this._initialAnimationComplete.set(false);\n\n // Get corner radius from options\n const radius = this.effectiveOptions().cornerRadius;\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n // Create a container for all bars\n const barsContainer = this.chart.append('g').attr('class', 'ax-bar-chart-bars-container');\n\n // Create groups for each bar to handle transformations\n const barGroups = barsContainer\n .selectAll('.ax-bar-chart-bar-group')\n .data(data)\n .enter()\n .append('g')\n .style('cursor', 'pointer')\n .attr('class', 'ax-bar-chart-bar-group');\n\n // Add bars inside groups\n const bars = barGroups\n .append('rect')\n .attr('class', 'ax-bar-chart-bar')\n .attr('x', (d: AXBarChartData) => this.xScale(d.label))\n .attr('width', this.xScale.bandwidth())\n .attr('y', this.height) // Start from bottom for animation\n .attr('height', 0) // Start with height 0 for animation\n .attr('rx', radius) // Rounded corners\n .attr('ry', radius) // Rounded corners\n .attr('fill', (d: AXBarChartData, i: number) => d.color || getChartColor(i, this.chartColors));\n\n // Add data labels if they're enabled\n if (this.effectiveOptions().showDataLabels !== false) {\n barGroups\n .append('text')\n .attr('class', 'ax-bar-chart-data-label')\n .attr('text-anchor', 'middle')\n .attr('x', (d: AXBarChartData) => this.xScale(d.label) + this.xScale.bandwidth() / 2)\n .attr('y', this.height) // Start from bottom for animation\n .style('font-size', 'clamp(8px, 2vmin, 12px)')\n .style('font-weight', '500')\n .style('fill', 'rgb(var(--ax-comp-bar-chart-data-labels-color))')\n .style('opacity', 0) // Start invisible for animation\n .text((d: AXBarChartData) => d.value);\n\n // Animate data labels\n barGroups\n .selectAll('.ax-bar-chart-data-label')\n .transition()\n .duration(animationDuration)\n .delay((d: AXBarChartData, i: number) => i * 50 + 100) // Slightly delayed after bar animation\n .attr('y', (d: AXBarChartData) => this.yScale(d.value) - 8) // Position above bar\n .style('opacity', 1)\n .ease(animationEasing);\n }\n\n // Set up event handlers on each group\n barGroups\n .on('mouseenter', (event: MouseEvent, d: AXBarChartData) => {\n // Only apply hover effects if initial animation is complete\n if (!this._initialAnimationComplete()) return;\n\n const barEl = this.d3.select(event.currentTarget).select('rect');\n\n // Standard hover effect - darken the bar slightly and add a subtle shadow\n barEl.transition().duration(150).style('filter', 'brightness(0.7) drop-shadow(0 0 2px rgba(0,0,0,0.1))');\n\n this.handleBarHover(event, d);\n })\n .on('mousemove', (event: MouseEvent) => {\n // Only update tooltip if initial animation is complete\n if (this._initialAnimationComplete()) {\n this.updateTooltipPosition(event);\n }\n })\n .on('mouseleave', (event: MouseEvent, d: AXBarChartData) => {\n // Only apply hover effects if initial animation is complete\n if (!this._initialAnimationComplete()) return;\n\n const barEl = this.d3.select(event.currentTarget).select('rect');\n\n // Remove hover effect\n barEl.transition().duration(150).style('filter', null);\n\n this._tooltipVisible.set(false);\n })\n .on('click', (event: MouseEvent, d: AXBarChartData) => {\n // Only trigger click events if initial animation is complete\n if (this._initialAnimationComplete()) {\n this.handleBarClick(event, d);\n }\n });\n\n // Add animation\n bars\n .transition()\n .duration(animationDuration)\n .delay((d: AXBarChartData, i: number) => i * 50) // Stagger each bar animation\n .attr('y', (d: AXBarChartData) => this.yScale(d.value))\n .attr('height', (d: AXBarChartData) => this.height - this.yScale(d.value))\n .ease(animationEasing) // Use the configured easing function\n .end() // Wait for all animations to complete\n .then(() => {\n // Mark animation as complete to enable hover effects\n this._initialAnimationComplete.set(true);\n });\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n\n /**\n * Handles bar hover event and shows tooltip\n */\n private handleBarHover(event: MouseEvent, datum: AXBarChartData): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const index = this.data().findIndex((item) => item.id === datum.id);\n const color = datum.color || getChartColor(index, this.chartColors);\n\n // Calculate percentage of total\n const total = this.data().reduce((sum, item) => sum + item.value, 0);\n const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';\n\n this._tooltipData.set({\n title: datum.tooltipLabel || datum.label,\n value: datum.value.toString(),\n percentage: `${percentage}%`,\n color: color,\n });\n\n this.updateTooltipPosition(event);\n this._tooltipVisible.set(true);\n }\n }\n\n /**\n * Updates tooltip position based on mouse coordinates\n */\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n let x = event.clientX - container.left;\n const y = event.clientY - container.top;\n\n // Adjust position if near the right edge\n if (x + tooltipRect.width + 10 > container.width) {\n x = x - tooltipRect.width - 10;\n } else {\n x = x + 10;\n }\n\n this._tooltipPosition.set({ x, y });\n }\n\n /**\n * Handles bar click event\n */\n private handleBarClick(event: MouseEvent, datum: AXBarChartData): void {\n this.barClick.emit({ item: datum, event: { nativeEvent: event, sender: this } });\n }\n\n /**\n * Shows a message when no data is available\n */\n private showNoDataMessage(containerElement: HTMLElement): void {\n // Clear existing contents first\n this.d3.select(containerElement).selectAll('*').remove();\n\n const messageContainer = this.d3\n .select(containerElement)\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-message')\n .style('position', 'absolute')\n .style('left', '50%')\n .style('top', '50%')\n .style('transform', 'translate(-50%, -50%)')\n .style('text-align', 'center')\n .style('background-color', 'rgb(var(--ax-comp-bar-chart-bg-color))')\n .style('padding', '1.5rem')\n .style('border-radius', '0.5rem')\n .style('box-shadow', '0 2px 12px rgba(0, 0, 0, 0.08)')\n .style('width', '80%')\n .style('max-width', '300px');\n\n // Add an icon\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-icon')\n .style('opacity', '0.6')\n .style('margin-bottom', '0.75rem')\n .html('<i class=\"fa-light fa-chart-column fa-2x\"></i>');\n\n // Add text message\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-text')\n .style('font-size', '1rem')\n .style('font-weight', '600')\n .style('margin-bottom', '0.5rem')\n .text('No data available');\n\n // Add help text\n messageContainer\n .append('div')\n .attr('class', 'ax-bar-chart-no-data-help')\n .style('font-size', '0.8rem')\n .style('opacity', '0.6')\n .text('Please provide data to display the chart');\n }\n}\n","<div class=\"ax-bar-chart\" #chartContainer>\n <!-- Shared tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAKa,MAAA,uBAAuB,GAAqB;AACvD,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,iBAAiB,EAAE,GAAG;AACtB,IAAA,eAAe,EAAE,WAAW;;MAGjB,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB,EAAE;AAC7F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC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AAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,iRAAA,EAAA,MAAA,EAAA,CAAA,k3CAAA,CAAA,EAAA;;;AEhCjD;;AAEG;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';
|
|
1
2
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
2
3
|
import { CommonModule } from '@angular/common';
|
|
3
4
|
import * as i0 from '@angular/core';
|
|
@@ -29,26 +30,6 @@ function donutChartConfig(config = {}) {
|
|
|
29
30
|
return result;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
const AXDonutChartColors = {
|
|
33
|
-
// Modern color palette suitable for data visualization
|
|
34
|
-
defaultColors: [
|
|
35
|
-
'#4361ee', // Blue
|
|
36
|
-
'#3a0ca3', // Purple
|
|
37
|
-
'#7209b7', // Violet
|
|
38
|
-
'#f72585', // Pink
|
|
39
|
-
'#4cc9f0', // Light Blue
|
|
40
|
-
'#4895ef', // Sky Blue
|
|
41
|
-
'#560bad', // Deep Purple
|
|
42
|
-
'#f15bb5', // Light Pink
|
|
43
|
-
'#00bbf9', // Cyan
|
|
44
|
-
'#00f5d4', // Teal
|
|
45
|
-
],
|
|
46
|
-
// Get a color from the palette by index with wraparound
|
|
47
|
-
getColor: (index, customPalette) => {
|
|
48
|
-
const palette = customPalette || AXDonutChartColors.defaultColors;
|
|
49
|
-
return palette[index % palette.length];
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
33
|
/**
|
|
53
34
|
* Donut Chart Component
|
|
54
35
|
* Displays data in a circular donut chart with interactive segments
|
|
@@ -94,6 +75,8 @@ class AXDonutChartComponent {
|
|
|
94
75
|
tooltipData = this._tooltipData.asReadonly();
|
|
95
76
|
// Inject configuration
|
|
96
77
|
configToken = inject(AX_DONUT_CHART_CONFIG);
|
|
78
|
+
// Inject the chart colors
|
|
79
|
+
chartColors = inject(AX_CHART_COLOR_PALETTE);
|
|
97
80
|
// Computed configuration options
|
|
98
81
|
effectiveOptions = computed(() => {
|
|
99
82
|
return {
|
|
@@ -107,7 +90,7 @@ class AXDonutChartComponent {
|
|
|
107
90
|
});
|
|
108
91
|
// Color accessor method
|
|
109
92
|
getColor(index) {
|
|
110
|
-
return
|
|
93
|
+
return getChartColor(index, this.chartColors);
|
|
111
94
|
}
|
|
112
95
|
// Segment visibility check
|
|
113
96
|
isSegmentHidden(id) {
|
|
@@ -422,10 +405,10 @@ class AXDonutChartComponent {
|
|
|
422
405
|
const minFontSize = segmentPercentage < 5
|
|
423
406
|
? 0 // Hide very small segments
|
|
424
407
|
: segmentPercentage < 10
|
|
425
|
-
?
|
|
408
|
+
? 7 // Smaller font for small segments
|
|
426
409
|
: segmentPercentage < 15
|
|
427
|
-
?
|
|
428
|
-
:
|
|
410
|
+
? 8 // Medium font for medium segments
|
|
411
|
+
: 9; // Regular font for large segments
|
|
429
412
|
// Adjust font size based on chart size
|
|
430
413
|
return Math.min(Math.max(minFontSize, (angleSize * radius) / 10), 12);
|
|
431
414
|
};
|
|
@@ -505,7 +488,7 @@ class AXDonutChartComponent {
|
|
|
505
488
|
handleSliceHover(event, datum) {
|
|
506
489
|
if (this.effectiveOptions().showTooltip !== false) {
|
|
507
490
|
const index = this.data().findIndex((item) => item.id === datum.id);
|
|
508
|
-
const color = datum.color ||
|
|
491
|
+
const color = datum.color || getChartColor(index, this.chartColors);
|
|
509
492
|
// Calculate percentage of total
|
|
510
493
|
const total = this.data().reduce((sum, item) => sum + item.value, 0);
|
|
511
494
|
const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';
|
|
@@ -651,16 +634,16 @@ class AXDonutChartComponent {
|
|
|
651
634
|
return `Donut chart with ${data.length} segments. Total value: ${total}. ${segmentDescriptions}`;
|
|
652
635
|
}
|
|
653
636
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDonutChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
654
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.11", type: AXDonutChartComponent, isStandalone: true, selector: "ax-donut-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: { segmentClick: "segmentClick", segmentHover: "segmentHover" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-
|
|
637
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.11", type: AXDonutChartComponent, isStandalone: true, selector: "ax-donut-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: { segmentClick: "segmentClick", segmentHover: "segmentHover" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-dark);--ax-comp-donut-chart-value-color: var(--ax-sys-color-on-lightest-surface)}ax-donut-chart .ax-donut-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-comp-donut-chart-data-labels-color));background-color:rgb(var(--ax-comp-donut-chart-bg-color))}ax-donut-chart .ax-donut-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-donut-chart .ax-donut-chart-no-data-message{position:absolute;text-align:center;transform:translate(-50%,-50%);background-color:rgb(var(--ax-comp-donut-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
655
638
|
}
|
|
656
639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDonutChartComponent, decorators: [{
|
|
657
640
|
type: Component,
|
|
658
|
-
args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-
|
|
641
|
+
args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-dark);--ax-comp-donut-chart-value-color: var(--ax-sys-color-on-lightest-surface)}ax-donut-chart .ax-donut-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-comp-donut-chart-data-labels-color));background-color:rgb(var(--ax-comp-donut-chart-bg-color))}ax-donut-chart .ax-donut-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-donut-chart .ax-donut-chart-no-data-message{position:absolute;text-align:center;transform:translate(-50%,-50%);background-color:rgb(var(--ax-comp-donut-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-help{font-size:.8rem;opacity:.6}\n"] }]
|
|
659
642
|
}], ctorParameters: () => [] });
|
|
660
643
|
|
|
661
644
|
/**
|
|
662
645
|
* Generated bundle index. Do not edit.
|
|
663
646
|
*/
|
|
664
647
|
|
|
665
|
-
export {
|
|
648
|
+
export { AXDonutChartComponent, AXDonutChartDefaultConfig, AX_DONUT_CHART_CONFIG, donutChartConfig };
|
|
666
649
|
//# sourceMappingURL=acorex-charts-donut-chart.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-charts-donut-chart.mjs","sources":["../../../../packages/charts/donut-chart/src/lib/donut-chart.config.ts","../../../../packages/charts/donut-chart/src/lib/donut-chart.component.ts","../../../../packages/charts/donut-chart/src/lib/donut-chart.component.html","../../../../packages/charts/donut-chart/src/acorex-charts-donut-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXDonutChartOption } from './donut-chart.type';\n\nexport const AXDonutChartDefaultConfig: AXDonutChartOption = {\n showTooltip: true,\n showDataLabels: true,\n donutWidth: 35,\n cornerRadius: 4,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_DONUT_CHART_CONFIG = new InjectionToken<AXDonutChartOption>('AX_DONUT_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.donutChart', AXDonutChartDefaultConfig);\n return AXDonutChartDefaultConfig;\n },\n});\n\nexport type PartialDonutChartConfig = Partial<AXDonutChartOption>;\n\nexport function donutChartConfig(config: PartialDonutChartConfig = {}): AXDonutChartOption {\n const result = {\n ...AXDonutChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AX_DONUT_CHART_CONFIG } from './donut-chart.config';\nimport { AXDonutChartData, AXDonutChartOption, AXDonutChartValue } from './donut-chart.type';\n\nexport const AXDonutChartColors = {\n // Modern color palette suitable for data visualization\n defaultColors: [\n '#4361ee', // Blue\n '#3a0ca3', // Purple\n '#7209b7', // Violet\n '#f72585', // Pink\n '#4cc9f0', // Light Blue\n '#4895ef', // Sky Blue\n '#560bad', // Deep Purple\n '#f15bb5', // Light Pink\n '#00bbf9', // Cyan\n '#00f5d4', // Teal\n ],\n\n // Get a color from the palette by index with wraparound\n getColor: (index: number, customPalette?: string[]): string => {\n const palette = customPalette || AXDonutChartColors.defaultColors;\n return palette[index % palette.length];\n },\n};\n\n/**\n * Donut Chart Component\n * Displays data in a circular donut chart with interactive segments\n */\n@Component({\n selector: 'ax-donut-chart',\n templateUrl: './donut-chart.component.html',\n styleUrls: ['./donut-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXDonutChartComponent implements OnDestroy {\n // Dependency Injection\n private cdr = inject(ChangeDetectorRef);\n\n // Inputs\n /** Chart data input */\n data = input<AXDonutChartValue>([]);\n\n /** Chart options input */\n options = input<AXDonutChartOption>({});\n\n // Outputs\n /** Emitted when a segment is clicked */\n segmentClick = output<AXDonutChartData>();\n\n /** Emitted when a segment has mouse hover\n * Can be used by external elements to highlight this segment\n */\n segmentHover = output<AXDonutChartData | null>();\n\n // Chart container reference\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // D3 reference - loaded asynchronously\n protected d3!: typeof import('d3');\n\n // Chart SVG reference\n private svg!: any;\n private pieData: any[] = [];\n\n // State management\n private hiddenSegments = new Set<string>();\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n // Tooltip state\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: 0,\n percentage: '0%',\n color: '',\n });\n\n // Public computed properties for the template\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_DONUT_CHART_CONFIG);\n\n // Computed configuration options\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n // Data accessor for handling different incoming data formats\n protected chartDataArray = computed((): AXDonutChartData[] => {\n return this.data() || [];\n });\n\n // Color accessor method\n protected getColor(index: number): string {\n return AXDonutChartColors.getColor(index);\n }\n\n // Segment visibility check\n protected isSegmentHidden(id: string): boolean {\n return this.hiddenSegments.has(id);\n }\n\n constructor() {\n // Dynamically load D3 and initialize the chart when the component is ready\n afterNextRender(() => {\n this._initialized.set(true);\n this.loadD3();\n });\n\n // Watch for changes to redraw the chart\n effect(() => {\n // Access inputs to track them\n this.data();\n this.effectiveOptions();\n\n // Only update if already rendered\n if (this._rendered()) {\n this.updateChart();\n }\n });\n }\n\n /**\n * Highlights a specific segment by ID\n * @param id The segment ID to highlight, or null to clear highlight\n */\n highlightSegment(id: string | null): void {\n if (!this.svg) return;\n\n // Reset all segments first\n this.svg\n .selectAll('path')\n .classed('ax-donut-chart-highlighted', false)\n .classed('ax-donut-chart-dimmed', false)\n .attr('transform', 'scale(1)');\n\n if (id !== null) {\n // Highlight the target segment\n this.svg\n .selectAll('path')\n .filter((d: any) => d?.data?.id === id)\n .classed('ax-donut-chart-highlighted', true)\n .attr('transform', 'scale(1.02)');\n\n // Dim other segments\n this.svg\n .selectAll('path')\n .filter((d: any) => d?.data?.id !== id)\n .classed('ax-donut-chart-dimmed', true);\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Toggles visibility of a segment by ID\n * @param id Segment ID to toggle\n * @returns New visibility state (true = visible, false = hidden)\n */\n toggleSegment(id: string): boolean {\n this.toggleSegmentVisibility(id);\n return !this.isSegmentHidden(id);\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n /**\n * Loads D3.js dynamically\n */\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n // If container is ready, create chart\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n protected onSegmentClick(item: AXDonutChartData): void {\n // this.toggleSegmentVisibility(item.id);\n this.segmentClick.emit(item);\n }\n\n /**\n * Creates the donut chart\n */\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n try {\n const containerElement = this.chartContainerEl().nativeElement;\n\n this.clearChart(containerElement);\n\n const data = this.chartDataArray();\n\n if (!data || data.length === 0) {\n this.showNoDataMessage();\n return;\n }\n\n // Filter out hidden segments\n const visibleData = data.filter((item) => !this.hiddenSegments.has(item.id));\n\n // If all segments are hidden, show message\n if (visibleData.length === 0) {\n this.showAllSegmentsHiddenMessage();\n return;\n }\n\n const options = this.effectiveOptions();\n const { width, height } = this.setupDimensions(containerElement, options);\n this.renderDonutChart(containerElement, width, height, visibleData);\n } catch (error) {\n console.error('Error creating donut chart:', error);\n this.handleChartError();\n }\n }\n\n /**\n * Updates the chart with new data\n */\n protected updateChart(): void {\n this.createChart(); // Recreate the chart with updated data\n }\n\n /**\n * Clears the chart container\n */\n private clearChart(container: HTMLElement): void {\n this.d3.select(container).selectAll('svg').remove();\n this._tooltipVisible.set(false);\n }\n\n /**\n * Shows a message when no data is available\n */\n private showNoDataMessage(): void {\n if (!this.chartContainerEl()?.nativeElement) return;\n\n // Clear existing contents\n const container = this.chartContainerEl().nativeElement;\n this.d3.select(container).selectAll('*').remove();\n\n const noDataMessage = this.d3\n .select(container)\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-message ax-bg-lightest ax-text-on-lightest')\n .style('left', '50%')\n .style('top', '50%');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-icon')\n .html('<i class=\"fa-light fa-chart-pie fa-2x\"></i>');\n\n noDataMessage.append('div').attr('class', 'ax-donut-chart-no-data-text').text('No data available');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-help')\n .text('Please provide data to display the chart');\n }\n\n /**\n * Shows a message when all segments are hidden\n */\n private showAllSegmentsHiddenMessage(): void {\n if (!this.chartContainerEl()?.nativeElement) return;\n\n // Clear existing contents\n const container = this.chartContainerEl().nativeElement;\n this.d3.select(container).selectAll('svg').remove();\n\n const noDataMessage = this.d3\n .select(container)\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-message ax-bg-lightest ax-text-on-lightest')\n .style('left', '50%')\n .style('top', '50%');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-icon')\n .html('<i class=\"fa-light fa-eye-slash fa-2x\"></i>');\n\n noDataMessage.append('div').attr('class', 'ax-donut-chart-no-data-text').text('All segments are hidden');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-help')\n .text('Please toggle visibility of at least one segment');\n }\n\n /**\n * Setups chart dimensions based on container and options\n */\n private setupDimensions(container: HTMLElement, options: AXDonutChartOption): { width: number; height: number } {\n // Get container dimensions or use defaults\n const containerWidth = container.clientWidth || 400;\n const containerHeight = container.clientHeight || 400;\n\n // Ensure minimum dimensions for the chart\n const minDim = 200;\n const width = Math.max(options?.width || containerWidth, minDim);\n const height = Math.max(options?.height || containerHeight, minDim);\n\n return { width, height };\n }\n\n /**\n * Renders the donut chart with visible data\n */\n private renderDonutChart(\n container: HTMLElement,\n width: number,\n height: number,\n visibleData: AXDonutChartData[],\n ): void {\n const total = visibleData.reduce((sum, item) => sum + item.value, 0);\n\n // Create SVG container with filters\n const svg = this.createSvgWithFilters(container, width, height);\n\n // Create main chart group\n this.svg = svg.append('g').attr('transform', `translate(${width / 2}, ${height / 2})`);\n\n // Create donut segments\n this.createDonutSegments(width, height, visibleData, total);\n\n // Add total in center\n this.addCenterDisplay(total);\n }\n\n /**\n * Create SVG element with filter definitions for shadows\n */\n private createSvgWithFilters(container: HTMLElement, width: number, height: number): any {\n const svg = this.d3\n .select(container)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('viewBox', `0 0 ${width} ${height}`)\n .attr('preserveAspectRatio', 'xMidYMid meet');\n\n // Add drop shadow filter\n const defs = svg.append('defs');\n const filter = defs.append('filter').attr('id', 'ax-donut-chart-segment-shadow').attr('height', '130%');\n\n filter.append('feGaussianBlur').attr('in', 'SourceAlpha').attr('stdDeviation', 2).attr('result', 'blur');\n filter.append('feOffset').attr('in', 'blur').attr('dx', 1).attr('dy', 1).attr('result', 'offsetBlur');\n\n const feComponentTransfer = filter\n .append('feComponentTransfer')\n .attr('in', 'offsetBlur')\n .attr('result', 'offsetBlur');\n\n feComponentTransfer.append('feFuncA').attr('type', 'linear').attr('slope', 0.3);\n\n const feMerge = filter.append('feMerge');\n feMerge.append('feMergeNode').attr('in', 'offsetBlur');\n feMerge.append('feMergeNode').attr('in', 'SourceGraphic');\n\n return svg;\n }\n\n /**\n * Create and render the donut segments with animations\n */\n private createDonutSegments(chartWidth: number, chartHeight: number, data: AXDonutChartData[], total: number): void {\n // Create pie layout\n const pie = this.d3\n .pie<AXDonutChartData>()\n .value((d) => d.value)\n .sort(null)\n .padAngle(0.02);\n\n // Calculate the radius of the donut chart\n const radius = (Math.min(chartWidth, chartHeight) / 2) * 0.85;\n\n // Calculate inner radius based on donutWidth percentage\n const donutWidthPercent = this.effectiveOptions().donutWidth / 100;\n const innerRadius = radius * (1 - donutWidthPercent);\n\n // Create arc generator with the configured radius and corner radius\n const arc = this.d3\n .arc()\n .innerRadius(innerRadius)\n .outerRadius(radius * 0.95)\n .cornerRadius(this.effectiveOptions().cornerRadius);\n\n // Create hover arc for animation\n const hoverArc = this.d3\n .arc()\n .innerRadius(innerRadius)\n .outerRadius(radius + 10)\n .cornerRadius(this.effectiveOptions().cornerRadius);\n\n // Create label arc generator for placing labels (middle of the donut ring)\n const labelArc = this.d3\n .arc()\n .innerRadius(innerRadius + (radius * 0.95 - innerRadius) / 2)\n .outerRadius(innerRadius + (radius * 0.95 - innerRadius) / 2);\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n // Generate pie data\n this.pieData = pie(data);\n\n // Add segments with animation\n const segments = this.svg\n .selectAll('path')\n .data(this.pieData)\n .enter()\n .append('path')\n .attr('class', 'ax-donut-chart-segment')\n .attr('fill', (d: any, i: number) => this.getColor(i))\n .style('opacity', 0)\n .style('cursor', 'pointer') // Add cursor pointer to segments\n .on('mouseenter', (event: MouseEvent, d: any) => {\n if (!this.effectiveOptions().showTooltip) return;\n this.handleSliceHover(event, d.data);\n })\n .on('mouseleave', (event: MouseEvent, d: any) => {\n this.handleSegmentLeave(event, d, arc);\n })\n .on('mousemove', (event: MouseEvent) => {\n if (this._tooltipVisible()) {\n this.updateTooltipPosition(event);\n }\n })\n .on('click', (event: MouseEvent, d: any) => {\n this.onSegmentClick(d.data);\n });\n\n // Animate segments\n segments\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .delay((d: any, i: number) => i * 50)\n .style('opacity', 1)\n .attrTween('d', (d: any) => {\n const interpolate = this.d3.interpolate({ startAngle: d.startAngle, endAngle: d.startAngle }, d);\n return (t: number) => arc(interpolate(t)) as string;\n });\n\n // Add data labels if enabled\n if (this.effectiveOptions().showDataLabels) {\n // Calculate optimal font size based on segment size and chart dimensions\n const calculateFontSize = (d: any) => {\n // Calculate angle size in radians for the segment\n const angleSize = d.endAngle - d.startAngle;\n // Calculate the segment's percentage of the whole\n const segmentPercentage = (d.data.value / total) * 100;\n\n // Base minimum font size on segment size\n const minFontSize =\n segmentPercentage < 5\n ? 0 // Hide very small segments\n : segmentPercentage < 10\n ? 8 // Smaller font for small segments\n : segmentPercentage < 15\n ? 9 // Medium font for medium segments\n : 10; // Regular font for large segments\n\n // Adjust font size based on chart size\n return Math.min(Math.max(minFontSize, (angleSize * radius) / 10), 12);\n };\n\n // Format percentage value with appropriate precision\n const formatPercentage = (value: number) => {\n if (value < 1) return '<1%';\n if (value < 10) return `${value.toFixed(1)}%`;\n return `${Math.round(value)}%`;\n };\n\n const labels = this.svg\n .selectAll('.ax-donut-chart-data-label')\n .data(this.pieData)\n .enter()\n .append('text')\n .attr('class', 'ax-donut-chart-data-label')\n .style('opacity', 0)\n .style('fill', 'rgb(var(--ax-comp-donut-chart-data-labels-color))')\n .attr('transform', (d) => {\n // Calculate the centroid position for the label\n const centroid = labelArc.centroid(d);\n return `translate(${centroid[0]}, ${centroid[1]})`;\n })\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', (d) => `${calculateFontSize(d)}px`)\n .style('font-weight', (d) => ((d.data.value / total) * 100 >= 15 ? '600' : '500'))\n .text((d) => {\n // Calculate percentage for labels\n const percentage = (d.data.value / total) * 100;\n // Only show if segment is large enough to display text\n if (percentage < 1) return '';\n const label = d.data.label || '';\n const percentageText = formatPercentage(percentage);\n return label ? `${label} (${percentageText})` : percentageText;\n });\n\n // Animate labels\n labels\n .transition()\n .duration(animationDuration)\n .delay((d: any, i: number) => i * 50 + 200)\n .style('opacity', 1);\n }\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n\n /**\n * Handle hover effects on a segment\n */\n private handleSliceHover(event: MouseEvent, datum: AXDonutChartData): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const index = this.data().findIndex((item) => item.id === datum.id);\n const color = datum.color || AXDonutChartColors.getColor(index);\n\n // Calculate percentage of total\n const total = this.data().reduce((sum, item) => sum + item.value, 0);\n const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';\n\n this._tooltipData.set({\n title: datum.tooltipLabel || datum.label,\n value: datum.value.toString(),\n percentage: `${percentage}%`,\n color: color,\n });\n\n this.updateTooltipPosition(event);\n this._tooltipVisible.set(true);\n }\n }\n\n /**\n * Handles mouse leave from segments\n */\n private handleSegmentLeave(event: MouseEvent, d: any, normalArc: any): void {\n // Hide tooltip\n this._tooltipVisible.set(false);\n this.cdr.detectChanges();\n\n // Emit null to indicate no segment is hovered\n this.segmentHover.emit(null);\n\n // Remove hover effect\n this.d3\n .select(event.currentTarget as HTMLElement)\n .transition()\n .duration(200)\n .attr('d', (d) => normalArc(d));\n }\n\n /**\n * Updates tooltip position\n * Ensures the tooltip is visible by adjusting position when near edges\n */\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n const cursorX = event.clientX - container.left;\n const cursorY = event.clientY - container.top;\n const gap = 20; // Gap between cursor and tooltip\n\n // Position tooltip to the right by default\n let x = cursorX + gap / 3;\n\n // If tooltip would go off the right edge, position it to the left\n if (x + tooltipRect.width > container.width) {\n x = cursorX - tooltipRect.width - gap;\n }\n\n // Keep tooltip within container bounds\n x = Math.max(gap, Math.min(x, container.width - tooltipRect.width - gap));\n const y = Math.max(gap, Math.min(cursorY, container.height - tooltipRect.height - gap));\n\n this._tooltipPosition.set({ x, y });\n }\n\n /**\n * Toggles the visibility of a segment\n */\n private toggleSegmentVisibility(id: string): void {\n if (this.hiddenSegments.has(id)) {\n this.hiddenSegments.delete(id);\n } else {\n this.hiddenSegments.add(id);\n }\n\n // Hide tooltip when toggling segments\n this._tooltipVisible.set(false);\n\n this.updateChart();\n }\n\n /**\n * Adds center display with total value\n */\n private addCenterDisplay(total: number): void {\n if (!this.svg) return;\n\n // Calculate appropriate font sizes based on chart dimensions\n const chartContainerWidth = this.chartContainerEl().nativeElement.clientWidth;\n const baseFontSize = Math.max(1.4, Math.min(2.4, chartContainerWidth / 200)); // Scale between 1.4rem and 2.4rem\n const subTextFontSize = baseFontSize * 0.5;\n\n // Create group for the total display\n const totalDisplay = this.svg\n .append('g')\n .attr('class', 'ax-donut-chart-total-display')\n .attr('text-anchor', 'middle');\n\n // Add total value\n totalDisplay\n .append('text')\n .attr('class', 'ax-donut-chart-total-value')\n .style('font-size', `${baseFontSize}rem`)\n .style('font-weight', '600')\n .style('fill', 'rgb(var(--ax-comp-donut-chart-value-color))')\n .text(total.toLocaleString());\n\n // Add label\n totalDisplay\n .append('text')\n .attr('class', 'ax-donut-chart-total-label')\n .attr('dy', '1.4em')\n .style('font-size', `${subTextFontSize}rem`)\n .style('fill', 'rgb(var(--ax-comp-donut-chart-value-color))')\n .style('opacity', '0.8')\n .text('Total');\n }\n\n /**\n * Handles chart rendering errors\n */\n private handleChartError(): void {\n const container = this.chartContainerEl()?.nativeElement;\n if (container) {\n this.showNoDataMessage();\n }\n }\n\n /**\n * Cleans up chart resources\n */\n private cleanupChart(): void {\n if (this.svg) {\n this.d3.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.pieData = [];\n }\n this.hiddenSegments.clear();\n this._tooltipVisible.set(false);\n }\n\n /**\n * Gets an accessibility label describing the donut chart for screen readers\n */\n protected getAccessibilityLabel(): string {\n const data = this.chartDataArray();\n\n if (!data || data.length === 0) {\n return 'Empty donut chart. No data available.';\n }\n\n // Calculate total\n const total = data.reduce((sum, item) => sum + item.value, 0);\n\n // Generate a description of the chart with percentages\n const segmentDescriptions = data\n .map((segment) => {\n const percentage = ((segment.value / total) * 100).toFixed(1);\n return `${segment.label}: ${segment.value} (${percentage}%)`;\n })\n .join('; ');\n\n return `Donut chart with ${data.length} segments. Total value: ${total}. ${segmentDescriptions}`;\n }\n}\n","<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKa,MAAA,yBAAyB,GAAuB;AAC3D,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,iBAAiB,EAAE,GAAG;AACtB,IAAA,eAAe,EAAE,WAAW;;MAGjB,qBAAqB,GAAG,IAAI,cAAc,CAAqB,uBAAuB,EAAE;AACnG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACvC,QAAA,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,yBAAyB,CAAC;AAC1D,QAAA,OAAO,yBAAyB;KACjC;AACF,CAAA;AAIe,SAAA,gBAAgB,CAAC,MAAA,GAAkC,EAAE,EAAA;AACnE,IAAA,MA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EAAA,sVASA,ED2CY,MAAA,EAAA,CAAA,quCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,+BAAE,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAGpC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAGX,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,YAAY,EAAE,uBAAuB,CAAC,EAC/B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,sVAAA,EAAA,MAAA,EAAA,CAAA,quCAAA,CAAA,EAAA;;;AErDjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-charts-donut-chart.mjs","sources":["../../../../packages/charts/donut-chart/src/lib/donut-chart.config.ts","../../../../packages/charts/donut-chart/src/lib/donut-chart.component.ts","../../../../packages/charts/donut-chart/src/lib/donut-chart.component.html","../../../../packages/charts/donut-chart/src/acorex-charts-donut-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXDonutChartOption } from './donut-chart.type';\n\nexport const AXDonutChartDefaultConfig: AXDonutChartOption = {\n showTooltip: true,\n showDataLabels: true,\n donutWidth: 35,\n cornerRadius: 4,\n animationDuration: 800,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_DONUT_CHART_CONFIG = new InjectionToken<AXDonutChartOption>('AX_DONUT_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.donutChart', AXDonutChartDefaultConfig);\n return AXDonutChartDefaultConfig;\n },\n});\n\nexport type PartialDonutChartConfig = Partial<AXDonutChartOption>;\n\nexport function donutChartConfig(config: PartialDonutChartConfig = {}): AXDonutChartOption {\n const result = {\n ...AXDonutChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AX_DONUT_CHART_CONFIG } from './donut-chart.config';\nimport { AXDonutChartData, AXDonutChartOption, AXDonutChartValue } from './donut-chart.type';\n\n/**\n * Donut Chart Component\n * Displays data in a circular donut chart with interactive segments\n */\n@Component({\n selector: 'ax-donut-chart',\n templateUrl: './donut-chart.component.html',\n styleUrls: ['./donut-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXDonutChartComponent implements OnDestroy {\n // Dependency Injection\n private cdr = inject(ChangeDetectorRef);\n\n // Inputs\n /** Chart data input */\n data = input<AXDonutChartValue>([]);\n\n /** Chart options input */\n options = input<AXDonutChartOption>({});\n\n // Outputs\n /** Emitted when a segment is clicked */\n segmentClick = output<AXDonutChartData>();\n\n /** Emitted when a segment has mouse hover\n * Can be used by external elements to highlight this segment\n */\n segmentHover = output<AXDonutChartData | null>();\n\n // Chart container reference\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n\n // D3 reference - loaded asynchronously\n protected d3!: typeof import('d3');\n\n // Chart SVG reference\n private svg!: any;\n private pieData: any[] = [];\n\n // State management\n private hiddenSegments = new Set<string>();\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n // Tooltip state\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: 0,\n percentage: '0%',\n color: '',\n });\n\n // Public computed properties for the template\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_DONUT_CHART_CONFIG);\n\n // Inject the chart colors\n private chartColors = inject(AX_CHART_COLOR_PALETTE);\n\n // Computed configuration options\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n // Data accessor for handling different incoming data formats\n protected chartDataArray = computed((): AXDonutChartData[] => {\n return this.data() || [];\n });\n\n // Color accessor method\n protected getColor(index: number): string {\n return getChartColor(index, this.chartColors);\n }\n\n // Segment visibility check\n protected isSegmentHidden(id: string): boolean {\n return this.hiddenSegments.has(id);\n }\n\n constructor() {\n // Dynamically load D3 and initialize the chart when the component is ready\n afterNextRender(() => {\n this._initialized.set(true);\n this.loadD3();\n });\n\n // Watch for changes to redraw the chart\n effect(() => {\n // Access inputs to track them\n this.data();\n this.effectiveOptions();\n\n // Only update if already rendered\n if (this._rendered()) {\n this.updateChart();\n }\n });\n }\n\n /**\n * Highlights a specific segment by ID\n * @param id The segment ID to highlight, or null to clear highlight\n */\n highlightSegment(id: string | null): void {\n if (!this.svg) return;\n\n // Reset all segments first\n this.svg\n .selectAll('path')\n .classed('ax-donut-chart-highlighted', false)\n .classed('ax-donut-chart-dimmed', false)\n .attr('transform', 'scale(1)');\n\n if (id !== null) {\n // Highlight the target segment\n this.svg\n .selectAll('path')\n .filter((d: any) => d?.data?.id === id)\n .classed('ax-donut-chart-highlighted', true)\n .attr('transform', 'scale(1.02)');\n\n // Dim other segments\n this.svg\n .selectAll('path')\n .filter((d: any) => d?.data?.id !== id)\n .classed('ax-donut-chart-dimmed', true);\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Toggles visibility of a segment by ID\n * @param id Segment ID to toggle\n * @returns New visibility state (true = visible, false = hidden)\n */\n toggleSegment(id: string): boolean {\n this.toggleSegmentVisibility(id);\n return !this.isSegmentHidden(id);\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n /**\n * Loads D3.js dynamically\n */\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n // If container is ready, create chart\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n protected onSegmentClick(item: AXDonutChartData): void {\n // this.toggleSegmentVisibility(item.id);\n this.segmentClick.emit(item);\n }\n\n /**\n * Creates the donut chart\n */\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n try {\n const containerElement = this.chartContainerEl().nativeElement;\n\n this.clearChart(containerElement);\n\n const data = this.chartDataArray();\n\n if (!data || data.length === 0) {\n this.showNoDataMessage();\n return;\n }\n\n // Filter out hidden segments\n const visibleData = data.filter((item) => !this.hiddenSegments.has(item.id));\n\n // If all segments are hidden, show message\n if (visibleData.length === 0) {\n this.showAllSegmentsHiddenMessage();\n return;\n }\n\n const options = this.effectiveOptions();\n const { width, height } = this.setupDimensions(containerElement, options);\n this.renderDonutChart(containerElement, width, height, visibleData);\n } catch (error) {\n console.error('Error creating donut chart:', error);\n this.handleChartError();\n }\n }\n\n /**\n * Updates the chart with new data\n */\n protected updateChart(): void {\n this.createChart(); // Recreate the chart with updated data\n }\n\n /**\n * Clears the chart container\n */\n private clearChart(container: HTMLElement): void {\n this.d3.select(container).selectAll('svg').remove();\n this._tooltipVisible.set(false);\n }\n\n /**\n * Shows a message when no data is available\n */\n private showNoDataMessage(): void {\n if (!this.chartContainerEl()?.nativeElement) return;\n\n // Clear existing contents\n const container = this.chartContainerEl().nativeElement;\n this.d3.select(container).selectAll('*').remove();\n\n const noDataMessage = this.d3\n .select(container)\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-message ax-bg-lightest ax-text-on-lightest')\n .style('left', '50%')\n .style('top', '50%');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-icon')\n .html('<i class=\"fa-light fa-chart-pie fa-2x\"></i>');\n\n noDataMessage.append('div').attr('class', 'ax-donut-chart-no-data-text').text('No data available');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-help')\n .text('Please provide data to display the chart');\n }\n\n /**\n * Shows a message when all segments are hidden\n */\n private showAllSegmentsHiddenMessage(): void {\n if (!this.chartContainerEl()?.nativeElement) return;\n\n // Clear existing contents\n const container = this.chartContainerEl().nativeElement;\n this.d3.select(container).selectAll('svg').remove();\n\n const noDataMessage = this.d3\n .select(container)\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-message ax-bg-lightest ax-text-on-lightest')\n .style('left', '50%')\n .style('top', '50%');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-icon')\n .html('<i class=\"fa-light fa-eye-slash fa-2x\"></i>');\n\n noDataMessage.append('div').attr('class', 'ax-donut-chart-no-data-text').text('All segments are hidden');\n\n noDataMessage\n .append('div')\n .attr('class', 'ax-donut-chart-no-data-help')\n .text('Please toggle visibility of at least one segment');\n }\n\n /**\n * Setups chart dimensions based on container and options\n */\n private setupDimensions(container: HTMLElement, options: AXDonutChartOption): { width: number; height: number } {\n // Get container dimensions or use defaults\n const containerWidth = container.clientWidth || 400;\n const containerHeight = container.clientHeight || 400;\n\n // Ensure minimum dimensions for the chart\n const minDim = 200;\n const width = Math.max(options?.width || containerWidth, minDim);\n const height = Math.max(options?.height || containerHeight, minDim);\n\n return { width, height };\n }\n\n /**\n * Renders the donut chart with visible data\n */\n private renderDonutChart(\n container: HTMLElement,\n width: number,\n height: number,\n visibleData: AXDonutChartData[],\n ): void {\n const total = visibleData.reduce((sum, item) => sum + item.value, 0);\n\n // Create SVG container with filters\n const svg = this.createSvgWithFilters(container, width, height);\n\n // Create main chart group\n this.svg = svg.append('g').attr('transform', `translate(${width / 2}, ${height / 2})`);\n\n // Create donut segments\n this.createDonutSegments(width, height, visibleData, total);\n\n // Add total in center\n this.addCenterDisplay(total);\n }\n\n /**\n * Create SVG element with filter definitions for shadows\n */\n private createSvgWithFilters(container: HTMLElement, width: number, height: number): any {\n const svg = this.d3\n .select(container)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('viewBox', `0 0 ${width} ${height}`)\n .attr('preserveAspectRatio', 'xMidYMid meet');\n\n // Add drop shadow filter\n const defs = svg.append('defs');\n const filter = defs.append('filter').attr('id', 'ax-donut-chart-segment-shadow').attr('height', '130%');\n\n filter.append('feGaussianBlur').attr('in', 'SourceAlpha').attr('stdDeviation', 2).attr('result', 'blur');\n filter.append('feOffset').attr('in', 'blur').attr('dx', 1).attr('dy', 1).attr('result', 'offsetBlur');\n\n const feComponentTransfer = filter\n .append('feComponentTransfer')\n .attr('in', 'offsetBlur')\n .attr('result', 'offsetBlur');\n\n feComponentTransfer.append('feFuncA').attr('type', 'linear').attr('slope', 0.3);\n\n const feMerge = filter.append('feMerge');\n feMerge.append('feMergeNode').attr('in', 'offsetBlur');\n feMerge.append('feMergeNode').attr('in', 'SourceGraphic');\n\n return svg;\n }\n\n /**\n * Create and render the donut segments with animations\n */\n private createDonutSegments(chartWidth: number, chartHeight: number, data: AXDonutChartData[], total: number): void {\n // Create pie layout\n const pie = this.d3\n .pie<AXDonutChartData>()\n .value((d) => d.value)\n .sort(null)\n .padAngle(0.02);\n\n // Calculate the radius of the donut chart\n const radius = (Math.min(chartWidth, chartHeight) / 2) * 0.85;\n\n // Calculate inner radius based on donutWidth percentage\n const donutWidthPercent = this.effectiveOptions().donutWidth / 100;\n const innerRadius = radius * (1 - donutWidthPercent);\n\n // Create arc generator with the configured radius and corner radius\n const arc = this.d3\n .arc()\n .innerRadius(innerRadius)\n .outerRadius(radius * 0.95)\n .cornerRadius(this.effectiveOptions().cornerRadius);\n\n // Create hover arc for animation\n const hoverArc = this.d3\n .arc()\n .innerRadius(innerRadius)\n .outerRadius(radius + 10)\n .cornerRadius(this.effectiveOptions().cornerRadius);\n\n // Create label arc generator for placing labels (middle of the donut ring)\n const labelArc = this.d3\n .arc()\n .innerRadius(innerRadius + (radius * 0.95 - innerRadius) / 2)\n .outerRadius(innerRadius + (radius * 0.95 - innerRadius) / 2);\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n // Generate pie data\n this.pieData = pie(data);\n\n // Add segments with animation\n const segments = this.svg\n .selectAll('path')\n .data(this.pieData)\n .enter()\n .append('path')\n .attr('class', 'ax-donut-chart-segment')\n .attr('fill', (d: any, i: number) => this.getColor(i))\n .style('opacity', 0)\n .style('cursor', 'pointer') // Add cursor pointer to segments\n .on('mouseenter', (event: MouseEvent, d: any) => {\n if (!this.effectiveOptions().showTooltip) return;\n this.handleSliceHover(event, d.data);\n })\n .on('mouseleave', (event: MouseEvent, d: any) => {\n this.handleSegmentLeave(event, d, arc);\n })\n .on('mousemove', (event: MouseEvent) => {\n if (this._tooltipVisible()) {\n this.updateTooltipPosition(event);\n }\n })\n .on('click', (event: MouseEvent, d: any) => {\n this.onSegmentClick(d.data);\n });\n\n // Animate segments\n segments\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .delay((d: any, i: number) => i * 50)\n .style('opacity', 1)\n .attrTween('d', (d: any) => {\n const interpolate = this.d3.interpolate({ startAngle: d.startAngle, endAngle: d.startAngle }, d);\n return (t: number) => arc(interpolate(t)) as string;\n });\n\n // Add data labels if enabled\n if (this.effectiveOptions().showDataLabels) {\n // Calculate optimal font size based on segment size and chart dimensions\n const calculateFontSize = (d: any) => {\n // Calculate angle size in radians for the segment\n const angleSize = d.endAngle - d.startAngle;\n // Calculate the segment's percentage of the whole\n const segmentPercentage = (d.data.value / total) * 100;\n\n // Base minimum font size on segment size\n const minFontSize =\n segmentPercentage < 5\n ? 0 // Hide very small segments\n : segmentPercentage < 10\n ? 7 // Smaller font for small segments\n : segmentPercentage < 15\n ? 8 // Medium font for medium segments\n : 9; // Regular font for large segments\n\n // Adjust font size based on chart size\n return Math.min(Math.max(minFontSize, (angleSize * radius) / 10), 12);\n };\n\n // Format percentage value with appropriate precision\n const formatPercentage = (value: number) => {\n if (value < 1) return '<1%';\n if (value < 10) return `${value.toFixed(1)}%`;\n return `${Math.round(value)}%`;\n };\n\n const labels = this.svg\n .selectAll('.ax-donut-chart-data-label')\n .data(this.pieData)\n .enter()\n .append('text')\n .attr('class', 'ax-donut-chart-data-label')\n .style('opacity', 0)\n .style('fill', 'rgb(var(--ax-comp-donut-chart-data-labels-color))')\n .attr('transform', (d) => {\n // Calculate the centroid position for the label\n const centroid = labelArc.centroid(d);\n return `translate(${centroid[0]}, ${centroid[1]})`;\n })\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', (d) => `${calculateFontSize(d)}px`)\n .style('font-weight', (d) => ((d.data.value / total) * 100 >= 15 ? '600' : '500'))\n .text((d) => {\n // Calculate percentage for labels\n const percentage = (d.data.value / total) * 100;\n // Only show if segment is large enough to display text\n if (percentage < 1) return '';\n const label = d.data.label || '';\n const percentageText = formatPercentage(percentage);\n return label ? `${label} (${percentageText})` : percentageText;\n });\n\n // Animate labels\n labels\n .transition()\n .duration(animationDuration)\n .delay((d: any, i: number) => i * 50 + 200)\n .style('opacity', 1);\n }\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n\n /**\n * Handle hover effects on a segment\n */\n private handleSliceHover(event: MouseEvent, datum: AXDonutChartData): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const index = this.data().findIndex((item) => item.id === datum.id);\n const color = datum.color || getChartColor(index, this.chartColors);\n\n // Calculate percentage of total\n const total = this.data().reduce((sum, item) => sum + item.value, 0);\n const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';\n\n this._tooltipData.set({\n title: datum.tooltipLabel || datum.label,\n value: datum.value.toString(),\n percentage: `${percentage}%`,\n color: color,\n });\n\n this.updateTooltipPosition(event);\n this._tooltipVisible.set(true);\n }\n }\n\n /**\n * Handles mouse leave from segments\n */\n private handleSegmentLeave(event: MouseEvent, d: any, normalArc: any): void {\n // Hide tooltip\n this._tooltipVisible.set(false);\n this.cdr.detectChanges();\n\n // Emit null to indicate no segment is hovered\n this.segmentHover.emit(null);\n\n // Remove hover effect\n this.d3\n .select(event.currentTarget as HTMLElement)\n .transition()\n .duration(200)\n .attr('d', (d) => normalArc(d));\n }\n\n /**\n * Updates tooltip position\n * Ensures the tooltip is visible by adjusting position when near edges\n */\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n const cursorX = event.clientX - container.left;\n const cursorY = event.clientY - container.top;\n const gap = 20; // Gap between cursor and tooltip\n\n // Position tooltip to the right by default\n let x = cursorX + gap / 3;\n\n // If tooltip would go off the right edge, position it to the left\n if (x + tooltipRect.width > container.width) {\n x = cursorX - tooltipRect.width - gap;\n }\n\n // Keep tooltip within container bounds\n x = Math.max(gap, Math.min(x, container.width - tooltipRect.width - gap));\n const y = Math.max(gap, Math.min(cursorY, container.height - tooltipRect.height - gap));\n\n this._tooltipPosition.set({ x, y });\n }\n\n /**\n * Toggles the visibility of a segment\n */\n private toggleSegmentVisibility(id: string): void {\n if (this.hiddenSegments.has(id)) {\n this.hiddenSegments.delete(id);\n } else {\n this.hiddenSegments.add(id);\n }\n\n // Hide tooltip when toggling segments\n this._tooltipVisible.set(false);\n\n this.updateChart();\n }\n\n /**\n * Adds center display with total value\n */\n private addCenterDisplay(total: number): void {\n if (!this.svg) return;\n\n // Calculate appropriate font sizes based on chart dimensions\n const chartContainerWidth = this.chartContainerEl().nativeElement.clientWidth;\n const baseFontSize = Math.max(1.4, Math.min(2.4, chartContainerWidth / 200)); // Scale between 1.4rem and 2.4rem\n const subTextFontSize = baseFontSize * 0.5;\n\n // Create group for the total display\n const totalDisplay = this.svg\n .append('g')\n .attr('class', 'ax-donut-chart-total-display')\n .attr('text-anchor', 'middle');\n\n // Add total value\n totalDisplay\n .append('text')\n .attr('class', 'ax-donut-chart-total-value')\n .style('font-size', `${baseFontSize}rem`)\n .style('font-weight', '600')\n .style('fill', 'rgb(var(--ax-comp-donut-chart-value-color))')\n .text(total.toLocaleString());\n\n // Add label\n totalDisplay\n .append('text')\n .attr('class', 'ax-donut-chart-total-label')\n .attr('dy', '1.4em')\n .style('font-size', `${subTextFontSize}rem`)\n .style('fill', 'rgb(var(--ax-comp-donut-chart-value-color))')\n .style('opacity', '0.8')\n .text('Total');\n }\n\n /**\n * Handles chart rendering errors\n */\n private handleChartError(): void {\n const container = this.chartContainerEl()?.nativeElement;\n if (container) {\n this.showNoDataMessage();\n }\n }\n\n /**\n * Cleans up chart resources\n */\n private cleanupChart(): void {\n if (this.svg) {\n this.d3.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.pieData = [];\n }\n this.hiddenSegments.clear();\n this._tooltipVisible.set(false);\n }\n\n /**\n * Gets an accessibility label describing the donut chart for screen readers\n */\n protected getAccessibilityLabel(): string {\n const data = this.chartDataArray();\n\n if (!data || data.length === 0) {\n return 'Empty donut chart. No data available.';\n }\n\n // Calculate total\n const total = data.reduce((sum, item) => sum + item.value, 0);\n\n // Generate a description of the chart with percentages\n const segmentDescriptions = data\n .map((segment) => {\n const percentage = ((segment.value / total) * 100).toFixed(1);\n return `${segment.label}: ${segment.value} (${percentage}%)`;\n })\n .join('; ');\n\n return `Donut chart with ${data.length} segments. Total value: ${total}. ${segmentDescriptions}`;\n }\n}\n","<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKa,MAAA,yBAAyB,GAAuB;AAC3D,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,iBAAiB,EAAE,GAAG;AACtB,IAAA,eAAe,EAAE,WAAW;;MAGjB,qBAAqB,GAAG,IAAI,cAAc,CAAqB,uBAAuB,EAAE;AACnG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACvC,QAAA,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,yBAAyB,CAAC;AAC1D,QAAA,OAAO,yBAAyB;KACjC;AACF,CAAA;AAIe,SAAA,gBAAgB,CAAC,MAAA,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AAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAGpC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAGX,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,YAAY,EAAE,uBAAuB,CAAC,EAC/B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,sVAAA,EAAA,MAAA,EAAA,CAAA,ouCAAA,CAAA,EAAA;;;AEhCjD;;AAEG;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NXComponent } from '@acorex/cdk/common';
|
|
2
|
+
import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';
|
|
2
3
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
4
|
import { CommonModule } from '@angular/common';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
@@ -46,24 +47,6 @@ function lineChartConfig(config = {}) {
|
|
|
46
47
|
return result;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
const AXLineChartColors = {
|
|
50
|
-
defaultColors: [
|
|
51
|
-
'#4361ee',
|
|
52
|
-
'#3a0ca3',
|
|
53
|
-
'#7209b7',
|
|
54
|
-
'#f72585',
|
|
55
|
-
'#4cc9f0',
|
|
56
|
-
'#4895ef',
|
|
57
|
-
'#560bad',
|
|
58
|
-
'#f15bb5',
|
|
59
|
-
'#00bbf9',
|
|
60
|
-
'#00f5d4',
|
|
61
|
-
],
|
|
62
|
-
getColor: (index, customPalette) => {
|
|
63
|
-
const palette = customPalette || AXLineChartColors.defaultColors;
|
|
64
|
-
return palette[index % palette.length];
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
50
|
/**
|
|
68
51
|
* Line Chart Component for rendering data as lines with interactive hover effects and animations
|
|
69
52
|
*/
|
|
@@ -97,6 +80,8 @@ class AXLineChartComponent extends NXComponent {
|
|
|
97
80
|
tooltipData = this._tooltipData.asReadonly();
|
|
98
81
|
// Inject configuration
|
|
99
82
|
configToken = inject(AX_LINE_CHART_CONFIG);
|
|
83
|
+
// Inject the chart colors
|
|
84
|
+
chartColors = inject(AX_CHART_COLOR_PALETTE);
|
|
100
85
|
effectiveOptions = computed(() => {
|
|
101
86
|
return {
|
|
102
87
|
...this.configToken,
|
|
@@ -455,7 +440,7 @@ class AXLineChartComponent extends NXComponent {
|
|
|
455
440
|
.attr('class', `ax-line-chart-series ax-line-chart-series-${seriesIndex}`)
|
|
456
441
|
.attr('data-series', series.label || `series-${seriesIndex}`)
|
|
457
442
|
.attr('pointer-events', 'none'); // Disable pointer events during animation
|
|
458
|
-
const lineColor = series.lineColor ||
|
|
443
|
+
const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);
|
|
459
444
|
const fillColor = series.fillColor || lineColor;
|
|
460
445
|
const line = seriesGroup
|
|
461
446
|
.append('path')
|
|
@@ -535,7 +520,7 @@ class AXLineChartComponent extends NXComponent {
|
|
|
535
520
|
data.forEach((series, seriesIndex) => {
|
|
536
521
|
if (!series.data || series.data.length === 0)
|
|
537
522
|
return;
|
|
538
|
-
const lineColor = series.lineColor ||
|
|
523
|
+
const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);
|
|
539
524
|
const maxPoints = 100;
|
|
540
525
|
const pointData = series.data.length > maxPoints ? this.getReducedDataPoints(series.data, maxPoints) : series.data;
|
|
541
526
|
pointData.forEach((point) => {
|
|
@@ -558,7 +543,7 @@ class AXLineChartComponent extends NXComponent {
|
|
|
558
543
|
data.forEach((series, seriesIndex) => {
|
|
559
544
|
if (!series.data || series.data.length === 0)
|
|
560
545
|
return;
|
|
561
|
-
const lineColor = series.lineColor ||
|
|
546
|
+
const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);
|
|
562
547
|
const pointsGroup = allPointsGroup
|
|
563
548
|
.append('g')
|
|
564
549
|
.attr('class', `ax-line-chart-points ax-line-chart-points-${seriesIndex}`)
|
|
@@ -655,6 +640,9 @@ class AXLineChartComponent extends NXComponent {
|
|
|
655
640
|
}
|
|
656
641
|
}
|
|
657
642
|
enablePointerEventsAfterAnimation() {
|
|
643
|
+
// Guard against null chart or svg
|
|
644
|
+
if (!this.chart || !this.svg)
|
|
645
|
+
return;
|
|
658
646
|
// Enable pointer events for all chart elements after animation completes
|
|
659
647
|
this.chart.selectAll('.ax-line-chart-all-series').attr('pointer-events', 'all');
|
|
660
648
|
this.chart.selectAll('.ax-line-chart-series').attr('pointer-events', 'all');
|
|
@@ -698,7 +686,7 @@ class AXLineChartComponent extends NXComponent {
|
|
|
698
686
|
}
|
|
699
687
|
handlePointHover(event, dataPoint, series, seriesIndex) {
|
|
700
688
|
if (this.effectiveOptions().showTooltip !== false) {
|
|
701
|
-
const color = series.lineColor ||
|
|
689
|
+
const color = series.lineColor || getChartColor(seriesIndex, this.chartColors);
|
|
702
690
|
this._tooltipData.set({
|
|
703
691
|
title: dataPoint.tooltipLabel || series.tooltipLabel || series.label || `Series ${seriesIndex + 1}`,
|
|
704
692
|
value: dataPoint.y.toString(),
|
|
@@ -834,7 +822,7 @@ class AXLineChartComponent extends NXComponent {
|
|
|
834
822
|
seriesName: '',
|
|
835
823
|
color: '',
|
|
836
824
|
items: overlappingPoints.map(({ point, series, seriesIndex }) => {
|
|
837
|
-
const color = series.lineColor ||
|
|
825
|
+
const color = series.lineColor || getChartColor(seriesIndex, this.chartColors);
|
|
838
826
|
return {
|
|
839
827
|
label: series.label || `Series ${seriesIndex + 1}`,
|
|
840
828
|
value: point.y.toString(),
|
|
@@ -888,5 +876,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
888
876
|
* Generated bundle index. Do not edit.
|
|
889
877
|
*/
|
|
890
878
|
|
|
891
|
-
export {
|
|
879
|
+
export { AXLineChartComponent, AXLineChartDefaultConfig, AX_LINE_CHART_CONFIG, lineChartConfig };
|
|
892
880
|
//# sourceMappingURL=acorex-charts-line-chart.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-charts-line-chart.mjs","sources":["../../../../packages/charts/line-chart/src/lib/line-chart.config.ts","../../../../packages/charts/line-chart/src/lib/line-chart.component.ts","../../../../packages/charts/line-chart/src/lib/line-chart.component.html","../../../../packages/charts/line-chart/src/acorex-charts-line-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXLineChartOption } from './line-chart.type';\n\nexport const AXLineChartDefaultConfig: AXLineChartOption = {\n margins: {\n top: 20,\n right: 25,\n bottom: 40,\n left: 50,\n },\n showXAxis: true,\n showYAxis: true,\n showGrid: true,\n showVerticalGrid: false,\n yAxisStartsAtZero: true,\n axisPadding: 5,\n showTooltip: true,\n lineWidth: 2,\n showPoints: true,\n pointRadius: 4,\n smoothLine: false,\n fillArea: false,\n fillOpacity: 20,\n showCrosshair: false,\n animationDuration: 1000,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_LINE_CHART_CONFIG = new InjectionToken<AXLineChartOption>('AX_LINE_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.lineChart', AXLineChartDefaultConfig);\n return AXLineChartDefaultConfig;\n },\n});\n\nexport type PartialLineChartConfig = Partial<AXLineChartOption>;\n\nexport function lineChartConfig(config: PartialLineChartConfig = {}): AXLineChartOption {\n const result = {\n ...AXLineChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { NXComponent } from '@acorex/cdk/common';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AX_LINE_CHART_CONFIG } from './line-chart.config';\nimport { AXLineChartData, AXLineChartOption, AXLineChartPointClickEvent, AXLineChartValue } from './line-chart.type';\n\nexport const AXLineChartColors = {\n defaultColors: [\n '#4361ee',\n '#3a0ca3',\n '#7209b7',\n '#f72585',\n '#4cc9f0',\n '#4895ef',\n '#560bad',\n '#f15bb5',\n '#00bbf9',\n '#00f5d4',\n ],\n\n getColor: (index: number, customPalette?: string[]): string => {\n const palette = customPalette || AXLineChartColors.defaultColors;\n return palette[index % palette.length];\n },\n};\n\n/**\n * Line Chart Component for rendering data as lines with interactive hover effects and animations\n */\n@Component({\n selector: 'ax-line-chart',\n templateUrl: './line-chart.component.html',\n styleUrls: ['./line-chart.component.scss'],\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXLineChartComponent extends NXComponent implements OnInit, AfterViewInit, OnDestroy {\n data = input<AXLineChartValue>([]);\n options = input<AXLineChartOption>({});\n pointClick = output<AXLineChartPointClickEvent>();\n\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n protected d3!: typeof import('d3');\n\n private svg!: any;\n private chart!: any;\n private xScale!: any;\n private yScale!: any;\n private xAxis!: any;\n private yAxis!: any;\n\n private width!: number;\n private height!: number;\n private margin = { top: 20, right: 25, bottom: 40, left: 50 };\n\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: '0',\n percentage: '0%',\n color: '',\n });\n\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_LINE_CHART_CONFIG);\n\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n ngOnInit(): void {\n this.loadD3();\n }\n\n #effect = effect(() => {\n this.data();\n this.effectiveOptions();\n\n if (this._rendered()) {\n this.updateChart();\n }\n });\n\n ngAfterViewInit(): void {\n this._initialized.set(true);\n if (this.d3 && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n const containerElement = this.chartContainerEl().nativeElement;\n const chartData = this.data();\n let normalizedData: AXLineChartData[] = [];\n\n if (Array.isArray(chartData)) {\n normalizedData = chartData as AXLineChartData[];\n } else if (chartData && 'data' in chartData) {\n normalizedData = [chartData as AXLineChartData];\n }\n\n this.d3.select(containerElement).selectAll('svg').remove();\n\n if (normalizedData.length === 0 || normalizedData.some((series) => !series.data || series.data.length === 0)) {\n this.showNoDataMessage(containerElement);\n return;\n }\n\n const chartOptions = this.effectiveOptions();\n this.setupDimensions(containerElement, chartOptions);\n this.setupScales(normalizedData);\n this.createAxes(chartOptions);\n this.renderLines(normalizedData);\n }\n\n protected updateChart(): void {\n this.createChart();\n }\n\n protected cleanupChart(): void {\n if (this.svg) {\n this.d3?.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.chart = null;\n }\n this._tooltipVisible.set(false);\n }\n\n private setupDimensions(containerElement: HTMLElement, options: AXLineChartOption): void {\n this.calculateMargins(options);\n\n const containerWidth = containerElement.clientWidth;\n const containerHeight = containerElement.clientHeight;\n const minDim = Math.min(200, containerWidth, containerHeight);\n\n if (options.width && options.height) {\n this.width = options.width - this.margin.left - this.margin.right;\n this.height = options.height - this.margin.top - this.margin.bottom;\n } else {\n this.width = Math.max(containerWidth, minDim) - this.margin.left - this.margin.right;\n this.height = Math.max(containerHeight, minDim) - this.margin.top - this.margin.bottom;\n }\n\n this.width = Math.max(this.width, 100);\n this.height = Math.max(this.height, 100);\n\n const totalWidth = this.width + this.margin.left + this.margin.right;\n const totalHeight = this.height + this.margin.top + this.margin.bottom;\n\n const svg = this.d3\n .select(containerElement)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('viewBox', `0 0 ${totalWidth} ${totalHeight}`)\n .attr('preserveAspectRatio', 'xMidYMid meet')\n .attr(\n 'style',\n `\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: visible;\n `,\n );\n\n this.svg = svg;\n this.chart = this.svg.append('g').attr('transform', `translate(${this.margin.left},${this.margin.top})`);\n }\n\n private calculateMargins(options: AXLineChartOption): void {\n this.margin = {\n top: options.margins?.top ?? 20,\n right: options.margins?.right ?? 25,\n bottom: options.margins?.bottom ?? 40,\n left: options.margins?.left ?? 50,\n };\n\n if (options.xAxisLabel) {\n const xLabelLength = options.xAxisLabel.length;\n const extraBottomMargin = Math.min(20, Math.max(10, xLabelLength * 0.8));\n this.margin.bottom = Math.max(this.margin.bottom, 40 + extraBottomMargin);\n }\n\n if (options.yAxisLabel) {\n const yLabelLength = options.yAxisLabel.length;\n const extraLeftMargin = Math.min(20, Math.max(10, yLabelLength * 0.8));\n this.margin.left = Math.max(this.margin.left, 50 + extraLeftMargin);\n }\n\n if (options.showXAxis !== false) {\n this.margin.bottom = Math.max(this.margin.bottom, 45);\n }\n\n if (options.showYAxis !== false) {\n this.margin.left = Math.max(this.margin.left, 55);\n }\n }\n\n private setupScales(data: AXLineChartData[]): void {\n const chartOptions = this.effectiveOptions();\n const padding = chartOptions.axisPadding ?? 0;\n const paddingMultiplier = padding / 100;\n const allDataPoints = data.flatMap((series) => series.data);\n const allNumericX = allDataPoints.every((d) => typeof d.x === 'number');\n const allDates = !allNumericX && allDataPoints.every((d) => !isNaN(new Date(d.x).getTime()));\n\n if (allNumericX) {\n const xMin = this.d3.min(allDataPoints, (d) => d.x as number) || 0;\n const xMax = this.d3.max(allDataPoints, (d) => d.x as number) || 0;\n\n if (xMin === xMax) {\n this.xScale = this.d3\n .scaleLinear()\n .domain([xMin - 1, xMax + 1])\n .range([0, this.width]);\n } else {\n this.xScale = this.d3.scaleLinear().domain([xMin, xMax]).range([0, this.width]);\n }\n } else if (allDates) {\n const xMin = this.d3.min(allDataPoints, (d) => new Date(d.x as string)) || new Date();\n const xMax = this.d3.max(allDataPoints, (d) => new Date(d.x as string)) || new Date();\n\n if (xMin.getTime() === xMax.getTime()) {\n const oneDayMs = 86400000;\n this.xScale = this.d3\n .scaleTime()\n .domain([new Date(xMin.getTime() - oneDayMs), new Date(xMax.getTime() + oneDayMs)])\n .range([0, this.width]);\n } else {\n this.xScale = this.d3.scaleTime().domain([xMin, xMax]).range([0, this.width]);\n }\n } else {\n this.xScale = this.d3\n .scaleBand()\n .domain(allDataPoints.map((d) => String(d.x)))\n .range([0, this.width])\n .paddingInner(0.2)\n .paddingOuter(0);\n }\n\n const yAxisStartsAtZero = chartOptions.yAxisStartsAtZero !== false;\n const yMin = yAxisStartsAtZero ? 0 : this.d3.min(allDataPoints, (d) => d.y) || 0;\n const yMax = this.d3.max(allDataPoints, (d) => d.y) || 0;\n const yRange = yMax - yMin;\n\n this.yScale = this.d3\n .scaleLinear()\n .domain([yMin, yMax + yRange * paddingMultiplier])\n .nice()\n .range([this.height, 0]);\n }\n\n private createAxes(options: AXLineChartOption): void {\n const showXAxis = options.showXAxis !== false;\n const showYAxis = options.showYAxis !== false;\n const showGrid = options.showGrid !== false;\n const isBandScale = this.xScale.bandwidth !== undefined;\n const axesGroup = this.chart.append('g').attr('class', 'ax-line-chart-axes');\n\n if (showXAxis) {\n this.xAxis = axesGroup\n .append('g')\n .attr('class', 'ax-line-chart-axis-x')\n .attr('transform', `translate(0,${this.height})`)\n .call(this.d3.axisBottom(this.xScale).tickSize(5).tickPadding(8));\n\n // Style the x-axis path and lines\n this.xAxis.selectAll('path').attr('stroke', 'rgba(var(--ax-comp-line-chart-axis-color), 0.2)');\n\n this.xAxis\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n this.xAxis.selectAll('text').attr(\n 'style',\n `\n font-size: 11px;\n font-weight: 400;\n fill: rgba(var(--ax-comp-line-chart-labels-color), 0.7);\n `,\n );\n\n if (options.xAxisLabel) {\n const labelY = this.height + this.margin.bottom * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-line-chart-axis-label ax-x-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('x', this.width / 2)\n .attr('y', labelY)\n .attr('transform', 'translate(0, 5)')\n .attr(\n 'font-family',\n 'var(--ax-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)',\n )\n .attr(\n 'style',\n `\n font-size: 13px;\n font-weight: 500;\n fill: rgb(var(--ax-comp-line-chart-text-color));\n pointer-events: none;\n `,\n )\n .text(options.xAxisLabel);\n }\n }\n\n if (showYAxis) {\n this.yAxis = axesGroup\n .append('g')\n .attr('class', 'ax-line-chart-axis-y')\n .call(this.d3.axisLeft(this.yScale).tickSize(5).tickPadding(8));\n\n // Style the y-axis path and lines\n this.yAxis.selectAll('path').attr('stroke', 'rgba(var(--ax-comp-line-chart-axis-color), 0.2)');\n\n this.yAxis\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n this.yAxis.selectAll('text').attr(\n 'style',\n `\n font-size: 11px;\n font-weight: 400;\n fill: rgba(var(--ax-comp-line-chart-labels-color), 0.7);\n `,\n );\n\n if (options.yAxisLabel) {\n const labelX = -this.height / 2;\n const labelY = -this.margin.left * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-line-chart-axis-label ax-y-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('transform', 'rotate(-90) translate(-5, 0)')\n .attr('x', labelX)\n .attr('y', labelY)\n .attr(\n 'font-family',\n 'var(--ax-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)',\n )\n .attr(\n 'style',\n `\n font-size: 13px;\n font-weight: 500;\n fill: rgb(var(--ax-comp-line-chart-text-color));\n pointer-events: none;\n `,\n )\n .text(options.yAxisLabel);\n }\n }\n\n if (showGrid) {\n const gridGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-grid-container')\n .attr('pointer-events', 'none');\n\n const yGrid = gridGroup\n .append('g')\n .attr('class', 'ax-line-chart-grid')\n .call(\n this.d3\n .axisLeft(this.yScale)\n .tickSize(-this.width)\n .tickFormat(() => '')\n .tickValues(this.yScale.ticks()),\n );\n\n // Style the grid path and lines\n yGrid.selectAll('path').attr('stroke-width', '0');\n\n yGrid\n .selectAll('.tick')\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n if (options.showVerticalGrid) {\n const xGrid = gridGroup\n .append('g')\n .attr('class', 'ax-line-chart-grid-vertical')\n .attr('transform', `translate(0,${this.height})`)\n .call(\n this.d3\n .axisBottom(this.xScale)\n .tickSize(-this.height)\n .tickFormat(() => '')\n .tickValues(isBandScale ? undefined : this.xScale.ticks()),\n );\n\n // Style the vertical grid path and lines\n xGrid.selectAll('path').attr('stroke-width', '0');\n\n xGrid\n .selectAll('.tick')\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.15)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n }\n }\n }\n\n private renderLines(data: AXLineChartData[]): void {\n const isBandScale = this.xScale.bandwidth !== undefined;\n\n const getX = (d: { x: number | string; y: number }) => {\n if (isBandScale) {\n return this.xScale(String(d.x)) + this.xScale.bandwidth() / 2;\n } else {\n return this.xScale(typeof d.x === 'number' ? d.x : new Date(d.x));\n }\n };\n\n const lineGenerator = this.d3\n .line<{ x: number | string; y: number }>()\n .x(getX)\n .y((d) => this.yScale(d.y));\n\n if (this.effectiveOptions().smoothLine !== false) {\n lineGenerator.curve(this.d3.curveMonotoneX);\n }\n\n const areaGenerator = this.d3\n .area<{ x: number | string; y: number }>()\n .x(getX)\n .y0(this.height)\n .y1((d) => this.yScale(d.y));\n\n if (this.effectiveOptions().smoothLine !== false) {\n areaGenerator.curve(this.d3.curveMonotoneX);\n }\n\n // Add class to chart container to disable pointer events during animation\n this.svg.attr('class', 'ax-line-chart-animating');\n\n const allSeriesGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-all-series')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n const allPointsGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-all-points')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n if (this.effectiveOptions().showCrosshair === true) {\n const crosshairGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-crosshair')\n .attr('pointer-events', 'none');\n }\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const seriesGroup = allSeriesGroup\n .append('g')\n .attr('class', `ax-line-chart-series ax-line-chart-series-${seriesIndex}`)\n .attr('data-series', series.label || `series-${seriesIndex}`)\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n const lineColor = series.lineColor || AXLineChartColors.getColor(seriesIndex);\n const fillColor = series.fillColor || lineColor;\n\n const line = seriesGroup\n .append('path')\n .datum(series.data)\n .attr('class', 'ax-line-chart-line')\n .attr('stroke', lineColor)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2)\n .attr('stroke-linejoin', 'round')\n .attr('stroke-linecap', 'round')\n .attr('d', lineGenerator as any)\n .attr('fill', 'none')\n .attr('style', 'transition: stroke-width 0.3s ease;')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n // Setup hover listener\n line\n .on('mouseenter', () => {\n line\n .transition()\n .duration(150)\n .attr('stroke-width', (this.effectiveOptions().lineWidth ?? 2) * 1.5);\n })\n .on('mouseleave', () => {\n line\n .transition()\n .duration(150)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2);\n });\n\n const totalLength = line.node().getTotalLength();\n line\n .attr('stroke-dasharray', totalLength + ' ' + totalLength)\n .attr('stroke-dashoffset', totalLength)\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .attr('stroke-dashoffset', 0)\n .on('end', function () {\n // Enable pointer events after animation completes\n line.attr('pointer-events', 'all');\n });\n\n if (this.effectiveOptions().fillArea) {\n const area = seriesGroup\n .append('path')\n .datum(series.data)\n .attr('class', 'ax-line-chart-area')\n .attr('fill', fillColor)\n .attr('opacity', 0)\n .attr('d', areaGenerator)\n .attr('style', 'transition: opacity 0.3s ease;')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n // Setup hover listener\n area\n .on('mouseenter', () => {\n area\n .transition()\n .duration(150)\n .attr('opacity', ((this.effectiveOptions().fillOpacity ?? 20) / 100) * 1.5);\n })\n .on('mouseleave', () => {\n area\n .transition()\n .duration(150)\n .attr('opacity', (this.effectiveOptions().fillOpacity ?? 20) / 100);\n });\n\n area\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .attr('opacity', (this.effectiveOptions().fillOpacity ?? 20) / 100)\n .on('end', function () {\n // Enable pointer events after animation completes\n area.attr('pointer-events', 'all');\n });\n }\n });\n\n if (this.effectiveOptions().showPoints !== false) {\n const pointMap = new Map<string, Array<{ point: any; series: AXLineChartData; seriesIndex: number }>>();\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const lineColor = series.lineColor || AXLineChartColors.getColor(seriesIndex);\n const maxPoints = 100;\n const pointData =\n series.data.length > maxPoints ? this.getReducedDataPoints(series.data, maxPoints) : series.data;\n\n pointData.forEach((point) => {\n const x = getX(point);\n const y = this.yScale(point.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n\n if (!pointMap.has(key)) {\n pointMap.set(key, []);\n }\n\n pointMap.get(key)?.push({\n point,\n series,\n seriesIndex,\n });\n });\n });\n\n // Create a counter to track animation completion\n let animationCounter = 0;\n const totalSeriesCount = data.length;\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const lineColor = series.lineColor || AXLineChartColors.getColor(seriesIndex);\n const pointsGroup = allPointsGroup\n .append('g')\n .attr('class', `ax-line-chart-points ax-line-chart-points-${seriesIndex}`)\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n pointsGroup\n .on('mouseenter', () => this.handlePointGroupEnter(seriesIndex, lineColor))\n .on('mouseleave', () => this.handlePointGroupLeave());\n\n const maxPoints = 100;\n const pointData =\n series.data.length > maxPoints ? this.getReducedDataPoints(series.data, maxPoints) : series.data;\n\n pointsGroup\n .selectAll('circle')\n .data(pointData)\n .enter()\n .append('circle')\n .attr('class', 'ax-line-chart-point')\n .attr('cx', getX)\n .attr('cy', (d) => this.yScale(d.y))\n .attr('r', 0)\n .attr('fill', lineColor)\n .attr('stroke', '#fff')\n .attr('stroke-width', 1)\n .attr('data-x', (d) => d.x)\n .attr('data-y', (d) => d.y)\n .style('cursor', 'pointer')\n .attr('pointer-events', 'none') // Disable pointer events during animation\n .on('mouseenter', (event: MouseEvent, d: any) => {\n const x = getX(d);\n const y = this.yScale(d.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n const overlappingPoints = pointMap.get(key) || [];\n\n if (overlappingPoints.length > 1) {\n this.handleOverlappingPointsHover(event, overlappingPoints);\n } else {\n this.handlePointHover(event, d, series, seriesIndex);\n }\n\n this.d3\n .select(event.target as SVGCircleElement)\n .transition()\n .duration(150)\n .attr('r', (this.effectiveOptions().pointRadius ?? 4) * 1.5)\n .attr('stroke-width', 2)\n .attr('stroke', `rgb(var(--ax-comp-line-chart-bg-color))`);\n })\n .on('mousemove', (event: MouseEvent) => this.updateTooltipPosition(event))\n .on('mouseleave', (event: MouseEvent) => {\n this._tooltipVisible.set(false);\n this.d3\n .select(event.target as SVGCircleElement)\n .transition()\n .duration(150)\n .attr('r', this.effectiveOptions().pointRadius ?? 4)\n .attr('stroke-width', 1)\n .attr('stroke', '#fff');\n })\n .on('click', (event: MouseEvent, d: any) => {\n const x = getX(d);\n const y = this.yScale(d.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n const overlappingPoints = pointMap.get(key) || [];\n\n if (overlappingPoints.length > 1) {\n overlappingPoints.forEach(({ point, series }) => {\n this.handlePointClick(event, point, series);\n });\n } else {\n this.handlePointClick(event, d, series);\n }\n })\n .transition()\n .delay((d: any, i: number) => i * Math.min(50, animationDuration * 0.05) + animationDuration * 0.5)\n .duration(animationDuration * 0.3)\n .ease(animationEasing)\n .attr('r', this.effectiveOptions().pointRadius ?? 4)\n .on('end', (d, i, nodes) => {\n // When the last point finishes animating\n if (i === nodes.length - 1) {\n animationCounter++;\n\n // If this is the last series, enable all pointer events\n if (animationCounter >= totalSeriesCount) {\n // Enable pointer events for all elements after all animations have completed\n this.enablePointerEventsAfterAnimation();\n }\n }\n });\n });\n } else {\n // If not showing points, wait for line animations to complete\n setTimeout(() => {\n // Enable pointer events for all elements after animation duration\n this.enablePointerEventsAfterAnimation();\n }, animationDuration + 100);\n }\n }\n\n private enablePointerEventsAfterAnimation(): void {\n // Enable pointer events for all chart elements after animation completes\n this.chart.selectAll('.ax-line-chart-all-series').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-series').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-line').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-area').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-all-points').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-points').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-point').attr('pointer-events', 'all');\n\n // Remove the animating class from the SVG\n this.svg.classed('ax-line-chart-animating', false);\n }\n\n private handlePointGroupEnter(seriesIndex: number, color: string): void {\n this.chart\n .select(`.ax-line-chart-series-${seriesIndex} .ax-line-chart-line`)\n .transition()\n .duration(150)\n .attr('stroke-width', (this.effectiveOptions().lineWidth ?? 2) * 1.5);\n }\n\n private handlePointGroupLeave(): void {\n this.chart\n .selectAll('.ax-line-chart-line')\n .transition()\n .duration(150)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2);\n\n if (this.effectiveOptions().showCrosshair === true) {\n this.chart.select('.ax-line-chart-crosshair').selectAll('*').remove();\n }\n }\n\n private getReducedDataPoints(\n data: Array<{ x: number | string; y: number }>,\n maxPoints: number,\n ): Array<{ x: number | string; y: number }> {\n if (data.length <= maxPoints) return data;\n\n const result: Array<{ x: number | string; y: number }> = [];\n const step = Math.ceil(data.length / maxPoints);\n\n for (let i = 0; i < data.length; i += step) {\n result.push(data[i]);\n }\n\n if (result[result.length - 1] !== data[data.length - 1]) {\n result.push(data[data.length - 1]);\n }\n\n return result;\n }\n\n private handlePointHover(\n event: MouseEvent,\n dataPoint: AXLineChartData['data'][number],\n series: AXLineChartData,\n seriesIndex: number,\n ): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const color = series.lineColor || AXLineChartColors.getColor(seriesIndex);\n\n this._tooltipData.set({\n title: dataPoint.tooltipLabel || series.tooltipLabel || series.label || `Series ${seriesIndex + 1}`,\n value: dataPoint.y.toString(),\n seriesName: `x: ${dataPoint.x}`,\n color: color,\n });\n\n this._tooltipVisible.set(true);\n this.updateTooltipPosition(event);\n\n if (this.effectiveOptions().showCrosshair === true) {\n this.showCrosshairLines(dataPoint);\n }\n }\n }\n\n private showCrosshairLines(dataPoint: { x: number | string; y: number }): void {\n const isBandScale = this.xScale.bandwidth !== undefined;\n\n let x: number;\n if (isBandScale) {\n x = this.xScale(String(dataPoint.x)) + this.xScale.bandwidth() / 2;\n } else {\n x = this.xScale(typeof dataPoint.x === 'number' ? dataPoint.x : new Date(dataPoint.x));\n }\n const y = this.yScale(dataPoint.y);\n\n let crosshairGroup = this.chart.select('.ax-line-chart-crosshair');\n if (crosshairGroup.empty()) {\n crosshairGroup = this.chart.append('g').attr('class', 'ax-line-chart-crosshair').attr('pointer-events', 'none');\n }\n\n crosshairGroup.selectAll('*').remove();\n\n crosshairGroup\n .append('line')\n .attr('class', 'ax-line-chart-crosshair-vertical')\n .attr('x1', x)\n .attr('y1', 0)\n .attr('x2', x)\n .attr('y2', this.height)\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.5)')\n .attr('stroke-width', 1)\n .attr('stroke-dasharray', '3,3')\n .attr('opacity', 0.7)\n .attr('pointer-events', 'none');\n\n crosshairGroup\n .append('line')\n .attr('class', 'ax-line-chart-crosshair-horizontal')\n .attr('x1', 0)\n .attr('y1', y)\n .attr('x2', this.width)\n .attr('y2', y)\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.5)')\n .attr('stroke-width', 1)\n .attr('stroke-dasharray', '3,3')\n .attr('opacity', 0.7)\n .attr('pointer-events', 'none');\n }\n\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n let x = event.clientX - container.left;\n const y = event.clientY - container.top;\n\n if (x + tooltipRect.width + 20 > container.width) {\n x = x - tooltipRect.width - 15;\n }\n\n // if (y + tooltipRect.height / 2 > container.height) {\n // y = container.height - tooltipRect.height / 2;\n // } else if (y - tooltipRect.height / 2 < 0) {\n // y = tooltipRect.height / 2;\n // }\n\n this._tooltipPosition.set({ x, y });\n }\n\n private handlePointClick(\n event: MouseEvent,\n dataPoint: AXLineChartData['data'][number],\n series: AXLineChartData,\n ): void {\n this.pointClick.emit({\n series: series,\n point: dataPoint,\n event: {\n nativeEvent: event,\n sender: this,\n },\n });\n }\n\n private showNoDataMessage(containerElement: HTMLElement): void {\n // Clear existing contents first\n this.d3.select(containerElement).selectAll('*').remove();\n\n const messageContainer = this.d3\n .select(containerElement)\n .append('div')\n .attr('class', 'ax-line-chart-no-data-message')\n .style('position', 'absolute')\n .style('left', '50%')\n .style('top', '50%')\n .style('transform', 'translate(-50%, -50%)')\n .style('text-align', 'center')\n .style('background-color', 'rgb(var(--ax-comp-line-chart-bg-color))')\n .style('padding', '1.5rem')\n .style('border-radius', '0.5rem')\n .style('box-shadow', '0 2px 12px rgba(0, 0, 0, 0.08)')\n .style('width', '80%')\n .style('max-width', '300px');\n\n // Add an icon\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-icon')\n .style('opacity', '0.6')\n .style('margin-bottom', '0.75rem')\n .html('<i class=\"fa-light fa-chart-line fa-2x\"></i>');\n\n // Add text message\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-text')\n .style('font-size', '1rem')\n .style('font-weight', '600')\n .style('margin-bottom', '0.5rem')\n .text('No data available');\n\n // Add help text\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-help')\n .style('font-size', '0.8rem')\n .style('opacity', '0.6')\n .text('Please provide data to display the chart');\n }\n\n private handleOverlappingPointsHover(\n event: MouseEvent,\n overlappingPoints: Array<{ point: any; series: AXLineChartData; seriesIndex: number }>,\n ): void {\n if (this.effectiveOptions().showTooltip === false) return;\n\n const tooltipData: AXChartTooltipData = {\n title: 'Multiple Series',\n value: overlappingPoints[0].point.y.toString(),\n seriesName: '',\n color: '',\n items: overlappingPoints.map(({ point, series, seriesIndex }) => {\n const color = series.lineColor || AXLineChartColors.getColor(seriesIndex);\n return {\n label: series.label || `Series ${seriesIndex + 1}`,\n value: point.y.toString(),\n color: color,\n };\n }),\n };\n\n this._tooltipData.set(tooltipData);\n this._tooltipVisible.set(true);\n this.updateTooltipPosition(event);\n\n if (this.effectiveOptions().showCrosshair === true && overlappingPoints.length > 0) {\n this.showCrosshairLines(overlappingPoints[0].point);\n }\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n}\n","<div class=\"ax-line-chart\" #chartContainer>\n <!-- Shared tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"false\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKa,MAAA,wBAAwB,GAAsB;AACzD,IAAA,OAAO,EAAE;AACP,QAAA,GAAG,EAAE,EAAE;AACP,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,IAAI,EAAE,EAAE;AACT,KAAA;AACD,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,gBAAgB,EAAE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A,CAAA,EAAA;;;AEpDjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-charts-line-chart.mjs","sources":["../../../../packages/charts/line-chart/src/lib/line-chart.config.ts","../../../../packages/charts/line-chart/src/lib/line-chart.component.ts","../../../../packages/charts/line-chart/src/lib/line-chart.component.html","../../../../packages/charts/line-chart/src/acorex-charts-line-chart.ts"],"sourcesContent":["import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXLineChartOption } from './line-chart.type';\n\nexport const AXLineChartDefaultConfig: AXLineChartOption = {\n margins: {\n top: 20,\n right: 25,\n bottom: 40,\n left: 50,\n },\n showXAxis: true,\n showYAxis: true,\n showGrid: true,\n showVerticalGrid: false,\n yAxisStartsAtZero: true,\n axisPadding: 5,\n showTooltip: true,\n lineWidth: 2,\n showPoints: true,\n pointRadius: 4,\n smoothLine: false,\n fillArea: false,\n fillOpacity: 20,\n showCrosshair: false,\n animationDuration: 1000,\n animationEasing: 'cubic-out',\n};\n\nexport const AX_LINE_CHART_CONFIG = new InjectionToken<AXLineChartOption>('AX_LINE_CHART_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'chart.lineChart', AXLineChartDefaultConfig);\n return AXLineChartDefaultConfig;\n },\n});\n\nexport type PartialLineChartConfig = Partial<AXLineChartOption>;\n\nexport function lineChartConfig(config: PartialLineChartConfig = {}): AXLineChartOption {\n const result = {\n ...AXLineChartDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { NXComponent } from '@acorex/cdk/common';\nimport { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';\nimport { AXChartTooltipComponent, AXChartTooltipData } from '@acorex/charts/chart-tooltip';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AX_LINE_CHART_CONFIG } from './line-chart.config';\nimport { AXLineChartData, AXLineChartOption, AXLineChartPointClickEvent, AXLineChartValue } from './line-chart.type';\n\n/**\n * Line Chart Component for rendering data as lines with interactive hover effects and animations\n */\n@Component({\n selector: 'ax-line-chart',\n templateUrl: './line-chart.component.html',\n styleUrls: ['./line-chart.component.scss'],\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXChartTooltipComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXLineChartComponent extends NXComponent implements OnInit, AfterViewInit, OnDestroy {\n data = input<AXLineChartValue>([]);\n options = input<AXLineChartOption>({});\n pointClick = output<AXLineChartPointClickEvent>();\n\n private readonly chartContainerEl = viewChild.required<ElementRef<HTMLDivElement>>('chartContainer');\n protected d3!: typeof import('d3');\n\n private svg!: any;\n private chart!: any;\n private xScale!: any;\n private yScale!: any;\n private xAxis!: any;\n private yAxis!: any;\n\n private width!: number;\n private height!: number;\n private margin = { top: 20, right: 25, bottom: 40, left: 50 };\n\n private _tooltipVisible = signal(false);\n private _tooltipPosition = signal({ x: 0, y: 0 });\n private _tooltipData = signal<AXChartTooltipData>({\n title: '',\n value: '0',\n percentage: '0%',\n color: '',\n });\n\n private _initialized = signal(false);\n private _rendered = signal(false);\n\n protected tooltipVisible = this._tooltipVisible.asReadonly();\n protected tooltipPosition = this._tooltipPosition.asReadonly();\n protected tooltipData = this._tooltipData.asReadonly();\n\n // Inject configuration\n private configToken = inject(AX_LINE_CHART_CONFIG);\n\n // Inject the chart colors\n private chartColors = inject(AX_CHART_COLOR_PALETTE);\n\n protected effectiveOptions = computed(() => {\n return {\n ...this.configToken,\n ...this.options(),\n };\n });\n\n ngOnInit(): void {\n this.loadD3();\n }\n\n #effect = effect(() => {\n this.data();\n this.effectiveOptions();\n\n if (this._rendered()) {\n this.updateChart();\n }\n });\n\n ngAfterViewInit(): void {\n this._initialized.set(true);\n if (this.d3 && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n }\n\n ngOnDestroy(): void {\n this.cleanupChart();\n }\n\n protected async loadD3(): Promise<void> {\n try {\n this.d3 = await import('d3');\n if (this._initialized() && this.chartContainerEl()) {\n this.createChart();\n this._rendered.set(true);\n }\n } catch (error) {\n console.error('Failed to load D3.js:', error);\n }\n }\n\n protected createChart(): void {\n if (!this.d3 || !this.chartContainerEl()?.nativeElement) return;\n\n const containerElement = this.chartContainerEl().nativeElement;\n const chartData = this.data();\n let normalizedData: AXLineChartData[] = [];\n\n if (Array.isArray(chartData)) {\n normalizedData = chartData as AXLineChartData[];\n } else if (chartData && 'data' in chartData) {\n normalizedData = [chartData as AXLineChartData];\n }\n\n this.d3.select(containerElement).selectAll('svg').remove();\n\n if (normalizedData.length === 0 || normalizedData.some((series) => !series.data || series.data.length === 0)) {\n this.showNoDataMessage(containerElement);\n return;\n }\n\n const chartOptions = this.effectiveOptions();\n this.setupDimensions(containerElement, chartOptions);\n this.setupScales(normalizedData);\n this.createAxes(chartOptions);\n this.renderLines(normalizedData);\n }\n\n protected updateChart(): void {\n this.createChart();\n }\n\n protected cleanupChart(): void {\n if (this.svg) {\n this.d3?.select(this.chartContainerEl()?.nativeElement).selectAll('svg').remove();\n this.svg = null;\n this.chart = null;\n }\n this._tooltipVisible.set(false);\n }\n\n private setupDimensions(containerElement: HTMLElement, options: AXLineChartOption): void {\n this.calculateMargins(options);\n\n const containerWidth = containerElement.clientWidth;\n const containerHeight = containerElement.clientHeight;\n const minDim = Math.min(200, containerWidth, containerHeight);\n\n if (options.width && options.height) {\n this.width = options.width - this.margin.left - this.margin.right;\n this.height = options.height - this.margin.top - this.margin.bottom;\n } else {\n this.width = Math.max(containerWidth, minDim) - this.margin.left - this.margin.right;\n this.height = Math.max(containerHeight, minDim) - this.margin.top - this.margin.bottom;\n }\n\n this.width = Math.max(this.width, 100);\n this.height = Math.max(this.height, 100);\n\n const totalWidth = this.width + this.margin.left + this.margin.right;\n const totalHeight = this.height + this.margin.top + this.margin.bottom;\n\n const svg = this.d3\n .select(containerElement)\n .append('svg')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('viewBox', `0 0 ${totalWidth} ${totalHeight}`)\n .attr('preserveAspectRatio', 'xMidYMid meet')\n .attr(\n 'style',\n `\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: visible;\n `,\n );\n\n this.svg = svg;\n this.chart = this.svg.append('g').attr('transform', `translate(${this.margin.left},${this.margin.top})`);\n }\n\n private calculateMargins(options: AXLineChartOption): void {\n this.margin = {\n top: options.margins?.top ?? 20,\n right: options.margins?.right ?? 25,\n bottom: options.margins?.bottom ?? 40,\n left: options.margins?.left ?? 50,\n };\n\n if (options.xAxisLabel) {\n const xLabelLength = options.xAxisLabel.length;\n const extraBottomMargin = Math.min(20, Math.max(10, xLabelLength * 0.8));\n this.margin.bottom = Math.max(this.margin.bottom, 40 + extraBottomMargin);\n }\n\n if (options.yAxisLabel) {\n const yLabelLength = options.yAxisLabel.length;\n const extraLeftMargin = Math.min(20, Math.max(10, yLabelLength * 0.8));\n this.margin.left = Math.max(this.margin.left, 50 + extraLeftMargin);\n }\n\n if (options.showXAxis !== false) {\n this.margin.bottom = Math.max(this.margin.bottom, 45);\n }\n\n if (options.showYAxis !== false) {\n this.margin.left = Math.max(this.margin.left, 55);\n }\n }\n\n private setupScales(data: AXLineChartData[]): void {\n const chartOptions = this.effectiveOptions();\n const padding = chartOptions.axisPadding ?? 0;\n const paddingMultiplier = padding / 100;\n const allDataPoints = data.flatMap((series) => series.data);\n const allNumericX = allDataPoints.every((d) => typeof d.x === 'number');\n const allDates = !allNumericX && allDataPoints.every((d) => !isNaN(new Date(d.x).getTime()));\n\n if (allNumericX) {\n const xMin = this.d3.min(allDataPoints, (d) => d.x as number) || 0;\n const xMax = this.d3.max(allDataPoints, (d) => d.x as number) || 0;\n\n if (xMin === xMax) {\n this.xScale = this.d3\n .scaleLinear()\n .domain([xMin - 1, xMax + 1])\n .range([0, this.width]);\n } else {\n this.xScale = this.d3.scaleLinear().domain([xMin, xMax]).range([0, this.width]);\n }\n } else if (allDates) {\n const xMin = this.d3.min(allDataPoints, (d) => new Date(d.x as string)) || new Date();\n const xMax = this.d3.max(allDataPoints, (d) => new Date(d.x as string)) || new Date();\n\n if (xMin.getTime() === xMax.getTime()) {\n const oneDayMs = 86400000;\n this.xScale = this.d3\n .scaleTime()\n .domain([new Date(xMin.getTime() - oneDayMs), new Date(xMax.getTime() + oneDayMs)])\n .range([0, this.width]);\n } else {\n this.xScale = this.d3.scaleTime().domain([xMin, xMax]).range([0, this.width]);\n }\n } else {\n this.xScale = this.d3\n .scaleBand()\n .domain(allDataPoints.map((d) => String(d.x)))\n .range([0, this.width])\n .paddingInner(0.2)\n .paddingOuter(0);\n }\n\n const yAxisStartsAtZero = chartOptions.yAxisStartsAtZero !== false;\n const yMin = yAxisStartsAtZero ? 0 : this.d3.min(allDataPoints, (d) => d.y) || 0;\n const yMax = this.d3.max(allDataPoints, (d) => d.y) || 0;\n const yRange = yMax - yMin;\n\n this.yScale = this.d3\n .scaleLinear()\n .domain([yMin, yMax + yRange * paddingMultiplier])\n .nice()\n .range([this.height, 0]);\n }\n\n private createAxes(options: AXLineChartOption): void {\n const showXAxis = options.showXAxis !== false;\n const showYAxis = options.showYAxis !== false;\n const showGrid = options.showGrid !== false;\n const isBandScale = this.xScale.bandwidth !== undefined;\n const axesGroup = this.chart.append('g').attr('class', 'ax-line-chart-axes');\n\n if (showXAxis) {\n this.xAxis = axesGroup\n .append('g')\n .attr('class', 'ax-line-chart-axis-x')\n .attr('transform', `translate(0,${this.height})`)\n .call(this.d3.axisBottom(this.xScale).tickSize(5).tickPadding(8));\n\n // Style the x-axis path and lines\n this.xAxis.selectAll('path').attr('stroke', 'rgba(var(--ax-comp-line-chart-axis-color), 0.2)');\n\n this.xAxis\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n this.xAxis.selectAll('text').attr(\n 'style',\n `\n font-size: 11px;\n font-weight: 400;\n fill: rgba(var(--ax-comp-line-chart-labels-color), 0.7);\n `,\n );\n\n if (options.xAxisLabel) {\n const labelY = this.height + this.margin.bottom * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-line-chart-axis-label ax-x-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('x', this.width / 2)\n .attr('y', labelY)\n .attr('transform', 'translate(0, 5)')\n .attr(\n 'font-family',\n 'var(--ax-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)',\n )\n .attr(\n 'style',\n `\n font-size: 13px;\n font-weight: 500;\n fill: rgb(var(--ax-comp-line-chart-text-color));\n pointer-events: none;\n `,\n )\n .text(options.xAxisLabel);\n }\n }\n\n if (showYAxis) {\n this.yAxis = axesGroup\n .append('g')\n .attr('class', 'ax-line-chart-axis-y')\n .call(this.d3.axisLeft(this.yScale).tickSize(5).tickPadding(8));\n\n // Style the y-axis path and lines\n this.yAxis.selectAll('path').attr('stroke', 'rgba(var(--ax-comp-line-chart-axis-color), 0.2)');\n\n this.yAxis\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n this.yAxis.selectAll('text').attr(\n 'style',\n `\n font-size: 11px;\n font-weight: 400;\n fill: rgba(var(--ax-comp-line-chart-labels-color), 0.7);\n `,\n );\n\n if (options.yAxisLabel) {\n const labelX = -this.height / 2;\n const labelY = -this.margin.left * 0.65;\n\n axesGroup\n .append('text')\n .attr('class', 'ax-line-chart-axis-label ax-y-axis-label')\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('transform', 'rotate(-90) translate(-5, 0)')\n .attr('x', labelX)\n .attr('y', labelY)\n .attr(\n 'font-family',\n 'var(--ax-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)',\n )\n .attr(\n 'style',\n `\n font-size: 13px;\n font-weight: 500;\n fill: rgb(var(--ax-comp-line-chart-text-color));\n pointer-events: none;\n `,\n )\n .text(options.yAxisLabel);\n }\n }\n\n if (showGrid) {\n const gridGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-grid-container')\n .attr('pointer-events', 'none');\n\n const yGrid = gridGroup\n .append('g')\n .attr('class', 'ax-line-chart-grid')\n .call(\n this.d3\n .axisLeft(this.yScale)\n .tickSize(-this.width)\n .tickFormat(() => '')\n .tickValues(this.yScale.ticks()),\n );\n\n // Style the grid path and lines\n yGrid.selectAll('path').attr('stroke-width', '0');\n\n yGrid\n .selectAll('.tick')\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.2)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n\n if (options.showVerticalGrid) {\n const xGrid = gridGroup\n .append('g')\n .attr('class', 'ax-line-chart-grid-vertical')\n .attr('transform', `translate(0,${this.height})`)\n .call(\n this.d3\n .axisBottom(this.xScale)\n .tickSize(-this.height)\n .tickFormat(() => '')\n .tickValues(isBandScale ? undefined : this.xScale.ticks()),\n );\n\n // Style the vertical grid path and lines\n xGrid.selectAll('path').attr('stroke-width', '0');\n\n xGrid\n .selectAll('.tick')\n .selectAll('line')\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.15)')\n .attr('stroke-dasharray', '2,2')\n .attr('stroke-opacity', '0.5');\n }\n }\n }\n\n private renderLines(data: AXLineChartData[]): void {\n const isBandScale = this.xScale.bandwidth !== undefined;\n\n const getX = (d: { x: number | string; y: number }) => {\n if (isBandScale) {\n return this.xScale(String(d.x)) + this.xScale.bandwidth() / 2;\n } else {\n return this.xScale(typeof d.x === 'number' ? d.x : new Date(d.x));\n }\n };\n\n const lineGenerator = this.d3\n .line<{ x: number | string; y: number }>()\n .x(getX)\n .y((d) => this.yScale(d.y));\n\n if (this.effectiveOptions().smoothLine !== false) {\n lineGenerator.curve(this.d3.curveMonotoneX);\n }\n\n const areaGenerator = this.d3\n .area<{ x: number | string; y: number }>()\n .x(getX)\n .y0(this.height)\n .y1((d) => this.yScale(d.y));\n\n if (this.effectiveOptions().smoothLine !== false) {\n areaGenerator.curve(this.d3.curveMonotoneX);\n }\n\n // Add class to chart container to disable pointer events during animation\n this.svg.attr('class', 'ax-line-chart-animating');\n\n const allSeriesGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-all-series')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n const allPointsGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-all-points')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n if (this.effectiveOptions().showCrosshair === true) {\n const crosshairGroup = this.chart\n .append('g')\n .attr('class', 'ax-line-chart-crosshair')\n .attr('pointer-events', 'none');\n }\n\n // Get animation options\n const animationDuration = this.effectiveOptions().animationDuration;\n const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const seriesGroup = allSeriesGroup\n .append('g')\n .attr('class', `ax-line-chart-series ax-line-chart-series-${seriesIndex}`)\n .attr('data-series', series.label || `series-${seriesIndex}`)\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);\n const fillColor = series.fillColor || lineColor;\n\n const line = seriesGroup\n .append('path')\n .datum(series.data)\n .attr('class', 'ax-line-chart-line')\n .attr('stroke', lineColor)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2)\n .attr('stroke-linejoin', 'round')\n .attr('stroke-linecap', 'round')\n .attr('d', lineGenerator as any)\n .attr('fill', 'none')\n .attr('style', 'transition: stroke-width 0.3s ease;')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n // Setup hover listener\n line\n .on('mouseenter', () => {\n line\n .transition()\n .duration(150)\n .attr('stroke-width', (this.effectiveOptions().lineWidth ?? 2) * 1.5);\n })\n .on('mouseleave', () => {\n line\n .transition()\n .duration(150)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2);\n });\n\n const totalLength = line.node().getTotalLength();\n line\n .attr('stroke-dasharray', totalLength + ' ' + totalLength)\n .attr('stroke-dashoffset', totalLength)\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .attr('stroke-dashoffset', 0)\n .on('end', function () {\n // Enable pointer events after animation completes\n line.attr('pointer-events', 'all');\n });\n\n if (this.effectiveOptions().fillArea) {\n const area = seriesGroup\n .append('path')\n .datum(series.data)\n .attr('class', 'ax-line-chart-area')\n .attr('fill', fillColor)\n .attr('opacity', 0)\n .attr('d', areaGenerator)\n .attr('style', 'transition: opacity 0.3s ease;')\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n // Setup hover listener\n area\n .on('mouseenter', () => {\n area\n .transition()\n .duration(150)\n .attr('opacity', ((this.effectiveOptions().fillOpacity ?? 20) / 100) * 1.5);\n })\n .on('mouseleave', () => {\n area\n .transition()\n .duration(150)\n .attr('opacity', (this.effectiveOptions().fillOpacity ?? 20) / 100);\n });\n\n area\n .transition()\n .duration(animationDuration)\n .ease(animationEasing)\n .attr('opacity', (this.effectiveOptions().fillOpacity ?? 20) / 100)\n .on('end', function () {\n // Enable pointer events after animation completes\n area.attr('pointer-events', 'all');\n });\n }\n });\n\n if (this.effectiveOptions().showPoints !== false) {\n const pointMap = new Map<string, Array<{ point: any; series: AXLineChartData; seriesIndex: number }>>();\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);\n const maxPoints = 100;\n const pointData =\n series.data.length > maxPoints ? this.getReducedDataPoints(series.data, maxPoints) : series.data;\n\n pointData.forEach((point) => {\n const x = getX(point);\n const y = this.yScale(point.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n\n if (!pointMap.has(key)) {\n pointMap.set(key, []);\n }\n\n pointMap.get(key)?.push({\n point,\n series,\n seriesIndex,\n });\n });\n });\n\n // Create a counter to track animation completion\n let animationCounter = 0;\n const totalSeriesCount = data.length;\n\n data.forEach((series, seriesIndex) => {\n if (!series.data || series.data.length === 0) return;\n\n const lineColor = series.lineColor || getChartColor(seriesIndex, this.chartColors);\n const pointsGroup = allPointsGroup\n .append('g')\n .attr('class', `ax-line-chart-points ax-line-chart-points-${seriesIndex}`)\n .attr('pointer-events', 'none'); // Disable pointer events during animation\n\n pointsGroup\n .on('mouseenter', () => this.handlePointGroupEnter(seriesIndex, lineColor))\n .on('mouseleave', () => this.handlePointGroupLeave());\n\n const maxPoints = 100;\n const pointData =\n series.data.length > maxPoints ? this.getReducedDataPoints(series.data, maxPoints) : series.data;\n\n pointsGroup\n .selectAll('circle')\n .data(pointData)\n .enter()\n .append('circle')\n .attr('class', 'ax-line-chart-point')\n .attr('cx', getX)\n .attr('cy', (d) => this.yScale(d.y))\n .attr('r', 0)\n .attr('fill', lineColor)\n .attr('stroke', '#fff')\n .attr('stroke-width', 1)\n .attr('data-x', (d) => d.x)\n .attr('data-y', (d) => d.y)\n .style('cursor', 'pointer')\n .attr('pointer-events', 'none') // Disable pointer events during animation\n .on('mouseenter', (event: MouseEvent, d: any) => {\n const x = getX(d);\n const y = this.yScale(d.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n const overlappingPoints = pointMap.get(key) || [];\n\n if (overlappingPoints.length > 1) {\n this.handleOverlappingPointsHover(event, overlappingPoints);\n } else {\n this.handlePointHover(event, d, series, seriesIndex);\n }\n\n this.d3\n .select(event.target as SVGCircleElement)\n .transition()\n .duration(150)\n .attr('r', (this.effectiveOptions().pointRadius ?? 4) * 1.5)\n .attr('stroke-width', 2)\n .attr('stroke', `rgb(var(--ax-comp-line-chart-bg-color))`);\n })\n .on('mousemove', (event: MouseEvent) => this.updateTooltipPosition(event))\n .on('mouseleave', (event: MouseEvent) => {\n this._tooltipVisible.set(false);\n this.d3\n .select(event.target as SVGCircleElement)\n .transition()\n .duration(150)\n .attr('r', this.effectiveOptions().pointRadius ?? 4)\n .attr('stroke-width', 1)\n .attr('stroke', '#fff');\n })\n .on('click', (event: MouseEvent, d: any) => {\n const x = getX(d);\n const y = this.yScale(d.y);\n const key = `${Math.round(x * 10) / 10},${Math.round(y * 10) / 10}`;\n const overlappingPoints = pointMap.get(key) || [];\n\n if (overlappingPoints.length > 1) {\n overlappingPoints.forEach(({ point, series }) => {\n this.handlePointClick(event, point, series);\n });\n } else {\n this.handlePointClick(event, d, series);\n }\n })\n .transition()\n .delay((d: any, i: number) => i * Math.min(50, animationDuration * 0.05) + animationDuration * 0.5)\n .duration(animationDuration * 0.3)\n .ease(animationEasing)\n .attr('r', this.effectiveOptions().pointRadius ?? 4)\n .on('end', (d, i, nodes) => {\n // When the last point finishes animating\n if (i === nodes.length - 1) {\n animationCounter++;\n\n // If this is the last series, enable all pointer events\n if (animationCounter >= totalSeriesCount) {\n // Enable pointer events for all elements after all animations have completed\n this.enablePointerEventsAfterAnimation();\n }\n }\n });\n });\n } else {\n // If not showing points, wait for line animations to complete\n setTimeout(() => {\n // Enable pointer events for all elements after animation duration\n this.enablePointerEventsAfterAnimation();\n }, animationDuration + 100);\n }\n }\n\n private enablePointerEventsAfterAnimation(): void {\n // Guard against null chart or svg\n if (!this.chart || !this.svg) return;\n // Enable pointer events for all chart elements after animation completes\n this.chart.selectAll('.ax-line-chart-all-series').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-series').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-line').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-area').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-all-points').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-points').attr('pointer-events', 'all');\n this.chart.selectAll('.ax-line-chart-point').attr('pointer-events', 'all');\n\n // Remove the animating class from the SVG\n this.svg.classed('ax-line-chart-animating', false);\n }\n\n private handlePointGroupEnter(seriesIndex: number, color: string): void {\n this.chart\n .select(`.ax-line-chart-series-${seriesIndex} .ax-line-chart-line`)\n .transition()\n .duration(150)\n .attr('stroke-width', (this.effectiveOptions().lineWidth ?? 2) * 1.5);\n }\n\n private handlePointGroupLeave(): void {\n this.chart\n .selectAll('.ax-line-chart-line')\n .transition()\n .duration(150)\n .attr('stroke-width', this.effectiveOptions().lineWidth ?? 2);\n\n if (this.effectiveOptions().showCrosshair === true) {\n this.chart.select('.ax-line-chart-crosshair').selectAll('*').remove();\n }\n }\n\n private getReducedDataPoints(\n data: Array<{ x: number | string; y: number }>,\n maxPoints: number,\n ): Array<{ x: number | string; y: number }> {\n if (data.length <= maxPoints) return data;\n\n const result: Array<{ x: number | string; y: number }> = [];\n const step = Math.ceil(data.length / maxPoints);\n\n for (let i = 0; i < data.length; i += step) {\n result.push(data[i]);\n }\n\n if (result[result.length - 1] !== data[data.length - 1]) {\n result.push(data[data.length - 1]);\n }\n\n return result;\n }\n\n private handlePointHover(\n event: MouseEvent,\n dataPoint: AXLineChartData['data'][number],\n series: AXLineChartData,\n seriesIndex: number,\n ): void {\n if (this.effectiveOptions().showTooltip !== false) {\n const color = series.lineColor || getChartColor(seriesIndex, this.chartColors);\n\n this._tooltipData.set({\n title: dataPoint.tooltipLabel || series.tooltipLabel || series.label || `Series ${seriesIndex + 1}`,\n value: dataPoint.y.toString(),\n seriesName: `x: ${dataPoint.x}`,\n color: color,\n });\n\n this._tooltipVisible.set(true);\n this.updateTooltipPosition(event);\n\n if (this.effectiveOptions().showCrosshair === true) {\n this.showCrosshairLines(dataPoint);\n }\n }\n }\n\n private showCrosshairLines(dataPoint: { x: number | string; y: number }): void {\n const isBandScale = this.xScale.bandwidth !== undefined;\n\n let x: number;\n if (isBandScale) {\n x = this.xScale(String(dataPoint.x)) + this.xScale.bandwidth() / 2;\n } else {\n x = this.xScale(typeof dataPoint.x === 'number' ? dataPoint.x : new Date(dataPoint.x));\n }\n const y = this.yScale(dataPoint.y);\n\n let crosshairGroup = this.chart.select('.ax-line-chart-crosshair');\n if (crosshairGroup.empty()) {\n crosshairGroup = this.chart.append('g').attr('class', 'ax-line-chart-crosshair').attr('pointer-events', 'none');\n }\n\n crosshairGroup.selectAll('*').remove();\n\n crosshairGroup\n .append('line')\n .attr('class', 'ax-line-chart-crosshair-vertical')\n .attr('x1', x)\n .attr('y1', 0)\n .attr('x2', x)\n .attr('y2', this.height)\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.5)')\n .attr('stroke-width', 1)\n .attr('stroke-dasharray', '3,3')\n .attr('opacity', 0.7)\n .attr('pointer-events', 'none');\n\n crosshairGroup\n .append('line')\n .attr('class', 'ax-line-chart-crosshair-horizontal')\n .attr('x1', 0)\n .attr('y1', y)\n .attr('x2', this.width)\n .attr('y2', y)\n .attr('stroke', 'rgba(var(--ax-comp-line-chart-grid-lines-color), 0.5)')\n .attr('stroke-width', 1)\n .attr('stroke-dasharray', '3,3')\n .attr('opacity', 0.7)\n .attr('pointer-events', 'none');\n }\n\n private updateTooltipPosition(event: MouseEvent): void {\n const container = this.chartContainerEl().nativeElement.getBoundingClientRect();\n const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');\n\n if (!tooltipEl) {\n const x = event.clientX - container.left;\n const y = event.clientY - container.top;\n this._tooltipPosition.set({ x, y });\n return;\n }\n\n const tooltipRect = tooltipEl.getBoundingClientRect();\n let x = event.clientX - container.left;\n const y = event.clientY - container.top;\n\n if (x + tooltipRect.width + 20 > container.width) {\n x = x - tooltipRect.width - 15;\n }\n\n // if (y + tooltipRect.height / 2 > container.height) {\n // y = container.height - tooltipRect.height / 2;\n // } else if (y - tooltipRect.height / 2 < 0) {\n // y = tooltipRect.height / 2;\n // }\n\n this._tooltipPosition.set({ x, y });\n }\n\n private handlePointClick(\n event: MouseEvent,\n dataPoint: AXLineChartData['data'][number],\n series: AXLineChartData,\n ): void {\n this.pointClick.emit({\n series: series,\n point: dataPoint,\n event: {\n nativeEvent: event,\n sender: this,\n },\n });\n }\n\n private showNoDataMessage(containerElement: HTMLElement): void {\n // Clear existing contents first\n this.d3.select(containerElement).selectAll('*').remove();\n\n const messageContainer = this.d3\n .select(containerElement)\n .append('div')\n .attr('class', 'ax-line-chart-no-data-message')\n .style('position', 'absolute')\n .style('left', '50%')\n .style('top', '50%')\n .style('transform', 'translate(-50%, -50%)')\n .style('text-align', 'center')\n .style('background-color', 'rgb(var(--ax-comp-line-chart-bg-color))')\n .style('padding', '1.5rem')\n .style('border-radius', '0.5rem')\n .style('box-shadow', '0 2px 12px rgba(0, 0, 0, 0.08)')\n .style('width', '80%')\n .style('max-width', '300px');\n\n // Add an icon\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-icon')\n .style('opacity', '0.6')\n .style('margin-bottom', '0.75rem')\n .html('<i class=\"fa-light fa-chart-line fa-2x\"></i>');\n\n // Add text message\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-text')\n .style('font-size', '1rem')\n .style('font-weight', '600')\n .style('margin-bottom', '0.5rem')\n .text('No data available');\n\n // Add help text\n messageContainer\n .append('div')\n .attr('class', 'ax-line-chart-no-data-help')\n .style('font-size', '0.8rem')\n .style('opacity', '0.6')\n .text('Please provide data to display the chart');\n }\n\n private handleOverlappingPointsHover(\n event: MouseEvent,\n overlappingPoints: Array<{ point: any; series: AXLineChartData; seriesIndex: number }>,\n ): void {\n if (this.effectiveOptions().showTooltip === false) return;\n\n const tooltipData: AXChartTooltipData = {\n title: 'Multiple Series',\n value: overlappingPoints[0].point.y.toString(),\n seriesName: '',\n color: '',\n items: overlappingPoints.map(({ point, series, seriesIndex }) => {\n const color = series.lineColor || getChartColor(seriesIndex, this.chartColors);\n return {\n label: series.label || `Series ${seriesIndex + 1}`,\n value: point.y.toString(),\n color: color,\n };\n }),\n };\n\n this._tooltipData.set(tooltipData);\n this._tooltipVisible.set(true);\n this.updateTooltipPosition(event);\n\n if (this.effectiveOptions().showCrosshair === true && overlappingPoints.length > 0) {\n this.showCrosshairLines(overlappingPoints[0].point);\n }\n }\n\n /**\n * Gets the appropriate D3 easing function based on the option string\n */\n private getEasingFunction(easing?: string): any {\n switch (easing) {\n case 'linear':\n return this.d3.easeLinear;\n case 'ease':\n return this.d3.easePolyInOut;\n case 'ease-in':\n return this.d3.easePolyIn;\n case 'ease-out':\n return this.d3.easePolyOut;\n case 'ease-in-out':\n return this.d3.easePolyInOut;\n case 'cubic':\n return this.d3.easeCubic;\n case 'cubic-in':\n return this.d3.easeCubicIn;\n case 'cubic-out':\n return this.d3.easeCubicOut;\n case 'cubic-in-out':\n return this.d3.easeCubicInOut;\n default:\n return this.d3.easeCubicOut; // Default easing\n }\n }\n}\n","<div class=\"ax-line-chart\" #chartContainer>\n <!-- Shared tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"false\"\n ></ax-chart-tooltip>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAKa,MAAA,wBAAwB,GAAsB;AACzD,IAAA,OAAO,EAAE;AACP,QAAA,GAAG,EAAE,EAAE;AACP,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,IAAI,EAAE,EAAE;AACT,KAAA;AACD,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,CAAC;AACd,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,SAAS,EAAE,CAAC;AACZ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,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,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,EAAA,mRASA,EDuBY,MAAA,EAAA,CAAA,y3CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,+BAAE,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAGpC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAGb,UAAA,EAAA,IAAI,EACD,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,YAAY,EAAE,uBAAuB,CAAC,EAC/B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mRAAA,EAAA,MAAA,EAAA,CAAA,y3CAAA,CAAA,EAAA;;;AEjCjD;;AAEG;;;;"}
|
|
@@ -1,8 +1,41 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
// Default color palette for charts
|
|
4
|
+
const AX_CHART_COLOR_PALETTE = new InjectionToken('AX_CHART_COLOR_PALETTE', {
|
|
5
|
+
providedIn: 'root',
|
|
6
|
+
factory: () => [
|
|
7
|
+
'#FF6B6B', // Vibrant Red
|
|
8
|
+
'#4ECDC4', // Electric Teal
|
|
9
|
+
'#45B7D1', // Bright Blue
|
|
10
|
+
'#96CEB4', // Fresh Green
|
|
11
|
+
'#FFEEAD', // Bright Yellow
|
|
12
|
+
'#D4A5A5', // Rose Pink
|
|
13
|
+
'#9B59B6', // Rich Purple
|
|
14
|
+
'#3498DB', // Deep Blue
|
|
15
|
+
'#E67E22', // Bright Orange
|
|
16
|
+
'#2ECC71', // Emerald Green
|
|
17
|
+
'#E74C3C', // Cherry Red
|
|
18
|
+
'#1ABC9C', // Turquoise
|
|
19
|
+
'#F1C40F', // Golden Yellow
|
|
20
|
+
'#8E44AD', // Deep Purple
|
|
21
|
+
'#16A085', // Dark Teal
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Helper function to get a color from the palette by index
|
|
26
|
+
* @param index The index of the color to get
|
|
27
|
+
* @param palette The color palette to use
|
|
28
|
+
* @returns The color at the specified index
|
|
29
|
+
*/
|
|
30
|
+
function getChartColor(index, palette) {
|
|
31
|
+
return palette[index % palette.length];
|
|
32
|
+
}
|
|
33
|
+
|
|
1
34
|
const AX_CHARTS = 'ACOREX_CHARTS';
|
|
2
35
|
|
|
3
36
|
/**
|
|
4
37
|
* Generated bundle index. Do not edit.
|
|
5
38
|
*/
|
|
6
39
|
|
|
7
|
-
export { AX_CHARTS };
|
|
40
|
+
export { AX_CHARTS, AX_CHART_COLOR_PALETTE, getChartColor };
|
|
8
41
|
//# sourceMappingURL=acorex-charts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["export const AX_CHARTS = 'ACOREX_CHARTS';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/lib/chart-colors.ts","../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n// Default color palette for charts\nexport const AX_CHART_COLOR_PALETTE = new InjectionToken<string[]>('AX_CHART_COLOR_PALETTE', {\n providedIn: 'root',\n factory: () => [\n '#FF6B6B', // Vibrant Red\n '#4ECDC4', // Electric Teal\n '#45B7D1', // Bright Blue\n '#96CEB4', // Fresh Green\n '#FFEEAD', // Bright Yellow\n '#D4A5A5', // Rose Pink\n '#9B59B6', // Rich Purple\n '#3498DB', // Deep Blue\n '#E67E22', // Bright Orange\n '#2ECC71', // Emerald Green\n '#E74C3C', // Cherry Red\n '#1ABC9C', // Turquoise\n '#F1C40F', // Golden Yellow\n '#8E44AD', // Deep Purple\n '#16A085', // Dark Teal\n ],\n});\n\n/**\n * Helper function to get a color from the palette by index\n * @param index The index of the color to get\n * @param palette The color palette to use\n * @returns The color at the specified index\n */\nexport function getChartColor(index: number, palette: string[]): string {\n return palette[index % palette.length];\n}\n","export const AX_CHARTS = 'ACOREX_CHARTS';\nexport * from './lib/chart-colors';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA;MACa,sBAAsB,GAAG,IAAI,cAAc,CAAW,wBAAwB,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;AACb,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACV,KAAA;AACF,CAAA;AAED;;;;;AAKG;AACa,SAAA,aAAa,CAAC,KAAa,EAAE,OAAiB,EAAA;IAC5D,OAAO,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;AACxC;;AChCO,MAAM,SAAS,GAAG;;ACAzB;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export declare const AX_CHART_COLOR_PALETTE: InjectionToken<string[]>;
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to get a color from the palette by index
|
|
5
|
+
* @param index The index of the color to get
|
|
6
|
+
* @param palette The color palette to use
|
|
7
|
+
* @returns The color at the specified index
|
|
8
|
+
*/
|
|
9
|
+
export declare function getChartColor(index: number, palette: string[]): string;
|
|
@@ -3,10 +3,6 @@ import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
|
3
3
|
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
4
4
|
import { AXLineChartOption, AXLineChartPointClickEvent, AXLineChartValue } from './line-chart.type';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare const AXLineChartColors: {
|
|
7
|
-
defaultColors: string[];
|
|
8
|
-
getColor: (index: number, customPalette?: string[]) => string;
|
|
9
|
-
};
|
|
10
6
|
/**
|
|
11
7
|
* Line Chart Component for rendering data as lines with interactive hover effects and animations
|
|
12
8
|
*/
|
|
@@ -38,6 +34,7 @@ export declare class AXLineChartComponent extends NXComponent implements OnInit,
|
|
|
38
34
|
}>;
|
|
39
35
|
protected tooltipData: import("@angular/core").Signal<AXChartTooltipData>;
|
|
40
36
|
private configToken;
|
|
37
|
+
private chartColors;
|
|
41
38
|
protected effectiveOptions: import("@angular/core").Signal<{
|
|
42
39
|
width?: number;
|
|
43
40
|
height?: number;
|