@ebuilding/chart 2.0.0

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 (72) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/echart/bar/index.d.ts +1 -0
  4. package/echart/bar/src/default/index.d.ts +34 -0
  5. package/echart/bar/src/index.module.d.ts +7 -0
  6. package/echart/bar/src/public_api.d.ts +2 -0
  7. package/echart/bar2/index.d.ts +1 -0
  8. package/echart/bar2/src/default/index.d.ts +33 -0
  9. package/echart/bar2/src/index.module.d.ts +7 -0
  10. package/echart/bar2/src/public_api.d.ts +2 -0
  11. package/echart/content/index.d.ts +1 -0
  12. package/echart/content/src/default/index.d.ts +26 -0
  13. package/echart/content/src/index.module.d.ts +7 -0
  14. package/echart/content/src/public_api.d.ts +2 -0
  15. package/echart/index.d.ts +8 -0
  16. package/echart/indicator/index.d.ts +1 -0
  17. package/echart/indicator/src/default/index.d.ts +18 -0
  18. package/echart/indicator/src/index.module.d.ts +7 -0
  19. package/echart/indicator/src/public_api.d.ts +2 -0
  20. package/echart/line/index.d.ts +1 -0
  21. package/echart/line/src/default/index.d.ts +33 -0
  22. package/echart/line/src/index.module.d.ts +7 -0
  23. package/echart/line/src/public_api.d.ts +2 -0
  24. package/echart/number/index.d.ts +1 -0
  25. package/echart/number/src/default/index.d.ts +17 -0
  26. package/echart/number/src/index.module.d.ts +7 -0
  27. package/echart/number/src/public_api.d.ts +2 -0
  28. package/echart/pie/index.d.ts +1 -0
  29. package/echart/pie/src/default/index.d.ts +28 -0
  30. package/echart/pie/src/index.module.d.ts +7 -0
  31. package/echart/pie/src/public_api.d.ts +2 -0
  32. package/echart/radar/index.d.ts +1 -0
  33. package/echart/radar/src/default/index.d.ts +29 -0
  34. package/echart/radar/src/index.module.d.ts +7 -0
  35. package/echart/radar/src/public_api.d.ts +2 -0
  36. package/echart/sort/index.d.ts +1 -0
  37. package/echart/sort/src/default/index.d.ts +16 -0
  38. package/echart/sort/src/index.module.d.ts +7 -0
  39. package/echart/sort/src/public_api.d.ts +2 -0
  40. package/fesm2022/chart.echart.mjs +885 -0
  41. package/fesm2022/chart.echart.mjs.map +1 -0
  42. package/fesm2022/chart.report.mjs +145 -0
  43. package/fesm2022/chart.report.mjs.map +1 -0
  44. package/fesm2022/ebuilding-chart.mjs +8 -0
  45. package/fesm2022/ebuilding-chart.mjs.map +1 -0
  46. package/fesm2022/echart.bar.mjs +208 -0
  47. package/fesm2022/echart.bar.mjs.map +1 -0
  48. package/fesm2022/echart.bar2.mjs +179 -0
  49. package/fesm2022/echart.bar2.mjs.map +1 -0
  50. package/fesm2022/echart.content.mjs +100 -0
  51. package/fesm2022/echart.content.mjs.map +1 -0
  52. package/fesm2022/echart.indicator.mjs +70 -0
  53. package/fesm2022/echart.indicator.mjs.map +1 -0
  54. package/fesm2022/echart.line.mjs +165 -0
  55. package/fesm2022/echart.line.mjs.map +1 -0
  56. package/fesm2022/echart.number.mjs +58 -0
  57. package/fesm2022/echart.number.mjs.map +1 -0
  58. package/fesm2022/echart.pie.mjs +133 -0
  59. package/fesm2022/echart.pie.mjs.map +1 -0
  60. package/fesm2022/echart.radar.mjs +119 -0
  61. package/fesm2022/echart.radar.mjs.map +1 -0
  62. package/fesm2022/echart.sort.mjs +51 -0
  63. package/fesm2022/echart.sort.mjs.map +1 -0
  64. package/fesm2022/srv.base.mjs +151 -0
  65. package/fesm2022/srv.base.mjs.map +1 -0
  66. package/index.d.ts +3 -0
  67. package/package.json +68 -0
  68. package/report/index.d.ts +1 -0
  69. package/report/src/default/index.d.ts +21 -0
  70. package/report/src/index.module.d.ts +7 -0
  71. package/report/src/public_api.d.ts +2 -0
  72. package/service/index.d.ts +53 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echart.number.mjs","sources":["../../../../packages/chart/echart/number/src/default/index.ts","../../../../packages/chart/echart/number/src/default/index.html","../../../../packages/chart/echart/number/src/index.module.ts","../../../../packages/chart/echart/number/echart.number.ts"],"sourcesContent":["/**\n * 数字图\n */\nimport { Component, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GramBaseChartService } from '@ebuilding/chart/service';\n\n@Component({\n selector: 'echart-number',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n imports: [\n CommonModule\n ]\n})\nexport class EchartNumberMainComponent extends GramBaseChartService implements OnInit {\n\n text: any = 0;\n\n constructor() {\n super();\n }\n\n ngOnInit(): void {\n }\n\n /**\n * 初始化图表数据\n */\n override loadChartInfo() {\n if (this.config!!) {\n if (this.config.val!! && Array.isArray(this.config.val) && this.config.val.length > 0) {\n let item: any = this.config.val[0];\n if (item!! && item.data!! && Array.isArray(item.data) && item.data.length > 0) {\n this.text = item.data[0];\n }\n }\n }\n }\n}","{{text}}","import { NgModule } from '@angular/core';\nimport { EchartNumberMainComponent } from './default/index';\nconst components: any[] = [EchartNumberMainComponent];\n\n@NgModule({\n imports: [...components],\n exports: [...components],\n})\nexport class EchartNumberModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAaG,MAAO,yBAA0B,SAAQ,oBAAoB,CAAA;IAEjE,IAAI,GAAQ,CAAC;AAEb,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;IAGT,QAAQ,GAAA;;AAGR;;AAEG;IACM,aAAa,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,MAAQ,EAAE;YACjB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrF,IAAI,IAAI,GAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBAClC,IAAI,IAAM,IAAI,IAAI,CAAC,IAAM,IAAI,KAAK,CAAC,OAAO,CAAC,I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AAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -0,0 +1,133 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as echarts from 'echarts/core';
