@delon/chart 13.2.0 → 13.2.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.
Files changed (92) hide show
  1. package/core/g2.base.component.d.ts +2 -0
  2. package/esm2020/bar/bar.component.mjs +5 -5
  3. package/esm2020/bar/bar.module.mjs +4 -4
  4. package/esm2020/card/card.component.mjs +3 -3
  5. package/esm2020/card/card.module.mjs +4 -4
  6. package/esm2020/chart-echarts/echarts.component.mjs +3 -3
  7. package/esm2020/chart-echarts/echarts.module.mjs +4 -4
  8. package/esm2020/chart-echarts/echarts.service.mjs +3 -3
  9. package/esm2020/core/g2.base.component.mjs +8 -5
  10. package/esm2020/core/g2.servicce.mjs +5 -5
  11. package/esm2020/custom/custom.component.mjs +3 -3
  12. package/esm2020/custom/custom.module.mjs +4 -4
  13. package/esm2020/gauge/gauge.component.mjs +6 -6
  14. package/esm2020/gauge/gauge.module.mjs +4 -4
  15. package/esm2020/mini-area/mini-area.component.mjs +5 -5
  16. package/esm2020/mini-area/mini-area.module.mjs +4 -4
  17. package/esm2020/mini-bar/mini-bar.component.mjs +5 -5
  18. package/esm2020/mini-bar/mini-bar.module.mjs +4 -4
  19. package/esm2020/mini-progress/mini-progress.component.mjs +3 -3
  20. package/esm2020/mini-progress/mini-progress.module.mjs +4 -4
  21. package/esm2020/number-info/number-info.component.mjs +3 -3
  22. package/esm2020/number-info/number-info.module.mjs +4 -4
  23. package/esm2020/pie/pie.component.mjs +16 -10
  24. package/esm2020/pie/pie.module.mjs +4 -4
  25. package/esm2020/radar/radar.component.mjs +5 -5
  26. package/esm2020/radar/radar.module.mjs +4 -4
  27. package/esm2020/single-bar/single-bar.component.mjs +5 -5
  28. package/esm2020/single-bar/single-bar.module.mjs +4 -4
  29. package/esm2020/tag-cloud/tag-cloud.component.mjs +8 -7
  30. package/esm2020/tag-cloud/tag-cloud.module.mjs +4 -4
  31. package/esm2020/timeline/timeline.component.mjs +5 -5
  32. package/esm2020/timeline/timeline.module.mjs +4 -4
  33. package/esm2020/trend/trend.component.mjs +3 -3
  34. package/esm2020/trend/trend.module.mjs +4 -4
  35. package/esm2020/water-wave/water-wave.component.mjs +3 -3
  36. package/esm2020/water-wave/water-wave.module.mjs +4 -4
  37. package/fesm2015/bar.mjs +8 -8
  38. package/fesm2015/bar.mjs.map +1 -1
  39. package/fesm2015/card.mjs +7 -7
  40. package/fesm2015/chart-echarts.mjs +10 -10
  41. package/fesm2015/core.mjs +11 -8
  42. package/fesm2015/core.mjs.map +1 -1
  43. package/fesm2015/custom.mjs +7 -7
  44. package/fesm2015/gauge.mjs +9 -9
  45. package/fesm2015/gauge.mjs.map +1 -1
  46. package/fesm2015/mini-area.mjs +8 -8
  47. package/fesm2015/mini-area.mjs.map +1 -1
  48. package/fesm2015/mini-bar.mjs +8 -8
  49. package/fesm2015/mini-bar.mjs.map +1 -1
  50. package/fesm2015/mini-progress.mjs +7 -7
  51. package/fesm2015/number-info.mjs +7 -7
  52. package/fesm2015/pie.mjs +19 -13
  53. package/fesm2015/pie.mjs.map +1 -1
  54. package/fesm2015/radar.mjs +8 -8
  55. package/fesm2015/radar.mjs.map +1 -1
  56. package/fesm2015/single-bar.mjs +8 -8
  57. package/fesm2015/single-bar.mjs.map +1 -1
  58. package/fesm2015/tag-cloud.mjs +11 -10
  59. package/fesm2015/tag-cloud.mjs.map +1 -1
  60. package/fesm2015/timeline.mjs +8 -8
  61. package/fesm2015/timeline.mjs.map +1 -1
  62. package/fesm2015/trend.mjs +7 -7
  63. package/fesm2015/water-wave.mjs +7 -7
  64. package/fesm2020/bar.mjs +8 -8
  65. package/fesm2020/bar.mjs.map +1 -1
  66. package/fesm2020/card.mjs +7 -7
  67. package/fesm2020/chart-echarts.mjs +10 -10
  68. package/fesm2020/core.mjs +11 -8
  69. package/fesm2020/core.mjs.map +1 -1
  70. package/fesm2020/custom.mjs +7 -7
  71. package/fesm2020/gauge.mjs +9 -9
  72. package/fesm2020/gauge.mjs.map +1 -1
  73. package/fesm2020/mini-area.mjs +8 -8
  74. package/fesm2020/mini-area.mjs.map +1 -1
  75. package/fesm2020/mini-bar.mjs +8 -8
  76. package/fesm2020/mini-bar.mjs.map +1 -1
  77. package/fesm2020/mini-progress.mjs +7 -7
  78. package/fesm2020/number-info.mjs +7 -7
  79. package/fesm2020/pie.mjs +19 -13
  80. package/fesm2020/pie.mjs.map +1 -1
  81. package/fesm2020/radar.mjs +8 -8
  82. package/fesm2020/radar.mjs.map +1 -1
  83. package/fesm2020/single-bar.mjs +8 -8
  84. package/fesm2020/single-bar.mjs.map +1 -1
  85. package/fesm2020/tag-cloud.mjs +11 -10
  86. package/fesm2020/tag-cloud.mjs.map +1 -1
  87. package/fesm2020/timeline.mjs +8 -8
  88. package/fesm2020/timeline.mjs.map +1 -1
  89. package/fesm2020/trend.mjs +7 -7
  90. package/fesm2020/water-wave.mjs +7 -7
  91. package/package.json +3 -3
  92. package/pie/pie.component.d.ts +2 -1
@@ -15,8 +15,8 @@ class TrendComponent {
15
15
  this.reverseColor = false;
16
16
  }
17
17
  }
