@acorex/charts 20.1.24 → 20.1.25

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.
@@ -68,7 +68,7 @@ declare class AXChartLegendComponent {
68
68
  /**
69
69
  * Reference to legend container for measuring dimensions
70
70
  */
71
- legendContainer?: ElementRef<HTMLDivElement>;
71
+ legendContainer: _angular_core.Signal<ElementRef<HTMLDivElement>>;
72
72
  protected showValues: _angular_core.Signal<boolean>;
73
73
  protected showPercentage: _angular_core.Signal<boolean>;
74
74
  protected containerClass: _angular_core.Signal<{
@@ -2,11 +2,12 @@ import * as _angular_core from '@angular/core';
2
2
  import { ElementRef } from '@angular/core';
3
3
 
4
4
  interface AXChartTooltipData {
5
- title: string;
5
+ title: string | string[];
6
6
  value: number | string;
7
7
  percentage?: string;
8
- color?: string;
9
- [key: string]: any;
8
+ color?: string | string[];
9
+ tooltipColor?: string;
10
+ tooltipBgColor?: string;
10
11
  }
11
12
 
12
13
  declare class AXChartTooltipComponent {
@@ -30,10 +31,16 @@ declare class AXChartTooltipComponent {
30
31
  /**
31
32
  * Reference to tooltip container for measuring dimensions
32
33
  */
33
- tooltipContainer?: ElementRef<HTMLDivElement>;
34
+ tooltipContainer: _angular_core.Signal<ElementRef<HTMLDivElement>>;
34
35
  protected tooltipWidth: number;
35
36
  protected tooltipHeight: number;
36
37
  constructor();
38
+ protected isColorArray(): boolean;
39
+ protected colorList(): string[];
40
+ protected singleColor(): string | null;
41
+ protected isTitleArray(): boolean;
42
+ protected titleList(): string[];
43
+ protected colorAt(index: number): string | null;
37
44
  /**
38
45
  * Updates tooltip dimensions after it's rendered
39
46
  */
@@ -121,6 +121,7 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
121
121
  private _initialized;
122
122
  private _rendered;
123
123
  private _isInitialAnimating;
124
+ private _currentlyHighlightedSegment;
124
125
  private _tooltipVisible;
125
126
  private _tooltipPosition;
126
127
  private _tooltipData;
@@ -424,8 +424,7 @@ class AXBarChartComponent extends NXComponent {
424
424
  .style('font-size', `${dynamicXAxisTickFontSize}px`)
425
425
  .style('font-weight', '400')
426
426
  .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)')
427
- .attr('direction', 'ltr')
428
- .style('unicode-bidi', 'bidi-override');
427
+ .attr('direction', 'ltr');
429
428
  // Automatically rotate labels if they are likely to overlap
430
429
  if (this.xScale.domain().length > 0) {
431
430
  const step = this.xScale.step();
@@ -454,7 +453,6 @@ class AXBarChartComponent extends NXComponent {
454
453
  .attr('x', this.width / 2)
455
454
  .attr('y', labelY)
456
455
  .attr('direction', 'ltr')
457
- .style('unicode-bidi', 'bidi-override')
458
456
  .style('font-size', '14px')
459
457
  .style('font-weight', '500')
460
458
  .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')
@@ -472,8 +470,7 @@ class AXBarChartComponent extends NXComponent {
472
470
  .style('font-weight', '400')
473
471
  .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)')
474
472
  .attr('text-anchor', 'end')
475
- .attr('direction', 'ltr')
476
- .style('unicode-bidi', 'bidi-override');
473
+ .attr('direction', 'ltr');
477
474
  // Style all lines in the y-axis (path, ticks)
478
475
  this.yAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');
479
476
  // Add Y axis label if provided
@@ -489,7 +486,6 @@ class AXBarChartComponent extends NXComponent {
489
486
  .attr('x', labelX)
490
487
  .attr('y', labelY)
491
488
  .attr('direction', 'ltr')
492
- .style('unicode-bidi', 'bidi-override')
493
489
  .style('font-size', '14px')
494
490
  .style('font-weight', '500')
495
491
  .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')
@@ -533,8 +529,7 @@ class AXBarChartComponent extends NXComponent {
533
529
  .style('font-size', `${dynamicXAxisTickFontSize}px`)
534
530
  .style('font-weight', '400')
535
531
  .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)')
536
- .attr('direction', 'ltr')
537
- .style('unicode-bidi', 'bidi-override');
532
+ .attr('direction', 'ltr');
538
533
  if (this.xScale.domain().length > 0) {
539
534
  const step = this.xScale.step();
540
535
  const labelsForRotation = Array.from(idToLabel.values());
@@ -555,7 +550,6 @@ class AXBarChartComponent extends NXComponent {
555
550
  .attr('x', this.width / 2)
556
551
  .attr('y', labelY)
557
552
  .attr('direction', 'ltr')
558
- .style('unicode-bidi', 'bidi-override')
559
553
  .style('font-size', '14px')
560
554
  .style('font-weight', '500')
561
555
  .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')
@@ -571,8 +565,7 @@ class AXBarChartComponent extends NXComponent {
571
565
  .style('font-weight', '400')
572
566
  .style('fill', 'rgba(var(--ax-comp-bar-chart-labels-color), 0.7)')
573
567
  .attr('text-anchor', 'end')
574
- .attr('direction', 'ltr')
575
- .style('unicode-bidi', 'bidi-override');
568
+ .attr('direction', 'ltr');
576
569
  this.yAxis.selectAll('line, path').style('stroke', 'rgb(var(--ax-comp-bar-chart-grid-lines-color))');
577
570
  if (options.yAxisLabel) {
578
571
  const labelX = -this.height / 2;
@@ -586,7 +579,6 @@ class AXBarChartComponent extends NXComponent {
586
579
  .attr('x', labelX)
587
580
  .attr('y', labelY)
588
581
  .attr('direction', 'ltr')
589
- .style('unicode-bidi', 'bidi-override')
590
582
  .style('font-size', '14px')
591
583
  .style('font-weight', '500')
592
584
  .style('fill', 'rgb(var(--ax-comp-bar-chart-axis-label-color))')
@@ -1160,10 +1152,10 @@ class AXBarChartComponent extends NXComponent {
1160
1152
  }
1161
1153
  return !this.hiddenSeries.has(id);
1162
1154
  }
1163
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AXBarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1164
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.7", type: AXBarChartComponent, isStandalone: true, selector: "ax-bar-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: { barClick: "barClick" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: ["ax-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: var(--ax-sys-color-lightest-surface)}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-sys-color-on-lightest-surface));background-color:rgb(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-bar-chart .ax-bar-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-bar-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXBarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.8", type: AXBarChartComponent, isStandalone: true, selector: "ax-bar-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: { barClick: "barClick" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: ["ax-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: var(--ax-sys-color-lightest-surface)}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-sys-color-on-lightest-surface));background-color:rgb(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-bar-chart .ax-bar-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-bar-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1165
1157
  }
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AXBarChartComponent, decorators: [{
1158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXBarChartComponent, decorators: [{
1167
1159
  type: Component,
1168
1160
  args: [{ selector: 'ax-bar-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<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", styles: ["ax-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: var(--ax-sys-color-lightest-surface)}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-sys-color-on-lightest-surface));background-color:rgb(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-bar-chart .ax-bar-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-bar-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-help{font-size:.8rem;opacity:.6}\n"] }]
1169
1161
  }], ctorParameters: () => [] });