5
+ import { PieChart } from 'echarts/charts';
6
+ import { TitleComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components';
7
+ import { CanvasRenderer } from 'echarts/renderers';
8
+ import { GramBaseChartService } from '@ebuilding/chart/service';
9
+ import _ from 'lodash';
10
+
11
+ /**
12
+ * 饼图
13
+ */
14
+ echarts.use([PieChart, TitleComponent, TooltipComponent, GridComponent, LegendComponent, CanvasRenderer]);
15
+ class EchartPieMainComponent extends GramBaseChartService {
16
+ constructor() {
17
+ super();
18
+ }
19
+ ngOnInit() { }
20
+ /**
21
+ * 初始化数据
22
+ */
23
+ initChartData() {
24
+ if (this.config && this.config.data && this.config.data.val && Array.isArray(this.config.data.val)) {
25
+ let xData = _.get(this.config, 'data.x.data');
26
+ let yData = _.get(this.config, 'data.val');
27
+ if (xData && Array.isArray(xData)) {
28
+ let newData = [];
29
+ xData.forEach((x, i) => {
30
+ if (yData && Array.isArray(yData)) {
31
+ yData.forEach((y) => {
32
+ if (y.data && Array.isArray(y.data)) {
33
+ let obj = { name: x, value: y.data[i] };
34
+ newData.push(obj);
35
+ }
36
+ });
37
+ }
38
+ });
39
+ this.chartData = newData;
40
+ }
41
+ }
42
+ }
43
+ /**
44
+ * 初始化图表配置
45
+ */
46
+ initChartOption() {
47
+ this.chartOption = {
48
+ color: this.color,
49
+ legend: this.chartLegend,
50
+ tooltip: {
51
+ trigger: 'item',
52
+ },
53
+ animation: false,
54
+ series: [
55
+ {
56
+ type: 'pie',
57
+ data: this.chartData,
58
+ radius: this.config?.izDoughnut == true ? ['50%', '75%'] : '50%',
59
+ avoidLabelOverlap: false,
60
+ itemStyle: {
61
+ borderRadius: 5,
62
+ borderColor: '#fff',
63
+ borderWidth: 2,
64
+ },
65
+ emphasis: {
66
+ label: {
67
+ show: true,
68
+ fontSize: '30',
69
+ fontWeight: 'bold',
70
+ },
71
+ },
72
+ labelLine: {
73
+ show: true,
74
+ },
75
+ },
76
+ ],
77
+ };
78
+ }
79
+ /**
80
+ * 初始化图表数据
81
+ */
82
+ loadChartInfo() {
83
+ if (this.config) {
84
+ this.initChartData();
85
+ this.initChartLegend();
86
+ this.initChartOption();
87
+ setTimeout(() => {
88
+ this.renderChart();
89
+ }, 0);
90
+ }
91
+ }
92
+ /**
93
+ * 渲染图表
94
+ */
95
+ renderChart() {
96
+ if (!this.chartInstance) {
97
+ this.chartInstance = echarts.init(this.chartContainer.nativeElement);
98
+ this.chartInstance.setOption(this.chartOption);
99
+ window.addEventListener('resize', () => {
100
+ this.chartInstance?.resize();
101
+ });
102
+ }
103
+ }
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartPieMainComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EchartPieMainComponent, isStandalone: true, selector: "echart-pie", usesInheritance: true, ngImport: i0, template: "<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
106
+ }
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartPieMainComponent, decorators: [{
108
+ type: Component,
109
+ args: [{ selector: 'echart-pie', imports: [
110
+ CommonModule
111
+ ], template: "<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}\n"] }]
112
+ }], ctorParameters: () => [] });
113
+
114
+ const components = [EchartPieMainComponent];
115
+ class EchartPieModule {
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartPieModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
117
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: EchartPieModule, imports: [EchartPieMainComponent], exports: [EchartPieMainComponent] });
118
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartPieModule, imports: [components] });
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartPieModule, decorators: [{
121
+ type: NgModule,
122
+ args: [{
123
+ imports: [...components],
124
+ exports: [...components],
125
+ }]
126
+ }] });
127
+
128
+ /**
129
+ * Generated bundle index. Do not edit.
130
+ */
131
+
132
+ export { EchartPieMainComponent, EchartPieModule };
133
+ //# sourceMappingURL=echart.pie.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echart.pie.mjs","sources":["../../../../packages/chart/echart/pie/src/default/index.ts","../../../../packages/chart/echart/pie/src/default/index.html","../../../../packages/chart/echart/pie/src/index.module.ts","../../../../packages/chart/echart/pie/echart.pie.ts"],"sourcesContent":["/**\n * 饼图\n */\nimport { Component, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as echarts from 'echarts/core';\nimport { PieChart } from 'echarts/charts';\nimport { TitleComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { GramBaseChartService } from '@ebuilding/chart/service';\nimport _ from 'lodash';\necharts.use([PieChart, TitleComponent, TooltipComponent, GridComponent, LegendComponent, CanvasRenderer]);\n\n@Component({\n selector: 'echart-pie',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n imports: [\n CommonModule\n ]\n})\nexport class EchartPieMainComponent extends GramBaseChartService implements OnInit {\n constructor() {\n super();\n }\n\n ngOnInit(): void { }\n\n /**\n * 初始化数据\n */\n initChartData() {\n if (this.config!! && this.config.data!! && this.config.data.val!! && Array.isArray(this.config.data.val)) {\n let xData: any[] = _.get(this.config, 'data.x.data');\n let yData: any[] = _.get(this.config, 'data.val');\n if (xData!! && Array.isArray(xData)) {\n let newData: any[] = [];\n xData.forEach((x: any, i: number) => {\n if (yData!! && Array.isArray(yData)) {\n yData.forEach((y: any) => {\n if (y.data!! && Array.isArray(y.data)) {\n let obj: any = { name: x, value: y.data[i] };\n newData.push(obj);\n }\n });\n }\n });\n this.chartData = newData;\n }\n }\n }\n\n /**\n * 初始化图表配置\n */\n initChartOption() {\n this.chartOption = {\n color: this.color,\n legend: this.chartLegend,\n tooltip: {\n trigger: 'item',\n },\n animation: false,\n series: [\n {\n type: 'pie',\n data: this.chartData,\n radius: this.config?.izDoughnut == true ? ['50%', '75%'] : '50%',\n avoidLabelOverlap: false,\n itemStyle: {\n borderRadius: 5,\n borderColor: '#fff',\n borderWidth: 2,\n },\n emphasis: {\n label: {\n show: true,\n fontSize: '30',\n fontWeight: 'bold',\n },\n },\n labelLine: {\n show: true,\n },\n },\n ],\n };\n }\n\n /**\n * 初始化图表数据\n */\n override loadChartInfo() {\n if (this.config!!) {\n this.initChartData();\n this.initChartLegend();\n this.initChartOption();\n setTimeout(() => {\n this.renderChart();\n }, 0);\n }\n }\n\n /**\n * 渲染图表\n */\n renderChart() {\n if (!this.chartInstance) {\n this.chartInstance = echarts.init(this.chartContainer.nativeElement);\n this.chartInstance.setOption(this.chartOption);\n window.addEventListener('resize', () => {\n this.chartInstance?.resize();\n });\n }\n }\n}\n","<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>","import { NgModule } from '@angular/core';\nimport { EchartPieMainComponent } from './default/index';\nconst components: any[] = [EchartPieMainComponent];\n\n@NgModule({\n imports: [...components],\n exports: [...components],\n})\nexport class EchartPieModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;AAEG;AASH,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AAUnG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAC9D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAGT,IAAA,QAAQ;AAER;;AAEG;IACH,aAAa,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,MAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,IAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AACxG,YAAA,IAAI,KAAK,GAAU,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC;AACpD,YAAA,IAAI,KAAK,GAAU,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC;YACjD,IAAI,KAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACnC,IAAI,OAAO,GAAU,EAAE;gBACvB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,CAAS,KAAI;oBAClC,IAAI,KAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACnC,wBAAA,KAAK,CAAC,OAAO,CAAC,CAAC,CAAM,KAAI;AACvB,4BAAA,IAAI,CAAC,CAAC,IAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;AACrC,gCAAA,IAAI,GAAG,GAAQ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AAf,eAAe,EAAA,OAAA,EAAA,CAND,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAAtB,sBAAsB,CAAA,EAAA,CAAA;AAMpC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHb,UAAU,CAAA,EAAA,CAAA;;4FAGZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -0,0 +1,119 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as echarts from 'echarts/core';
5
+ import { RadarChart } from 'echarts/charts';
6
+ import { TitleComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components';
7
+ import { CanvasRenderer } from 'echarts/renderers';
8
+ import { GramBaseChartService } from '@ebuilding/chart/service';
9
+ import _ from 'lodash';
10
+
11
+ /**
12
+ * 雷达图
13
+ */
14
+ echarts.use([RadarChart, TitleComponent, TooltipComponent, GridComponent, LegendComponent, CanvasRenderer]);
15
+ class EchartRadarMainComponent extends GramBaseChartService {
16
+ indicatorData = [];
17
+ constructor() {
18
+ super();
19
+ }
20
+ ngOnInit() { }
21
+ /**
22
+ * 初始化数据
23
+ */
24
+ initChartData() {
25
+ if (this.config && this.config.data && this.config.data.val && Array.isArray(this.config.data.val)) {
26
+ let xData = _.get(this.config, 'data.x.data');
27
+ if (xData && Array.isArray(xData)) {
28
+ this.indicatorData = xData.map((item) => {
29
+ return {
30
+ name: item,
31
+ };
32
+ });
33
+ }
34
+ this.chartData = [
35
+ {
36
+ type: 'radar',
37
+ data: this.config.data.val.map((item, index) => {
38
+ return {
39
+ value: item.data,
40
+ name: item.text,
41
+ };
42
+ }),
43
+ },
44
+ ];
45
+ }
46
+ }
47
+ /**
48
+ * 初始化图表配置
49
+ */
50
+ initChartOption() {
51
+ this.chartOption = {
52
+ color: this.color,
53
+ title: {
54
+ text: null,
55
+ },
56
+ legend: this.chartLegend,
57
+ radar: [
58
+ {
59
+ indicator: this.indicatorData,
60
+ },
61
+ ],
62
+ series: this.chartData,
63
+ };
64
+ }
65
+ /**
66
+ * 初始化图表数据
67
+ */
68
+ loadChartInfo() {
69
+ if (this.config) {
70
+ this.initChartData();
71
+ this.initChartLegend();
72
+ this.initChartOption();
73
+ setTimeout(() => {
74
+ this.renderChart();
75
+ }, 0);
76
+ }
77
+ }
78
+ /**
79
+ * 渲染图表
80
+ */
81
+ renderChart() {
82
+ if (!this.chartInstance) {
83
+ this.chartInstance = echarts.init(this.chartContainer.nativeElement);
84
+ this.chartInstance.setOption(this.chartOption);
85
+ window.addEventListener('resize', () => {
86
+ this.chartInstance?.resize();
87
+ });
88
+ }
89
+ }
90
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarMainComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
91
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EchartRadarMainComponent, isStandalone: true, selector: "echart-radar", usesInheritance: true, ngImport: i0, template: "<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarMainComponent, decorators: [{
94
+ type: Component,
95
+ args: [{ selector: 'echart-radar', imports: [
96
+ CommonModule
97
+ ], template: "<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}\n"] }]
98
+ }], ctorParameters: () => [] });
99
+
100
+ const components = [EchartRadarMainComponent];
101
+ class EchartRadarModule {
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
103
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarModule, imports: [EchartRadarMainComponent], exports: [EchartRadarMainComponent] });
104
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarModule, imports: [components] });
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartRadarModule, decorators: [{
107
+ type: NgModule,
108
+ args: [{
109
+ imports: [...components],
110
+ exports: [...components],
111
+ }]
112
+ }] });
113
+
114
+ /**
115
+ * Generated bundle index. Do not edit.
116
+ */
117
+
118
+ export { EchartRadarMainComponent, EchartRadarModule };
119
+ //# sourceMappingURL=echart.radar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echart.radar.mjs","sources":["../../../../packages/chart/echart/radar/src/default/index.ts","../../../../packages/chart/echart/radar/src/default/index.html","../../../../packages/chart/echart/radar/src/index.module.ts","../../../../packages/chart/echart/radar/echart.radar.ts"],"sourcesContent":["/**\n * 雷达图\n */\nimport { Component, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as echarts from 'echarts/core';\nimport { RadarChart } from 'echarts/charts';\nimport { TitleComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { GramBaseChartService } from '@ebuilding/chart/service';\nimport _ from 'lodash';\necharts.use([RadarChart, TitleComponent, TooltipComponent, GridComponent, LegendComponent, CanvasRenderer]);\n\n@Component({\n selector: 'echart-radar',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n imports: [\n CommonModule\n ]\n})\nexport class EchartRadarMainComponent extends GramBaseChartService implements OnInit {\n indicatorData: any[] = [];\n\n constructor() {\n super();\n }\n\n ngOnInit(): void { }\n\n /**\n * 初始化数据\n */\n initChartData() {\n if (this.config!! && this.config.data!! && this.config.data.val!! && Array.isArray(this.config.data.val)) {\n let xData: any[] = _.get(this.config, 'data.x.data');\n if (xData!! && Array.isArray(xData)) {\n this.indicatorData = xData.map((item: any) => {\n return {\n name: item,\n };\n });\n }\n this.chartData = [\n {\n type: 'radar',\n data: this.config.data.val.map((item: any, index: number) => {\n return {\n value: item.data,\n name: item.text,\n };\n }),\n },\n ];\n }\n }\n\n /**\n * 初始化图表配置\n */\n initChartOption() {\n this.chartOption = {\n color: this.color,\n title: {\n text: null,\n },\n legend: this.chartLegend,\n radar: [\n {\n indicator: this.indicatorData,\n },\n ],\n series: this.chartData,\n };\n }\n\n /**\n * 初始化图表数据\n */\n override loadChartInfo() {\n if (this.config!!) {\n this.initChartData();\n this.initChartLegend();\n this.initChartOption();\n setTimeout(() => {\n this.renderChart();\n }, 0);\n }\n }\n\n /**\n * 渲染图表\n */\n renderChart() {\n if (!this.chartInstance) {\n this.chartInstance = echarts.init(this.chartContainer.nativeElement);\n this.chartInstance.setOption(this.chartOption);\n window.addEventListener('resize', () => {\n this.chartInstance?.resize();\n });\n }\n }\n}\n","<div #chartContainer id=\"chartContainer\" style=\"width: 100%; height: 100%;\"></div>","import { NgModule } from '@angular/core';\nimport { EchartRadarMainComponent } from './default/index';\nconst components: any[] = [EchartRadarMainComponent];\n\n@NgModule({\n imports: [...components],\n\n exports: [...components],\n})\nexport class EchartRadarModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;AAEG;AASH,OAAO,CA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C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAGf,OAAA,EAAA;wBACP;AACD,qBAAA,EAAA,QAAA,EAAA,wFAAA,EAAA,MAAA,EAAA,CAAA,qFAAA,CAAA,EAAA;;;AEjBH,MAAM,UAAU,GAAU,CAAC,wBAAwB,CAAC;MAOvC,iBAAiB,CAAA;wGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAjB,iBAAiB,EAAA,OAAA,EAAA,CAPH,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAAxB,wBAAwB,CAAA,EAAA,CAAA;AAOtC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJf,UAAU,CAAA,EAAA,CAAA;;4FAIZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAExB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -0,0 +1,51 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { GramBaseChartService } from '@ebuilding/chart/service';
5
+
6
+ /**
7
+ * 排序图
8
+ */
9
+ class EchartSortMainComponent extends GramBaseChartService {
10
+ constructor() {
11
+ super();
12
+ }
13
+ ngOnInit() {
14
+ }
15
+ /**
16
+ * 初始化图表数据
17
+ */
18
+ loadChartInfo() {
19
+ if (this.config) {
20
+ }
21
+ }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartSortMainComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EchartSortMainComponent, isStandalone: true, selector: "echart-sort", usesInheritance: true, ngImport: i0, template: "", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;color:#323232;font-size:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
24
+ }
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartSortMainComponent, decorators: [{
26
+ type: Component,
27
+ args: [{ selector: 'echart-sort', imports: [
28
+ CommonModule
29
+ ], template: "", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;color:#323232;font-size:120px}\n"] }]
30
+ }], ctorParameters: () => [] });
31
+
32
+ const components = [EchartSortMainComponent];
33
+ class EchartSortModule {
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartSortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
35
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: EchartSortModule, imports: [EchartSortMainComponent], exports: [EchartSortMainComponent] });
36
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartSortModule, imports: [components] });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EchartSortModule, decorators: [{
39
+ type: NgModule,
40
+ args: [{
41
+ imports: [...components],
42
+ exports: [...components],
43
+ }]
44
+ }] });
45
+
46
+ /**
47
+ * Generated bundle index. Do not edit.
48
+ */
49
+
50
+ export { EchartSortMainComponent, EchartSortModule };
51
+ //# sourceMappingURL=echart.sort.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echart.sort.mjs","sources":["../../../../packages/chart/echart/sort/src/default/index.ts","../../../../packages/chart/echart/sort/src/default/index.html","../../../../packages/chart/echart/sort/src/index.module.ts","../../../../packages/chart/echart/sort/echart.sort.ts"],"sourcesContent":["/**\n * 排序图\n */\nimport { Component, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GramBaseChartService } from '@ebuilding/chart/service';\n\n@Component({\n selector: 'echart-sort',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n imports: [\n CommonModule\n ]\n})\nexport class EchartSortMainComponent extends GramBaseChartService implements OnInit {\n\n\n constructor() {\n super();\n }\n\n ngOnInit(): void {\n }\n\n /**\n * 初始化图表数据\n */\n override loadChartInfo() {\n if (this.config!!) {\n\n }\n }\n}","","import { NgModule } from '@angular/core';\nimport { EchartSortMainComponent } from './default/index';\nconst components: any[] = [EchartSortMainComponent];\n\n@NgModule({\n imports: [...components],\n exports: [...components],\n})\nexport class EchartSortModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAaG,MAAO,uBAAwB,SAAQ,oBAAoB,CAAA;AAG/D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;IAGT,QAAQ,GAAA;;AAGR;;AAEG;IACM,aAAa,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,MAAQ,EAAE;;;wGAdV,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfpC,EAAA,EAAA,MAAA,EAAA,CAAA,6JAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDYI,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAGH,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAGd,OAAA,EAAA;wBACP;AACD,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,MAAA,EAAA,CAAA,6JAAA,CAAA,EAAA;;;AEXH,MAAM,UAAU,GAAU,CAAC,uBAAuB,CAAC;MAMtC,gBAAgB,CAAA;wGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAhB,gBAAgB,EAAA,OAAA,EAAA,CANF,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAvB,uBAAuB,CAAA,EAAA,CAAA;AAMrC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHd,UAAU,CAAA,EAAA,CAAA;;4FAGZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -0,0 +1,151 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ViewChild, Input, Directive } from '@angular/core';
3
+
4
+ class GramBaseChartService {
5
+ /**
6
+ * 图表数据
7
+ */
8
+ chartData = [];
9
+ /**
10
+ * 图表配置
11
+ */
12
+ chartOption = null;
13
+ /**
14
+ * 图表缩略图
15
+ */
16
+ chartLegend = {};
17
+ /**
18
+ * 图表标题
19
+ */
20
+ chartTitle = null;
21
+ /**
22
+ * 图表实例
23
+ */
24
+ chartInstance;
25
+ /**
26
+ * 基础颜色集合
27
+ */
28
+ color = [
29
+ '#71D1FF',
30
+ '#71A9FF',
31
+ '#8C94FC',
32
+ '#DDB0F0',
33
+ '#FFCA5E',
34
+ '#FFB15E',
35
+ '#71D1FF',
36
+ '#71A9FF',
37
+ '#8C94FC',
38
+ '#DDB0F0',
39
+ '#FFCA5E',
40
+ '#FFB15E',
41
+ ];
42
+ config = null;
43
+ /**
44
+ * 图表容器
45
+ */
46
+ chartContainer;
47
+ /**
48
+ * 销毁函数
49
+ */
50
+ ngOnDestroy() {
51
+ this.disposeChart();
52
+ }
53
+ /**
54
+ * 销毁图表
55
+ */
56
+ disposeChart() {
57
+ if (this.chartInstance) {
58
+ this.chartInstance.dispose();
59
+ this.chartInstance = null; // 将图表实例设置为 null
60
+ }
61
+ }
62
+ /**
63
+ * 初始化图例
64
+ * @returns
65
+ */
66
+ initChartLegend() {
67
+ this.chartLegend = { show: false };
68
+ if (this.config && this.config.legend) {
69
+ if (this.config.legend?.show == true) {
70
+ this.chartLegend.show = true;
71
+ }
72
+ let legend = {};
73
+ if (this.config.legend?.location) {
74
+ switch (this.config.legend.location) {
75
+ case 'TOP_LEFT':
76
+ legend = {
77
+ top: 'top',
78
+ left: 'left',
79
+ };
80
+ break;
81
+ case 'TOP_RIGHT':
82
+ legend = {
83
+ top: 'top',
84
+ left: 'right',
85
+ };
86
+ break;
87
+ case 'TOP_CENTER':
88
+ legend = {
89
+ top: 'top',
90
+ left: 'center',
91
+ };
92
+ break;
93
+ case 'BOTTOM_LEFT':
94
+ legend = {
95
+ bottom: 'bottom',
96
+ left: 'left',
97
+ };
98
+ break;
99
+ case 'BOTTOM_RIGHT':
100
+ legend = {
101
+ bottom: 'bottom',
102
+ left: 'right',
103
+ };
104
+ break;
105
+ case 'BOTTOM_CENTER':
106
+ legend = {
107
+ bottom: 'bottom',
108
+ left: 'center',
109
+ };
110
+ break;
111
+ default:
112
+ legend = {
113
+ top: 'top',
114
+ left: 'center',
115
+ };
116
+ break;
117
+ }
118
+ }
119
+ this.chartLegend = Object.assign(this.chartLegend, legend);
120
+ }
121
+ }
122
+ initChartTitle() {
123
+ if (this.config?.title) {
124
+ this.chartTitle = this.config?.title;
125
+ }
126
+ else {
127
+ this.chartTitle = null;
128
+ }
129
+ }
130
+ /**
131
+ * 加载数据
132
+ */
133
+ loadChartInfo() { }
134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBaseChartService, deps: [], target: i0.ɵɵFactoryTarget.Directive });
135
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: GramBaseChartService, isStandalone: true, inputs: { config: "config" }, viewQueries: [{ propertyName: "chartContainer", first: true, predicate: ["chartContainer"], descendants: true }], ngImport: i0 });
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBaseChartService, decorators: [{
138
+ type: Directive
139
+ }], propDecorators: { config: [{
140
+ type: Input
141
+ }], chartContainer: [{
142
+ type: ViewChild,
143
+ args: ['chartContainer', { static: false }]
144
+ }] } });
145
+
146
+ /**
147
+ * Generated bundle index. Do not edit.
148
+ */
149
+
150
+ export { GramBaseChartService };
151
+ //# sourceMappingURL=srv.base.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"srv.base.mjs","sources":["../../../../packages/chart/service/index.ts","../../../../packages/chart/service/srv.base.ts"],"sourcesContent":["import { Directive, Input, ElementRef, ViewChild, OnDestroy } from '@angular/core';\n\n@Directive()\nexport abstract class GramBaseChartService implements OnDestroy {\n /**\n * 图表数据\n */\n chartData: any[] = [];\n\n /**\n * 图表配置\n */\n chartOption: any = null;\n\n /**\n * 图表缩略图\n */\n chartLegend: any = {};\n\n /**\n * 图表标题\n */\n chartTitle: any = null;\n\n /**\n * 图表实例\n */\n chartInstance: any;\n\n /**\n * 基础颜色集合\n */\n color = [\n '#71D1FF',\n '#71A9FF',\n '#8C94FC',\n '#DDB0F0',\n '#FFCA5E',\n '#FFB15E',\n '#71D1FF',\n '#71A9FF',\n '#8C94FC',\n '#DDB0F0',\n '#FFCA5E',\n '#FFB15E',\n ];\n\n @Input() config: any = null;\n\n /**\n * 图表容器\n */\n @ViewChild('chartContainer', { static: false }) chartContainer: ElementRef;\n\n /**\n * 销毁函数\n */\n ngOnDestroy() {\n this.disposeChart();\n }\n\n /**\n * 销毁图表\n */\n disposeChart(): void {\n if (this.chartInstance) {\n this.chartInstance.dispose();\n this.chartInstance = null; // 将图表实例设置为 null\n }\n }\n\n /**\n * 初始化图例\n * @returns\n */\n initChartLegend() {\n this.chartLegend = { show: false };\n if (this.config!! && this.config.legend!!) {\n if (this.config.legend?.show == true) {\n this.chartLegend.show = true;\n }\n let legend: any = {};\n if (this.config.legend?.location!!) {\n switch (this.config.legend.location) {\n case 'TOP_LEFT':\n legend = {\n top: 'top',\n left: 'left',\n };\n break;\n case 'TOP_RIGHT':\n legend = {\n top: 'top',\n left: 'right',\n };\n break;\n case 'TOP_CENTER':\n legend = {\n top: 'top',\n left: 'center',\n };\n break;\n case 'BOTTOM_LEFT':\n legend = {\n bottom: 'bottom',\n left: 'left',\n };\n break;\n case 'BOTTOM_RIGHT':\n legend = {\n bottom: 'bottom',\n left: 'right',\n };\n break;\n case 'BOTTOM_CENTER':\n legend = {\n bottom: 'bottom',\n left: 'center',\n };\n break;\n default:\n legend = {\n top: 'top',\n left: 'center',\n };\n break;\n }\n }\n this.chartLegend = Object.assign(this.chartLegend, legend);\n }\n }\n\n initChartTitle() {\n if (this.config?.title) {\n this.chartTitle = this.config?.title;\n } else {\n this.chartTitle = null;\n }\n }\n\n /**\n * 加载数据\n */\n loadChartInfo() { }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGsB,oBAAoB,CAAA;AACxC;;AAEG;IACH,SAAS,GAAU,EAAE;AAErB;;AAEG;I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,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADzC;8BA6CU,MAAM,EAAA,CAAA;sBAAd;gBAK+C,cAAc,EAAA,CAAA;sBAA7D,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,gBAAgB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;;ACpDhD;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from '@ebuilding/chart/service';
2
+ export * from '@ebuilding/chart/echart';
3
+ export * from '@ebuilding/chart/report';
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@ebuilding/chart",
3
+ "version": "2.0.0",
4
+ "dependencies": {
5
+ "extend": "undefined",
6
+ "tslib": "^2.3.0"
7
+ },
8
+ "module": "fesm2022/ebuilding-chart.mjs",
9
+ "typings": "index.d.ts",
10
+ "exports": {
11
+ "./package.json": {
12
+ "default": "./package.json"
13
+ },
14
+ ".": {
15
+ "types": "./index.d.ts",
16
+ "default": "./fesm2022/ebuilding-chart.mjs"
17
+ },
18
+ "./echart": {
19
+ "types": "./echart/index.d.ts",
20
+ "default": "./fesm2022/chart.echart.mjs"
21
+ },
22
+ "./report": {
23
+ "types": "./report/index.d.ts",
24
+ "default": "./fesm2022/chart.report.mjs"
25
+ },
26
+ "./service": {
27
+ "types": "./service/index.d.ts",
28
+ "default": "./fesm2022/srv.base.mjs"
29
+ },
30
+ "./echart/bar": {
31
+ "types": "./echart/bar/index.d.ts",
32
+ "default": "./fesm2022/echart.bar.mjs"
33
+ },
34
+ "./echart/indicator": {
35
+ "types": "./echart/indicator/index.d.ts",
36
+ "default": "./fesm2022/echart.indicator.mjs"
37
+ },
38
+ "./echart/bar2": {
39
+ "types": "./echart/bar2/index.d.ts",
40
+ "default": "./fesm2022/echart.bar2.mjs"
41
+ },
42
+ "./echart/content": {
43
+ "types": "./echart/content/index.d.ts",
44
+ "default": "./fesm2022/echart.content.mjs"
45
+ },
46
+ "./echart/line": {
47
+ "types": "./echart/line/index.d.ts",
48
+ "default": "./fesm2022/echart.line.mjs"
49
+ },
50
+ "./echart/number": {
51
+ "types": "./echart/number/index.d.ts",
52
+ "default": "./fesm2022/echart.number.mjs"
53
+ },
54
+ "./echart/pie": {
55
+ "types": "./echart/pie/index.d.ts",
56
+ "default": "./fesm2022/echart.pie.mjs"
57
+ },
58
+ "./echart/radar": {
59
+ "types": "./echart/radar/index.d.ts",
60
+ "default": "./fesm2022/echart.radar.mjs"
61
+ },
62
+ "./echart/sort": {
63
+ "types": "./echart/sort/index.d.ts",
64
+ "default": "./fesm2022/echart.sort.mjs"
65
+ }
66
+ },
67
+ "sideEffects": false
68
+ }
@@ -0,0 +1 @@
1
+ export * from './src/public_api';
@@ -0,0 +1,21 @@
1
+ import { OnInit, AfterViewInit, OnChanges } from '@angular/core';
2
+ import { _HttpClient } from '@delon/theme';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ReportChartComponent implements OnInit, AfterViewInit, OnChanges {
5
+ private http;
6
+ _config: any;
7
+ loading: boolean;
8
+ chartConfig: any;
9
+ data: any;
10
+ set config(value: any);
11
+ get config(): any;
12
+ constructor(http: _HttpClient);
13
+ ngOnInit(): void;
14
+ ngAfterViewInit(): void;
15
+ ngOnChanges(changes: any): void;
16
+ getPageData(): void;
17
+ getReportConfig(): void;
18
+ getReportDataInfo(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReportChartComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReportChartComponent, "report-chart", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./default/index";
3
+ export declare class ReportChartModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReportChartModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ReportChartModule, never, [typeof i1.ReportChartComponent], [typeof i1.ReportChartComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<ReportChartModule>;
7
+ }
@@ -0,0 +1,2 @@
1
+ export { ReportChartModule } from './index.module';
2
+ export { ReportChartComponent } from './default/index';