18
- TrendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
- TrendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TrendComponent, selector: "trend", inputs: { flag: "flag", colorful: "colorful", reverseColor: "reverseColor" }, host: { properties: { "class.trend": "true", "class.trend__grey": "!colorful", "class.trend__reverse": "colorful && reverseColor", "attr.data-flag": "flag" } }, exportAs: ["trend"], ngImport: i0, template: `
18
+ TrendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ TrendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: TrendComponent, selector: "trend", inputs: { flag: "flag", colorful: "colorful", reverseColor: "reverseColor" }, host: { properties: { "class.trend": "true", "class.trend__grey": "!colorful", "class.trend__reverse": "colorful && reverseColor", "attr.data-flag": "flag" } }, exportAs: ["trend"], ngImport: i0, template: `
20
20
  <ng-content></ng-content>
21
21
  <span *ngIf="flag" class="trend__{{ flag }}"><i nz-icon nzType="caret-{{ flag }}"></i></span>
22
22
  `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -26,7 +26,7 @@ __decorate([
26
26
  __decorate([
27
27
  InputBoolean()
28
28
  ], TrendComponent.prototype, "reverseColor", void 0);
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendComponent, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendComponent, decorators: [{
30
30
  type: Component,
31
31
  args: [{
32
32
  selector: 'trend',
@@ -56,10 +56,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
56
56
  const COMPONENTS = [TrendComponent];
57
57
  class TrendModule {
58
58
  }
59
- TrendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
60
- TrendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendModule, declarations: [TrendComponent], imports: [CommonModule, NzIconModule], exports: [TrendComponent] });
61
- TrendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendModule, imports: [[CommonModule, NzIconModule]] });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TrendModule, decorators: [{
59
+ TrendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
60
+ TrendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendModule, declarations: [TrendComponent], imports: [CommonModule, NzIconModule], exports: [TrendComponent] });
61
+ TrendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendModule, imports: [[CommonModule, NzIconModule]] });
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TrendModule, decorators: [{
63
63
  type: NgModule,
64
64
  args: [{
65
65
  imports: [CommonModule, NzIconModule],
@@ -188,8 +188,8 @@ class G2WaterWaveComponent {
188
188
  }
189
189
  }
190
190
  }
191
- G2WaterWaveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component });
192
- G2WaterWaveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2WaterWaveComponent, selector: "g2-water-wave", inputs: { animate: "animate", delay: "delay", title: "title", color: "color", height: "height", percent: "percent" }, host: { properties: { "class.g2-water-wave": "true" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["g2WaterWave"], usesOnChanges: true, ngImport: i0, template: "<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n", directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
191
+ G2WaterWaveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component });
192
+ G2WaterWaveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2WaterWaveComponent, selector: "g2-water-wave", inputs: { animate: "animate", delay: "delay", title: "title", color: "color", height: "height", percent: "percent" }, host: { properties: { "class.g2-water-wave": "true" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["g2WaterWave"], usesOnChanges: true, ngImport: i0, template: "<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n", directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
193
193
  __decorate([
194
194
  InputBoolean()
195
195
  ], G2WaterWaveComponent.prototype, "animate", void 0);
@@ -202,7 +202,7 @@ __decorate([
202
202
  __decorate([
203
203
  InputNumber()
204
204
  ], G2WaterWaveComponent.prototype, "percent", void 0);
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveComponent, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveComponent, decorators: [{
206
206
  type: Component,
207
207
  args: [{ selector: 'g2-water-wave', exportAs: 'g2WaterWave', host: { '[class.g2-water-wave]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n" }]
208
208
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.Platform }]; }, propDecorators: { node: [{
@@ -225,10 +225,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
225
225
  const COMPONENTS = [G2WaterWaveComponent];
226
226
  class G2WaterWaveModule {
227
227
  }
228
- G2WaterWaveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
- G2WaterWaveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveModule, declarations: [G2WaterWaveComponent], imports: [CommonModule, NzOutletModule], exports: [G2WaterWaveComponent] });
230
- G2WaterWaveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveModule, imports: [[CommonModule, NzOutletModule]] });
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2WaterWaveModule, decorators: [{
228
+ G2WaterWaveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
+ G2WaterWaveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveModule, declarations: [G2WaterWaveComponent], imports: [CommonModule, NzOutletModule], exports: [G2WaterWaveComponent] });
230
+ G2WaterWaveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveModule, imports: [[CommonModule, NzOutletModule]] });
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2WaterWaveModule, decorators: [{
232
232
  type: NgModule,
233
233
  args: [{
234
234
  imports: [CommonModule, NzOutletModule],
package/fesm2020/bar.mjs CHANGED
@@ -31,7 +31,7 @@ class G2BarComponent extends G2BaseComponent {
31
31
  install() {
32
32
  const { node, padding, interaction, theme } = this;
33
33
  const container = node.nativeElement;
34
- const chart = (this._chart = new window.G2.Chart({
34
+ const chart = (this._chart = new this.winG2.Chart({
35
35
  container,
36
36
  autoFit: true,
37
37
  height: this.getHeight(),
@@ -95,8 +95,8 @@ class G2BarComponent extends G2BaseComponent {
95
95
  .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));
96
96
  }
97
97
  }
98
- G2BarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
99
- G2BarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2BarComponent, selector: "g2-bar", inputs: { title: "title", color: "color", height: "height", padding: "padding", data: "data", autoLabel: "autoLabel", interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
98
+ G2BarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
99
+ G2BarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2BarComponent, selector: "g2-bar", inputs: { title: "title", color: "color", height: "height", padding: "padding", data: "data", autoLabel: "autoLabel", interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
100
100
  <ng-container *nzStringTemplateOutlet="title">
101
101
  <h4 style="margin-bottom: 20px;">{{ title }}</h4>
102
102
  </ng-container>
@@ -109,7 +109,7 @@ __decorate([
109
109
  __decorate([
110
110
  InputBoolean()
111
111
  ], G2BarComponent.prototype, "autoLabel", void 0);
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarComponent, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarComponent, decorators: [{
113
113
  type: Component,
114
114
  args: [{
115
115
  selector: 'g2-bar',
@@ -149,10 +149,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
149
149
  const COMPONENTS = [G2BarComponent];
150
150
  class G2BarModule {
151
151
  }
152
- G2BarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
153
- G2BarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarModule, declarations: [G2BarComponent], imports: [CommonModule, NzOutletModule, NzSkeletonModule], exports: [G2BarComponent] });
154
- G2BarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarModule, imports: [[CommonModule, NzOutletModule, NzSkeletonModule]] });
155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BarModule, decorators: [{
152
+ G2BarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
153
+ G2BarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarModule, declarations: [G2BarComponent], imports: [CommonModule, NzOutletModule, NzSkeletonModule], exports: [G2BarComponent] });
154
+ G2BarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarModule, imports: [[CommonModule, NzOutletModule, NzSkeletonModule]] });
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BarModule, decorators: [{
156
156
  type: NgModule,
157
157
  args: [{
158
158
  imports: [CommonModule, NzOutletModule, NzSkeletonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"bar.mjs","sources":["../../../../packages/chart/bar/bar.component.ts","../../../../packages/chart/bar/bar.module.ts","../../../../packages/chart/bar/bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, G2InteractionType } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nconst TITLE_HEIGHT = 41;\n\nexport interface G2BarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2BarClickItem {\n item: G2BarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-bar',\n exportAs: 'g2Bar',\n template: `\n <ng-container *nzStringTemplateOutlet=\"title\">\n <h4 style=\"margin-bottom: 20px;\">{{ title }}</h4>\n </ng-container>\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container></div>\n `,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2BarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_autoLabel: BooleanInput;\n\n // #region fields\n\n @Input() title?: string | TemplateRef<void>;\n @Input() color = 'rgba(24, 144, 255, 0.85)';\n @Input() @InputNumber() height = 0;\n @Input() padding: number | number[] | 'auto' = 'auto';\n @Input() data: G2BarData[] = [];\n @Input() @InputBoolean() autoLabel = true;\n @Input() interaction: G2InteractionType = 'none';\n @Output() readonly clickItem = new EventEmitter<G2BarClickItem>();\n\n // #endregion\n\n private getHeight(): number {\n return this.title ? this.height - TITLE_HEIGHT : this.height;\n }\n\n install(): void {\n const { node, padding, interaction, theme } = this;\n\n const container = node.nativeElement as HTMLElement;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container,\n autoFit: true,\n height: this.getHeight(),\n padding,\n theme\n }));\n this.updatelabel();\n chart.axis('y', {\n title: null,\n line: null,\n tickLine: null\n });\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.tooltip({\n showTitle: false\n });\n if (interaction !== 'none') {\n chart.interaction(interaction);\n }\n chart.legend(false);\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : this.color;\n })\n .tooltip('x*y', (x, y) => ({ name: x, value: y }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.ready.next(chart);\n\n this.changeData();\n chart.render();\n this.installResizeEvent();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n\n private updatelabel(): void {\n const { node, data, _chart } = this;\n const canvasWidth = node.nativeElement.clientWidth;\n const minWidth = data.length * 30;\n _chart.axis('x', canvasWidth > minWidth).render();\n }\n\n private installResizeEvent(): void {\n if (!this.autoLabel || this.resize$) return;\n\n this.resize$ = fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2BarComponent } from './bar.component';\n\nconst COMPONENTS = [G2BarComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2BarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,EAAE,CAAC;MA+BX,cAAe,SAAQ,eAAe;IAjBnD;;QAwBW,UAAK,GAAG,0BAA0B,CAAC;QACpB,WAAM,GAAG,CAAC,CAAC;QAC1B,YAAO,GAA+B,MAAM,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACP,cAAS,GAAG,IAAI,CAAC;QACjC,gBAAW,GAAsB,MAAM,CAAC;QAC9B,cAAS,GAAG,IAAI,YAAY,EAAkB,CAAC;KAqFnE;;IAjFS,SAAS;QACf,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO;QACL,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEnD,MAAM,SAAS,GAAG,IAAI,CAAC,aAA4B,CAAC;QACpD,MAAM,KAAK,IAAW,IAAI,CAAC,MAAM,GAAG,IAAK,MAAoB,CAAC,EAAE,CAAC,KAAK,CAAC;YACrE,SAAS;YACT,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI,CAAC,SAAS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2GAjGU,cAAc;+FAAd,cAAc,0UAdf;;;;;;GAMT;AAgBuB;IAAd,WAAW,EAAE;8CAAY;AAGV;IAAf,YAAY,EAAE;iDAAkB;2FAX/B,cAAc;kBAjB1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE;;;;;;GAMT;oBACD,IAAI,EAAE;wBACJ,mBAAmB,EAAE,QAAQ;qBAC9B;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAOU,KAAK;sBAAb,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACkB,MAAM;sBAA7B,KAAK;gBACG,OAAO;sBAAf,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACmB,SAAS;sBAAjC,KAAK;gBACG,WAAW;sBAAnB,KAAK;gBACa,SAAS;sBAA3B,MAAM;;;ACtDT,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;MAOvB,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAPJ,cAAc,aAGtB,YAAY,EAAE,cAAc,EAAE,gBAAgB,aAHtC,cAAc;yGAOrB,WAAW,YAJb,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;2FAI9C,WAAW;kBALvB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
