@swimlane/ngx-charts 25.0.0-beta.1 → 25.0.1

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/CHANGELOG.md CHANGED
@@ -2,9 +2,19 @@
2
2
 
3
3
  ## HEAD (unreleased)
4
4
 
5
+ ## 25.0.1
6
+
7
+ - Chore: Sync 25.x release with master (includes maintenance fixes already present on git that were missing from the original npm 25.0.0 publish)
8
+
9
+ ## 25.0.0
10
+
5
11
  - Enhancement: Added support for Angular 22
6
12
  - Breaking: Dropped support for Angular 19 and 20 (requires Angular 21.2+)
7
13
 
14
+ ## 24.0.2
15
+
16
+ - Fix: Side legend labels now truncate with CSS ellipsis instead of being hard-clipped when the legend width is constrained
17
+
8
18
  ## 24.0.1
9
19
 
10
20
  - Fix: Y-axis labels were cut off, misaligned when server-side rendered.
@@ -688,7 +688,13 @@ class LegendEntryComponent {
688
688
  }
689
689
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LegendEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
690
690
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: LegendEntryComponent, isStandalone: false, selector: "ngx-charts-legend-entry", inputs: { color: "color", label: "label", formattedLabel: "formattedLabel", isActive: "isActive" }, outputs: { select: "select", activate: "activate", deactivate: "deactivate", toggle: "toggle" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0, template: `
691
- <span [title]="formattedLabel" tabindex="-1" [class.active]="isActive" (click)="select.emit(formattedLabel)">
691
+ <span
692
+ [title]="formattedLabel"
693
+ tabindex="-1"
694
+ class="legend-entry"
695
+ [class.active]="isActive"
696
+ (click)="select.emit(formattedLabel)"
697
+ >
692
698
  <span class="legend-label-color" [style.background-color]="color" (click)="toggle.emit(formattedLabel)"> </span>
693
699
  <span class="legend-label-text">
694
700
  {{ trimmedLabel }}
@@ -701,7 +707,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
701
707
  args: [{
702
708
  selector: 'ngx-charts-legend-entry',
703
709
  template: `
704
- <span [title]="formattedLabel" tabindex="-1" [class.active]="isActive" (click)="select.emit(formattedLabel)">
710
+ <span
711
+ [title]="formattedLabel"
712
+ tabindex="-1"
713
+ class="legend-entry"
714
+ [class.active]="isActive"
715
+ (click)="select.emit(formattedLabel)"
716
+ >
705
717
  <span class="legend-label-color" [style.background-color]="color" (click)="toggle.emit(formattedLabel)"> </span>
706
718
  <span class="legend-label-text">
707
719
  {{ trimmedLabel }}
@@ -792,7 +804,13 @@ class LegendComponent {
792
804
  <span class="legend-title-text">{{ title }}</span>
793
805
  </header>
794
806
  <div class="legend-wrap">
795
- <ul class="legend-labels" [class.horizontal-legend]="horizontal" [style.max-height.px]="height - 45">
807
+ <ul
808
+ class="legend-labels"
809
+ [class.horizontal-legend]="horizontal"
810
+ [class.vertical-legend]="!horizontal"
811
+ [style.max-height.px]="!horizontal ? height - 45 : null"
812
+ [style.max-width.px]="horizontal && width ? width - 10 : null"
813
+ >
796
814
  <li *ngFor="let entry of legendEntries; trackBy: trackBy" class="legend-label">
797
815
  <ngx-charts-legend-entry
798
816
  [label]="entry.label"
@@ -808,7 +826,7 @@ class LegendComponent {
808
826
  </ul>
809
827
  </div>
810
828
  </div>
811
- `, isInline: true, styles: [".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:#0000000d}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LegendEntryComponent, selector: "ngx-charts-legend-entry", inputs: ["color", "label", "formattedLabel", "isActive"], outputs: ["select", "activate", "deactivate", "toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
829
+ `, isInline: true, styles: [".chart-legend{display:inline-block;padding:0;max-width:100%;box-sizing:border-box;overflow:hidden;vertical-align:top}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .vertical-legend .legend-label{width:100%;max-width:calc(100% - 20px)}.chart-legend .vertical-legend .legend-entry{display:flex;flex-grow:1;align-items:center;overflow:hidden}.chart-legend .legend-wrap{width:calc(100% - 10px);min-width:0}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;display:flex;flex-wrap:wrap;white-space:nowrap;border-radius:3px;background:#0000000d}.chart-legend .legend-labels.vertical-legend{overflow-x:hidden;overflow-y:auto}.chart-legend .legend-labels.horizontal-legend{max-width:100%;overflow-x:auto;overflow-y:hidden}.chart-legend .legend-labels.horizontal-legend li{display:inline-block}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;min-width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LegendEntryComponent, selector: "ngx-charts-legend-entry", inputs: ["color", "label", "formattedLabel", "isActive"], outputs: ["select", "activate", "deactivate", "toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
812
830
  }
813
831
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LegendComponent, decorators: [{
814
832
  type: Component,
@@ -818,7 +836,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
818
836
  <span class="legend-title-text">{{ title }}</span>
819
837
  </header>
820
838
  <div class="legend-wrap">
821
- <ul class="legend-labels" [class.horizontal-legend]="horizontal" [style.max-height.px]="height - 45">
839
+ <ul
840
+ class="legend-labels"
841
+ [class.horizontal-legend]="horizontal"
842
+ [class.vertical-legend]="!horizontal"
843
+ [style.max-height.px]="!horizontal ? height - 45 : null"
844
+ [style.max-width.px]="horizontal && width ? width - 10 : null"
845
+ >
822
846
  <li *ngFor="let entry of legendEntries; trackBy: trackBy" class="legend-label">
823
847
  <ngx-charts-legend-entry
824
848
  [label]="entry.label"
@@ -834,7 +858,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
834
858
  </ul>
835
859
  </div>
836
860
  </div>
837
- `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:#0000000d}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
861
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".chart-legend{display:inline-block;padding:0;max-width:100%;box-sizing:border-box;overflow:hidden;vertical-align:top}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .vertical-legend .legend-label{width:100%;max-width:calc(100% - 20px)}.chart-legend .vertical-legend .legend-entry{display:flex;flex-grow:1;align-items:center;overflow:hidden}.chart-legend .legend-wrap{width:calc(100% - 10px);min-width:0}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;display:flex;flex-wrap:wrap;white-space:nowrap;border-radius:3px;background:#0000000d}.chart-legend .legend-labels.vertical-legend{overflow-x:hidden;overflow-y:auto}.chart-legend .legend-labels.horizontal-legend{max-width:100%;overflow-x:auto;overflow-y:hidden}.chart-legend .legend-labels.horizontal-legend li{display:inline-block}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;min-width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
838
862
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { data: [{
839
863
  type: Input
840
864
  }], title: [{
@@ -973,6 +997,8 @@ class ChartComponent {
973
997
  <ngx-charts-scale-legend
974
998
  *ngIf="showLegend && legendType === LegendType.ScaleLegend"
975
999
  class="chart-legend"
1000
+ [style.width.px]="legendWidth"
1001
+ [style.maxWidth.px]="legendWidth"
976
1002
  [horizontal]="legendOptions && legendOptions.position === LegendPosition.Below"
977
1003
  [valueRange]="legendOptions.domain"
978
1004
  [colors]="legendOptions.colors"
@@ -983,6 +1009,8 @@ class ChartComponent {
983
1009
  <ngx-charts-legend
984
1010
  *ngIf="showLegend && legendType === LegendType.Legend"
985
1011
  class="chart-legend"
1012
+ [style.width.px]="legendWidth"
1013
+ [style.maxWidth.px]="legendWidth"
986
1014
  [horizontal]="legendOptions && legendOptions.position === LegendPosition.Below"
987
1015
  [data]="legendOptions.domain"
988
1016
  [title]="legendOptions.title"
@@ -1011,6 +1039,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1011
1039
  <ngx-charts-scale-legend
1012
1040
  *ngIf="showLegend && legendType === LegendType.ScaleLegend"
1013
1041
  class="chart-legend"
1042
+ [style.width.px]="legendWidth"
1043
+ [style.maxWidth.px]="legendWidth"
1014
1044
  [horizontal]="legendOptions && legendOptions.position === LegendPosition.Below"
1015
1045
  [valueRange]="legendOptions.domain"
1016
1046
  [colors]="legendOptions.colors"
@@ -1021,6 +1051,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1021
1051
  <ngx-charts-legend
1022
1052
  *ngIf="showLegend && legendType === LegendType.Legend"
1023
1053
  class="chart-legend"
1054
+ [style.width.px]="legendWidth"
1055
+ [style.maxWidth.px]="legendWidth"
1024
1056
  [horizontal]="legendOptions && legendOptions.position === LegendPosition.Below"
1025
1057
  [data]="legendOptions.domain"
1026
1058
  [title]="legendOptions.title"