1
+ {"version":3,"file":"bar.mjs","sources":["../../../../packages/chart/bar/bar.component.ts","../../../../packages/chart/bar/bar.module.ts","../../../../packages/chart/bar/bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, G2InteractionType } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nconst TITLE_HEIGHT = 41;\n\nexport interface G2BarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2BarClickItem {\n item: G2BarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-bar',\n exportAs: 'g2Bar',\n template: `\n <ng-container *nzStringTemplateOutlet=\"title\">\n <h4 style=\"margin-bottom: 20px;\">{{ title }}</h4>\n </ng-container>\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container></div>\n `,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2BarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_autoLabel: BooleanInput;\n\n // #region fields\n\n @Input() title?: string | TemplateRef<void>;\n @Input() color = 'rgba(24, 144, 255, 0.85)';\n @Input() @InputNumber() height = 0;\n @Input() padding: number | number[] | 'auto' = 'auto';\n @Input() data: G2BarData[] = [];\n @Input() @InputBoolean() autoLabel = true;\n @Input() interaction: G2InteractionType = 'none';\n @Output() readonly clickItem = new EventEmitter<G2BarClickItem>();\n\n // #endregion\n\n private getHeight(): number {\n return this.title ? this.height - TITLE_HEIGHT : this.height;\n }\n\n install(): void {\n const { node, padding, interaction, theme } = this;\n\n const container = node.nativeElement as HTMLElement;\n const chart: Chart = (this._chart = new this.winG2.Chart({\n container,\n autoFit: true,\n height: this.getHeight(),\n padding,\n theme\n }));\n this.updatelabel();\n chart.axis('y', {\n title: null,\n line: null,\n tickLine: null\n });\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.tooltip({\n showTitle: false\n });\n if (interaction !== 'none') {\n chart.interaction(interaction);\n }\n chart.legend(false);\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : this.color;\n })\n .tooltip('x*y', (x, y) => ({ name: x, value: y }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.ready.next(chart);\n\n this.changeData();\n chart.render();\n this.installResizeEvent();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n\n private updatelabel(): void {\n const { node, data, _chart } = this;\n const canvasWidth = node.nativeElement.clientWidth;\n const minWidth = data.length * 30;\n _chart.axis('x', canvasWidth > minWidth).render();\n }\n\n private installResizeEvent(): void {\n if (!this.autoLabel || this.resize$) return;\n\n this.resize$ = fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2BarComponent } from './bar.component';\n\nconst COMPONENTS = [G2BarComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2BarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,EAAE,CAAC;MA+BX,cAAe,SAAQ,eAAe;IAjBnD;;QAwBW,UAAK,GAAG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AAK;gBACa,SAAS;sBAA3B,MAAM;;;ACtDT,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;MAOvB,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAPJ,cAAc,aAGtB,YAAY,EAAE,cAAc,EAAE,gBAAgB,aAHtC,cAAc;yGAOrB,WAAW,YAJb,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;2FAI9C,WAAW;kBALvB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
package/fesm2020/card.mjs CHANGED
@@ -29,15 +29,15 @@ class G2CardComponent {
29
29
  this.cdr.detectChanges();
30
30
  }
31
31
  }
32
- G2CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
33
- G2CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2CardComponent, selector: "g2-card", inputs: { bordered: "bordered", avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: "loading" }, host: { properties: { "class.g2-card": "true" } }, exportAs: ["g2Card"], usesOnChanges: true, ngImport: i0, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", components: [{ type: i1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }], directives: [{ type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
32
+ G2CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
33
+ G2CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2CardComponent, selector: "g2-card", inputs: { bordered: "bordered", avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: "loading" }, host: { properties: { "class.g2-card": "true" } }, exportAs: ["g2Card"], usesOnChanges: true, ngImport: i0, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", components: [{ type: i1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }], directives: [{ type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34
34
  __decorate([
35
35
  InputBoolean()
36
36
  ], G2CardComponent.prototype, "bordered", void 0);
37
37
  __decorate([
38
38
  InputBoolean()
39
39
  ], G2CardComponent.prototype, "loading", void 0);
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardComponent, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardComponent, decorators: [{
41
41
  type: Component,
42
42
  args: [{ selector: 'g2-card', exportAs: 'g2Card', host: { '[class.g2-card]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n" }]
43
43
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { bordered: [{
@@ -61,10 +61,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
61
61
  const COMPONENTS = [G2CardComponent];
62
62
  class G2CardModule {
63
63
  }
64
- G2CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
- G2CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardModule, declarations: [G2CardComponent], imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule], exports: [G2CardComponent] });
66
- G2CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardModule, imports: [[CommonModule, NzCardModule, NzSpinModule, NzOutletModule]] });
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CardModule, decorators: [{
64
+ G2CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
+ G2CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardModule, declarations: [G2CardComponent], imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule], exports: [G2CardComponent] });
66
+ G2CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardModule, imports: [[CommonModule, NzCardModule, NzSpinModule, NzOutletModule]] });
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CardModule, decorators: [{
68
68
  type: NgModule,
69
69
  args: [{
70
70
  imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule],
@@ -60,9 +60,9 @@ class ChartEChartsService {
60
60
  this.notify$.unsubscribe();
61
61
  }
62
62
  }
63
- ChartEChartsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsService, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
64
- ChartEChartsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsService, decorators: [{
63
+ ChartEChartsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsService, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
64
+ ChartEChartsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsService, decorators: [{
66
66
  type: Injectable,
67
67
  args: [{ providedIn: 'root' }]
68
68
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
@@ -174,15 +174,15 @@ class ChartEChartsComponent {
174
174
  this.destroy();
175
175
  }
176
176
  }
177
- ChartEChartsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsComponent, deps: [{ token: ChartEChartsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Component });
178
- ChartEChartsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ChartEChartsComponent, selector: "chart-echarts, [chart-echarts]", inputs: { width: "width", height: "height", theme: "theme", initOpt: "initOpt", option: "option", on: "on" }, outputs: { events: "events" }, host: { properties: { "style.display": "'inline-block'", "style.width": "_width", "style.height": "_height" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["chartECharts"], ngImport: i0, template: `
177
+ ChartEChartsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsComponent, deps: [{ token: ChartEChartsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Component });
178
+ ChartEChartsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ChartEChartsComponent, selector: "chart-echarts, [chart-echarts]", inputs: { width: "width", height: "height", theme: "theme", initOpt: "initOpt", option: "option", on: "on" }, outputs: { events: "events" }, host: { properties: { "style.display": "'inline-block'", "style.width": "_width", "style.height": "_height" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["chartECharts"], ngImport: i0, template: `
179
179
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
180
180
  <div #container [style.width]="_width" [style.height]="_height"></div>
181
181
  `, isInline: true, components: [{ type: i3.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
182
  __decorate([
183
183
  ZoneOutside()
184
184
  ], ChartEChartsComponent.prototype, "load", null);
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsComponent, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsComponent, decorators: [{
186
186
  type: Component,
187
187
  args: [{
188
188
  selector: 'chart-echarts, [chart-echarts]',
@@ -222,10 +222,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
222
222
  const COMPONENTS = [ChartEChartsComponent];
223
223
  class ChartEChartsModule {
224
224
  }
225
- ChartEChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
- ChartEChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsModule, declarations: [ChartEChartsComponent], imports: [CommonModule, NzSkeletonModule], exports: [ChartEChartsComponent] });
227
- ChartEChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsModule, imports: [[CommonModule, NzSkeletonModule]] });
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartEChartsModule, decorators: [{
225
+ ChartEChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
+ ChartEChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsModule, declarations: [ChartEChartsComponent], imports: [CommonModule, NzSkeletonModule], exports: [ChartEChartsComponent] });
227
+ ChartEChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsModule, imports: [[CommonModule, NzSkeletonModule]] });
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ChartEChartsModule, decorators: [{
229
229
  type: NgModule,
230
230
  args: [{
231
231
  imports: [CommonModule, NzSkeletonModule],
package/fesm2020/core.mjs CHANGED
@@ -24,7 +24,7 @@ class G2Service {
24
24
  this._cog = this.cogSrv.merge('chart', {
25
25
  theme: '',
26
26
  libs: [
27
- 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js',
27
+ 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.46/dist/g2.min.js',
28
28
  'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'
29
29
  ]
30
30
  }, val);
@@ -50,9 +50,9 @@ class G2Service {
50
50
  this.notify$.unsubscribe();
51
51
  }
52
52
  }
53
- G2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2Service, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
54
- G2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2Service, providedIn: 'root' });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2Service, decorators: [{
53
+ G2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2Service, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
54
+ G2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2Service, providedIn: 'root' });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2Service, decorators: [{
56
56
  type: Injectable,
57
57
  args: [{ providedIn: 'root' }]
58
58
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
@@ -77,6 +77,9 @@ class G2BaseComponent {
77
77
  get chart() {
78
78
  return this._chart;
79
79
  }
80
+ get winG2() {
81
+ return window.G2;
82
+ }
80
83
  /** G2数据变更 */
81
84
  changeData() { }
82
85
  /** 等同 `ngOnInit` */
@@ -95,7 +98,7 @@ class G2BaseComponent {
95
98
  return;
96
99
  }
97
100
  this.onInit();
98
- if (window.G2) {
101
+ if (this.winG2) {
99
102
  this.load();
100
103
  }
101
104
  else {
@@ -132,8 +135,8 @@ class G2BaseComponent {
132
135
  this.destroyChart();
133
136
  }
134
137
  }
135
- G2BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BaseComponent, deps: [{ token: G2Service }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2$1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
136
- G2BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: G2BaseComponent, inputs: { repaint: "repaint", delay: "delay", theme: "theme" }, outputs: { ready: "ready" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
138
+ G2BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BaseComponent, deps: [{ token: G2Service }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2$1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
139
+ G2BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: G2BaseComponent, inputs: { repaint: "repaint", delay: "delay", theme: "theme" }, outputs: { ready: "ready" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
137
140
  __decorate([
138
141
  InputBoolean()
139
142
  ], G2BaseComponent.prototype, "repaint", void 0);
@@ -146,7 +149,7 @@ __decorate([
146
149
  __decorate([
147
150
  ZoneOutside()
148
151
  ], G2BaseComponent.prototype, "destroyChart", null);
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2BaseComponent, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2BaseComponent, decorators: [{
150
153
  type: Directive
151
154
  }], ctorParameters: function () { return [{ type: G2Service }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2$1.Platform }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { repaint: [{
152
155
  type: Input
@@ -1 +1 @@
1
- {"version":3,"file":"core.mjs","sources":["../../../../packages/chart/core/g2.servicce.ts","../../../../packages/chart/core/g2.base.component.ts","../../../../packages/chart/core/utils.ts","../../../../packages/chart/core/core.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class G2Service implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n libs: [\n 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js',\n 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'\n ]\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.libs!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { G2Service } from './g2.servicce';\n\n@Directive()\nexport abstract class G2BaseComponent implements OnInit, OnChanges, OnDestroy {\n get chart(): Chart {\n return this._chart;\n }\n\n constructor(\n protected srv: G2Service,\n protected el: ElementRef<HTMLElement>,\n protected ngZone: NgZone,\n protected platform: Platform,\n protected cdr: ChangeDetectorRef\n ) {\n this.theme = srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n static ngAcceptInputType_repaint: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n @Input() @InputBoolean() repaint = true;\n\n @ViewChild('container', { static: true }) protected node!: ElementRef;\n protected resize$?: Subscription;\n protected destroy$ = new Subject<void>();\n protected _chart!: Chart;\n loaded = false;\n\n @Input() @InputNumber() delay = 0;\n @Input() theme: string | Types.LooseObject;\n @Output() readonly ready = new EventEmitter<Chart>();\n\n /** 检查是否只变更数据 */\n onlyChangeData?: (changes: SimpleChanges) => boolean;\n\n abstract install(): void;\n\n /** G2数据变更 */\n changeData(): void {}\n\n /** 等同 `ngOnInit` */\n onInit(): void {}\n\n /** 等同 `ngOnChanges` */\n onChanges(_: SimpleChanges): void {}\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n setTimeout(() => this.install(), this.delay);\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.onInit();\n if ((window as NzSafeAny).G2) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.onChanges(changes);\n\n const isOnlyChangeData = this.onlyChangeData\n ? this.onlyChangeData(changes)\n : Object.keys(changes).length === 1 && !!changes.data;\n if (isOnlyChangeData) {\n this.changeData();\n return;\n }\n if (!this.chart || !this.repaint) return;\n this.ngZone.runOutsideAngular(() => {\n this.destroyChart().install();\n });\n }\n\n @ZoneOutside()\n protected destroyChart(): this {\n if (this._chart) {\n this._chart.destroy();\n }\n return this;\n }\n\n ngOnDestroy(): void {\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n this.destroy$.next();\n this.destroy$.complete();\n this.destroyChart();\n }\n}\n","import type { Types } from '@antv/g2';\n\nexport function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg {\n const res: Types.TooltipCfg = {\n showTitle: false,\n showMarkers: true,\n enterable: true,\n domStyles: {\n 'g2-tooltip': { padding: '0px' },\n 'g2-tooltip-title': { display: 'none' },\n 'g2-tooltip-list-item': { margin: '4px' }\n },\n ...options\n };\n if (type === 'mini') {\n res.position = 'top';\n res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' };\n res.itemTpl = `<li>{value}</li>`;\n res.offset = 8;\n }\n\n return res;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,SAAS;IAuBpB,YAAoB,MAA0B,EAAU,OAAoB;Q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;gBAE8C,IAAI;sBAAvD,SAAS;uBAAC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAMhB,KAAK;sBAA5B,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACa,KAAK;sBAAvB,MAAM;gBAiBC,IAAI,MAqCF,YAAY;;SC9GR,qBAAqB,CAAC,IAAwB,EAAE,OAA0B;IACxF,MAAM,GAAG,GAAqB;QAC5B,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;YAChC,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;YACvC,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;SAC1C;QACD,GAAG,OAAO;KACX,CAAC;IACF,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;QACrB,GAAG,CAAC,SAAU,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACrG,GAAG,CAAC,OAAO,GAAG,kBAAkB,CAAC;QACjC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;KAChB;IAED,OAAO,GAAG,CAAC;AACb;;ACtBA;;;;;;"}
1
+ {"version":3,"file":"core.mjs","sources":["../../../../packages/chart/core/g2.servicce.ts","../../../../packages/chart/core/g2.base.component.ts","../../../../packages/chart/core/utils.ts","../../../../packages/chart/core/core.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class G2Service implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n libs: [\n 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.46/dist/g2.min.js',\n 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'\n ]\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.libs!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { G2Service } from './g2.servicce';\n\n@Directive()\nexport abstract class G2BaseComponent implements OnInit, OnChanges, OnDestroy {\n get chart(): Chart {\n return this._chart;\n }\n\n get winG2(): NzSafeAny {\n return (window as NzSafeAny).G2;\n }\n\n constructor(\n protected srv: G2Service,\n protected el: ElementRef<HTMLElement>,\n protected ngZone: NgZone,\n protected platform: Platform,\n protected cdr: ChangeDetectorRef\n ) {\n this.theme = srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n static ngAcceptInputType_repaint: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n @Input() @InputBoolean() repaint = true;\n\n @ViewChild('container', { static: true }) protected node!: ElementRef;\n protected resize$?: Subscription;\n protected destroy$ = new Subject<void>();\n protected _chart!: Chart;\n loaded = false;\n\n @Input() @InputNumber() delay = 0;\n @Input() theme: string | Types.LooseObject;\n @Output() readonly ready = new EventEmitter<Chart>();\n\n /** 检查是否只变更数据 */\n onlyChangeData?: (changes: SimpleChanges) => boolean;\n\n abstract install(): void;\n\n /** G2数据变更 */\n changeData(): void {}\n\n /** 等同 `ngOnInit` */\n onInit(): void {}\n\n /** 等同 `ngOnChanges` */\n onChanges(_: SimpleChanges): void {}\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n setTimeout(() => this.install(), this.delay);\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.onInit();\n if (this.winG2) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.onChanges(changes);\n\n const isOnlyChangeData = this.onlyChangeData\n ? this.onlyChangeData(changes)\n : Object.keys(changes).length === 1 && !!changes.data;\n if (isOnlyChangeData) {\n this.changeData();\n return;\n }\n if (!this.chart || !this.repaint) return;\n this.ngZone.runOutsideAngular(() => {\n this.destroyChart().install();\n });\n }\n\n @ZoneOutside()\n protected destroyChart(): this {\n if (this._chart) {\n this._chart.destroy();\n }\n return this;\n }\n\n ngOnDestroy(): void {\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n this.destroy$.next();\n this.destroy$.complete();\n this.destroyChart();\n }\n}\n","import type { Types } from '@antv/g2';\n\nexport function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg {\n const res: Types.TooltipCfg = {\n showTitle: false,\n showMarkers: true,\n enterable: true,\n domStyles: {\n 'g2-tooltip': { padding: '0px' },\n 'g2-tooltip-title': { display: 'none' },\n 'g2-tooltip-list-item': { margin: '4px' }\n },\n ...options\n };\n if (type === 'mini') {\n res.position = 'top';\n res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' };\n res.itemTpl = `<li>{value}</li>`;\n res.offset = 8;\n }\n\n return res;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,SAAS;IAuBpB,YAAoB,MAA0B,EAAU,OAAoB;QAAxD,WAAM,GAAN,MAAM,CAAoB;QAAU,YAAO,GAAP,OAAO,CAAa;QArBpE,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAG,IAAI,OAAO,EAAQ,CAAC;QAoBpC,IAAI,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KAC1B;IAnBD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;IACD,IAAI,GAAG,CAAC,GAAqB;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;YACE,KAAK,EAAE,EAAE;YACT,IAAI,EAAE;gBACJ,mEAAmE;gBACnE,2EAA2E;aAC5E;SACkB,EACrB,GAAG,CACH,CAAC;KACJ;IAMD,OAAO;QACL,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aACrB;YACD,OAAO,IAAI,CAAC;SACb;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAK,CAAC,CAAC,IAAI,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,OA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IAED,OAAO,GAAG,CAAC;AACb;;ACtBA;;;;;;"}
@@ -32,8 +32,8 @@ class G2CustomComponent extends G2BaseComponent {
32
32
  .subscribe(() => this.resize.emit(this.el));
33
33
  }
34
34
  }
35
- G2CustomComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
36
- G2CustomComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2CustomComponent, selector: "g2,g2-custom", inputs: { height: "height", resizeTime: "resizeTime" }, outputs: { render: "render", resize: "resize", destroy: "destroy" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Custom"], usesInheritance: true, ngImport: i0, template: `
35
+ G2CustomComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
36
+ G2CustomComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2CustomComponent, selector: "g2,g2-custom", inputs: { height: "height", resizeTime: "resizeTime" }, outputs: { render: "render", resize: "resize", destroy: "destroy" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Custom"], usesInheritance: true, ngImport: i0, template: `
37
37
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
38
38
  <ng-content></ng-content>
39
39
  `, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -43,7 +43,7 @@ __decorate([
43
43
  __decorate([
44
44
  InputNumber()
45
45
  ], G2CustomComponent.prototype, "resizeTime", void 0);
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomComponent, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomComponent, decorators: [{
47
47
  type: Component,
48
48
  args: [{
49
49
  selector: 'g2,g2-custom',
@@ -74,10 +74,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
74
74
  const COMPONENTS = [G2CustomComponent];
75
75
  class G2CustomModule {
76
76
  }
77
- G2CustomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
78
- G2CustomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomModule, declarations: [G2CustomComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2CustomComponent] });
79
- G2CustomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomModule, imports: [[CommonModule, NzSkeletonModule]] });
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2CustomModule, decorators: [{
77
+ G2CustomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
78
+ G2CustomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomModule, declarations: [G2CustomComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2CustomComponent] });
79
+ G2CustomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomModule, imports: [[CommonModule, NzSkeletonModule]] });
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2CustomModule, decorators: [{
81
81
  type: NgModule,
82
82
  args: [{
83
83
  imports: [CommonModule, NzSkeletonModule],
@@ -17,7 +17,7 @@ class G2GaugeComponent extends G2BaseComponent {
17
17
  // #endregion
18
18
  install() {
19
19
  // 自定义Shape 部分
20
- window.G2.registerShape('point', 'pointer', {
20
+ this.winG2.registerShape('point', 'pointer', {
21
21
  draw(cfg, container) {
22
22
  const group = container.addGroup({});
23
23
  // 获取极坐标系下画布中心点
@@ -48,7 +48,7 @@ class G2GaugeComponent extends G2BaseComponent {
48
48
  }
49
49
  });
50
50
  const { el, height, padding, format, theme } = this;
51
- const chart = (this._chart = new window.G2.Chart({
51
+ const chart = (this._chart = new this.winG2.Chart({
52
52
  container: el.nativeElement,
53
53
  autoFit: true,
54
54
  height,
@@ -134,15 +134,15 @@ class G2GaugeComponent extends G2BaseComponent {
134
134
  _chart.changeData(data);
135
135
  }
136
136
  }
137
- G2GaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
138
- G2GaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2GaugeComponent, selector: "g2-gauge", inputs: { title: "title", height: "height", color: "color", bgColor: "bgColor", format: "format", percent: "percent", padding: "padding" }, host: { properties: { "class.g2-gauge": "true" } }, exportAs: ["g2Gauge"], usesInheritance: true, ngImport: i0, template: `<nz-skeleton *ngIf="!loaded"></nz-skeleton>`, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
137
+ G2GaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
138
+ G2GaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2GaugeComponent, selector: "g2-gauge", inputs: { title: "title", height: "height", color: "color", bgColor: "bgColor", format: "format", percent: "percent", padding: "padding" }, host: { properties: { "class.g2-gauge": "true" } }, exportAs: ["g2Gauge"], usesInheritance: true, ngImport: i0, template: `<nz-skeleton *ngIf="!loaded"></nz-skeleton>`, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
139
139
  __decorate([
140
140
  InputNumber()
141
141
  ], G2GaugeComponent.prototype, "height", void 0);
142
142
  __decorate([
143
143
  InputNumber()
144
144
  ], G2GaugeComponent.prototype, "percent", void 0);
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeComponent, decorators: [{
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeComponent, decorators: [{
146
146
  type: Component,
147
147
  args: [{
148
148
  selector: 'g2-gauge',
@@ -174,10 +174,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
174
174
  const COMPONENTS = [G2GaugeComponent];
175
175
  class G2GaugeModule {
176
176
  }
177
- G2GaugeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
178
- G2GaugeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeModule, declarations: [G2GaugeComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2GaugeComponent] });
179
- G2GaugeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeModule, imports: [[CommonModule, NzSkeletonModule]] });
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2GaugeModule, decorators: [{
177
+ G2GaugeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
178
+ G2GaugeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeModule, declarations: [G2GaugeComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2GaugeComponent] });
179
+ G2GaugeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeModule, imports: [[CommonModule, NzSkeletonModule]] });
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2GaugeModule, decorators: [{
181
181
  type: NgModule,
182
182
  args: [{
183
183
  imports: [CommonModule, NzSkeletonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"gauge.mjs","sources":["../../../../packages/chart/gauge/gauge.component.ts","../../../../packages/chart/gauge/gauge.module.ts","../../../../packages/chart/gauge/gauge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-gauge',\n exportAs: 'g2Gauge',\n template: `<nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>`,\n host: {\n '[class.g2-gauge]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2GaugeComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n\n // #region fields\n\n @Input() title?: string;\n @Input() @InputNumber() height?: number;\n @Input() color = '#2f9cff';\n @Input() bgColor?: string; // = '#f0f2f5';\n @Input() format?: (text: string, item: NzSafeAny, index: number) => string;\n @Input() @InputNumber() percent?: number;\n @Input() padding: number | number[] | 'auto' = [10, 10, 30, 10];\n\n // #endregion\n\n install(): void {\n // 自定义Shape 部分\n (window as NzSafeAny).G2.registerShape('point', 'pointer', {\n draw(cfg: NzSafeAny, container: NzSafeAny) {\n const group = container.addGroup({});\n // 获取极坐标系下画布中心点\n const center = (this as NzSafeAny).parsePoint({ x: 0, y: 0 });\n // 绘制指针\n group.addShape('line', {\n attrs: {\n x1: center.x,\n y1: center.y,\n x2: cfg.x,\n y2: cfg.y,\n stroke: cfg.color,\n lineWidth: 2.5,\n lineCap: 'round'\n }\n });\n group.addShape('circle', {\n attrs: {\n x: center.x,\n y: center.y,\n r: 5.75,\n stroke: cfg.color,\n lineWidth: 2,\n fill: '#fff'\n }\n });\n return group;\n }\n });\n\n const { el, height, padding, format, theme } = this;\n\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.legend(false);\n chart.animate(false);\n chart.tooltip(false);\n chart.coordinate('polar', {\n startAngle: (-9 / 8) * Math.PI,\n endAngle: (1 / 8) * Math.PI,\n radius: 0.75\n });\n chart.scale('value', {\n min: 0,\n max: 100,\n nice: true,\n tickCount: 6\n });\n chart.axis('1', false);\n chart.axis('value', {\n line: null,\n label: {\n offset: -14,\n formatter: format\n },\n tickLine: null,\n grid: null\n });\n chart.point().position('value*1').shape('pointer');\n\n this.ready.next(chart);\n\n this.changeData();\n\n chart.render();\n }\n\n changeData(): void {\n const { _chart, percent, color, bgColor, title } = this;\n if (!_chart) return;\n\n const data = [{ name: title, value: percent }];\n const val = data[0].value;\n _chart.annotation().clear(true);\n _chart.geometries[0].color(color);\n // 绘制仪表盘背景\n _chart.annotation().arc({\n top: false,\n start: [0, 0.95],\n end: [100, 0.95],\n style: {\n stroke: bgColor,\n lineWidth: 12,\n lineDash: null\n }\n });\n _chart.annotation().arc({\n start: [0, 0.95],\n end: [data[0].value!, 0.95],\n style: {\n stroke: color,\n lineWidth: 12,\n lineDash: null\n }\n });\n\n _chart.annotation().text({\n position: ['50%', '85%'],\n content: title,\n style: {\n fontSize: 12,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.43)' : 'rgba(0, 0, 0, 0.43)',\n textAlign: 'center'\n }\n });\n _chart.annotation().text({\n position: ['50%', '90%'],\n content: `${val} %`,\n style: {\n fontSize: 20,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.85)' : 'rgba(0, 0, 0, 0.85)',\n textAlign: 'center'\n },\n offsetY: 15\n });\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2GaugeComponent } from './gauge.component';\n\nconst COMPONENTS = [G2GaugeComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2GaugeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,gBAAiB,SAAQ,eAAe;IAXr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oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
1
+ {"version":3,"file":"gauge.mjs","sources":["../../../../packages/chart/gauge/gauge.component.ts","../../../../packages/chart/gauge/gauge.module.ts","../../../../packages/chart/gauge/gauge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-gauge',\n exportAs: 'g2Gauge',\n template: `<nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>`,\n host: {\n '[class.g2-gauge]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2GaugeComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n\n // #region fields\n\n @Input() title?: string;\n @Input() @InputNumber() height?: number;\n @Input() color = '#2f9cff';\n @Input() bgColor?: string; // = '#f0f2f5';\n @Input() format?: (text: string, item: NzSafeAny, index: number) => string;\n @Input() @InputNumber() percent?: number;\n @Input() padding: number | number[] | 'auto' = [10, 10, 30, 10];\n\n // #endregion\n\n install(): void {\n // 自定义Shape 部分\n this.winG2.registerShape('point', 'pointer', {\n draw(cfg: NzSafeAny, container: NzSafeAny) {\n const group = container.addGroup({});\n // 获取极坐标系下画布中心点\n const center = (this as NzSafeAny).parsePoint({ x: 0, y: 0 });\n // 绘制指针\n group.addShape('line', {\n attrs: {\n x1: center.x,\n y1: center.y,\n x2: cfg.x,\n y2: cfg.y,\n stroke: cfg.color,\n lineWidth: 2.5,\n lineCap: 'round'\n }\n });\n group.addShape('circle', {\n attrs: {\n x: center.x,\n y: center.y,\n r: 5.75,\n stroke: cfg.color,\n lineWidth: 2,\n fill: '#fff'\n }\n });\n return group;\n }\n });\n\n const { el, height, padding, format, theme } = this;\n\n const chart: Chart = (this._chart = new this.winG2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.legend(false);\n chart.animate(false);\n chart.tooltip(false);\n chart.coordinate('polar', {\n startAngle: (-9 / 8) * Math.PI,\n endAngle: (1 / 8) * Math.PI,\n radius: 0.75\n });\n chart.scale('value', {\n min: 0,\n max: 100,\n nice: true,\n tickCount: 6\n });\n chart.axis('1', false);\n chart.axis('value', {\n line: null,\n label: {\n offset: -14,\n formatter: format\n },\n tickLine: null,\n grid: null\n });\n chart.point().position('value*1').shape('pointer');\n\n this.ready.next(chart);\n\n this.changeData();\n\n chart.render();\n }\n\n changeData(): void {\n const { _chart, percent, color, bgColor, title } = this;\n if (!_chart) return;\n\n const data = [{ name: title, value: percent }];\n const val = data[0].value;\n _chart.annotation().clear(true);\n _chart.geometries[0].color(color);\n // 绘制仪表盘背景\n _chart.annotation().arc({\n top: false,\n start: [0, 0.95],\n end: [100, 0.95],\n style: {\n stroke: bgColor,\n lineWidth: 12,\n lineDash: null\n }\n });\n _chart.annotation().arc({\n start: [0, 0.95],\n end: [data[0].value!, 0.95],\n style: {\n stroke: color,\n lineWidth: 12,\n lineDash: null\n }\n });\n\n _chart.annotation().text({\n position: ['50%', '85%'],\n content: title,\n style: {\n fontSize: 12,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.43)' : 'rgba(0, 0, 0, 0.43)',\n textAlign: 'center'\n }\n });\n _chart.annotation().text({\n position: ['50%', '90%'],\n content: `${val} %`,\n style: {\n fontSize: 20,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.85)' : 'rgba(0, 0, 0, 0.85)',\n textAlign: 'center'\n },\n offsetY: 15\n });\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2GaugeComponent } from './gauge.component';\n\nconst COMPONENTS = [G2GaugeComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2GaugeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,gBAAiB,SAAQ,eAAe;IAXrD;;QAmBW,UAAK,GAAG,SAAS,CAAC;QAIlB,YAAO,GAA+B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;KAkIjE;;IA9HC,OAAO;;QAEL,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE;YAC3C,IAAI,CAAC,GAAc,EAAE,SAAoB;gBACvC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;;gBAErC,MAAM,MAAM,GAAI,IAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;gBAE9D,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACrB,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,MAAM,EAAE,GAAG,CAAC,KAAK;wBACjB,SAAS,EAAE,GAAG;wBACd,OAAO,EAAE,OAAO;qBACjB;iBACF,CAAC,CAAC;gBACH,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE;oBACvB,KAAK,EAAE;wBACL,CAAC,EAAE,MAAM,CAAC,CAAC;wBACX,CAAC,EAAE,MAAM,CAAC,CAAC;wBACX,CAAC,EAAE,IAAI;w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AAM;sBAAd,KAAK;gBACkB,OAAO;sBAA9B,KAAK;gBACG,OAAO;sBAAf,KAAK;;;ACxBR,MAAM,UAAU,GAAG,CAAC,gBAAgB,CAAC,CAAC;MAOzB,aAAa;;0GAAb,aAAa;2GAAb,aAAa,iBAPN,gBAAgB,aAGxB,YAAY,EAAE,gBAAgB,aAHtB,gBAAgB;2GAOvB,aAAa,YAJf,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,aAAa;kBALzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
@@ -25,7 +25,7 @@ class G2MiniAreaComponent extends G2BaseComponent {
25
25
  // #endregion
26
26
  install() {
27
27
  const { el, fit, height, padding, xAxis, yAxis, yTooltipSuffix, tooltipType, line, theme, animate, color, borderColor, borderWidth } = this;
28
- const chart = (this._chart = new window.G2.Chart({
28
+ const chart = (this._chart = new this.winG2.Chart({
29
29
  container: el.nativeElement,
30
30
  autoFit: fit,
31
31
  height,
@@ -74,8 +74,8 @@ class G2MiniAreaComponent extends G2BaseComponent {
74
74
  _chart.changeData(data);
75
75
  }
76
76
  }
77
- G2MiniAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
78
- G2MiniAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: G2MiniAreaComponent, selector: "g2-mini-area", inputs: { color: "color", borderColor: "borderColor", borderWidth: "borderWidth", height: "height", fit: "fit", line: "line", animate: "animate", xAxis: "xAxis", yAxis: "yAxis", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniArea"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
77
+ G2MiniAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
78
+ G2MiniAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: G2MiniAreaComponent, selector: "g2-mini-area", inputs: { color: "color", borderColor: "borderColor", borderWidth: "borderWidth", height: "height", fit: "fit", line: "line", animate: "animate", xAxis: "xAxis", yAxis: "yAxis", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniArea"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
79
79
  __decorate([
80
80
  InputNumber()
81
81
  ], G2MiniAreaComponent.prototype, "borderWidth", void 0);
@@ -91,7 +91,7 @@ __decorate([
91
91
  __decorate([
92
92
  InputBoolean()
93
93
  ], G2MiniAreaComponent.prototype, "animate", void 0);
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaComponent, decorators: [{
95
95
  type: Component,
96
96
  args: [{
97
97
  selector: 'g2-mini-area',
@@ -137,10 +137,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
137
137
  const COMPONENTS = [G2MiniAreaComponent];
138
138
  class G2MiniAreaModule {
139
139
  }
140
- G2MiniAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141
- G2MiniAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaModule, declarations: [G2MiniAreaComponent], imports: [CommonModule], exports: [G2MiniAreaComponent] });
142
- G2MiniAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaModule, imports: [[CommonModule]] });
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: G2MiniAreaModule, decorators: [{
140
+ G2MiniAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141
+ G2MiniAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaModule, declarations: [G2MiniAreaComponent], imports: [CommonModule], exports: [G2MiniAreaComponent] });
142
+ G2MiniAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaModule, imports: [[CommonModule]] });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: G2MiniAreaModule, decorators: [{
144
144
  type: NgModule,
145
145
  args: [{
146
146
  imports: [CommonModule],