barsa-echarts 2.0.37 → 2.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/barsa-echarts.module.mjs +5 -29
- package/esm2022/lib/base/chart-base.directive.mjs +32 -50
- package/esm2022/lib/base/index.mjs +2 -8
- package/esm2022/lib/micro-charts/micro-chart-area/micro-chart-area.component.mjs +16 -10
- package/esm2022/lib/micro-charts/micro-chart-bar/micro-chart-bar.component.mjs +11 -6
- package/esm2022/lib/micro-charts/micro-chart-bullet/micro-chart-bullet.component.mjs +7 -3
- package/esm2022/lib/micro-charts/micro-chart-circular/micro-chart-circular.component.mjs +7 -6
- package/esm2022/lib/micro-charts/micro-chart-comparison/micro-chart-comparison.component.mjs +7 -5
- package/esm2022/lib/micro-charts/micro-chart-line/micro-chart-line.component.mjs +7 -16
- package/esm2022/lib/micro-charts/micro-chart-stackbar/micro-chart-stackbar.component.mjs +7 -5
- package/fesm2022/barsa-echarts.mjs +74 -625
- package/fesm2022/barsa-echarts.mjs.map +1 -1
- package/lib/barsa-echarts.module.d.ts +5 -11
- package/lib/base/chart-base.directive.d.ts +9 -18
- package/lib/base/index.d.ts +1 -7
- package/lib/micro-charts/micro-chart-area/micro-chart-area.component.d.ts +3 -1
- package/lib/micro-charts/micro-chart-bar/micro-chart-bar.component.d.ts +5 -3
- package/lib/micro-charts/micro-chart-bullet/micro-chart-bullet.component.d.ts +3 -1
- package/lib/micro-charts/micro-chart-circular/micro-chart-circular.component.d.ts +3 -2
- package/lib/micro-charts/micro-chart-comparison/micro-chart-comparison.component.d.ts +3 -3
- package/lib/micro-charts/micro-chart-line/micro-chart-line.component.d.ts +3 -5
- package/lib/micro-charts/micro-chart-stackbar/micro-chart-stackbar.component.d.ts +3 -3
- package/package.json +1 -1
- package/esm2022/lib/base/chart-line-time-base.directive.mjs +0 -80
- package/esm2022/lib/base/micro-chart-area-base.directive.mjs +0 -89
- package/esm2022/lib/base/micro-chart-bar-base.directive.mjs +0 -48
- package/esm2022/lib/base/micro-chart-base.directive.mjs +0 -49
- package/esm2022/lib/base/micro-chart-circular-base.directive.mjs +0 -75
- package/esm2022/lib/base/micro-chart-comparison-base.directive.mjs +0 -99
- package/esm2022/lib/base/micro-chart-line-base.directive.mjs +0 -60
- package/esm2022/lib/base/micro-chart-stackbar-base.directive.mjs +0 -51
- package/lib/base/chart-line-time-base.directive.d.ts +0 -19
- package/lib/base/micro-chart-area-base.directive.d.ts +0 -18
- package/lib/base/micro-chart-bar-base.directive.d.ts +0 -14
- package/lib/base/micro-chart-base.directive.d.ts +0 -14
- package/lib/base/micro-chart-circular-base.directive.d.ts +0 -13
- package/lib/base/micro-chart-comparison-base.directive.d.ts +0 -17
- package/lib/base/micro-chart-line-base.directive.d.ts +0 -15
- package/lib/base/micro-chart-stackbar-base.directive.d.ts +0 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, ViewChild, Directive, NgModule, NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i1 from 'barsa-novin-ray-core';
|
|
4
|
-
import { BaseComponent, BaseDirective, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
|
|
4
|
+
import { BaseComponent, BaseDirective, BarsaApi, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
|
|
5
5
|
import * as i1$1 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
|
|
@@ -64,12 +64,16 @@ class MicroChartBulletComponent extends BaseComponent {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBulletComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: MicroChartBulletComponent, selector: "be-micro-chart-bullet", inputs: { range: "range", value: "value", forecast: "forecast", target: "target", suffix: "suffix", separatorLines: "separatorLines", isDelta: "isDelta" }, viewQueries: [{ propertyName: "deltaDom", first: true, predicate: ["deltaBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chart-container\">\r\n <div class=\"range\">\r\n @if (target) {\r\n <div class=\"target\" #target [style.left]=\"targetWidth\">\r\n <span>{{ targetWithSuffix }}</span>\r\n </div>\r\n } @if (forecast) {\r\n <div class=\"forecast\" [style.background-color]=\"forecastBackgroundColor\" [style.width]=\"forecastWidth\"></div>\r\n } @if (isDelta && delta) {\r\n <div class=\"delta\" #deltaBox [style.background-color]=\"deltaBackgroundColor\" [style.width]=\"deltaWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ deltaWithSuffix + '\u25B2' }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"deltaBackgroundColor\"></div>\r\n </div>\r\n } @else { @if (value) {\r\n <div class=\"value\" [style.background-color]=\"valueBackgroundColor\" [style.width]=\"valueWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ valueWithSuffix }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"valueBackgroundColor\"></div>\r\n </div>\r\n } }\r\n\r\n <!-- separator lines-->\r\n </div>\r\n @if (separatorLines) {\r\n <div class=\"separator-lines\">\r\n @for (i of separatorLinesFakeArray; track i) {\r\n <div class=\"separator-line\"></div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".separator-lines,.range .value,.range .target,.range .forecast,.range{margin-bottom:auto;margin-top:auto;top:0;bottom:0}:host{display:flex;width:100%;height:100%;align-items:center}.chart-container{height:15px;width:100%;position:relative}.range{width:100%;position:absolute;background-color:#e6eee8;z-index:2}.range .forecast{position:absolute;left:0}.range .target{position:absolute;z-index:5;width:2%;height:24px;background-color:#000}.range .target span{position:absolute;bottom:-20px;right:-10px}.range .value{position:absolute;left:0;height:7px}.range .value .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .value span{position:absolute;bottom:19px;right:-6px}.range .delta{position:absolute;height:15px}.range .delta .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .delta span{position:absolute;bottom:19px}.separator-lines{position:absolute;display:flex;justify-content:space-between;height:20px;width:100%}.separator-lines .separator-line{background-color:#e9730c;width:2px}.separator-lines .separator-line:first-child,.separator-lines .separator-line:last-child{background-color:#c21a1a!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: MicroChartBulletComponent, selector: "be-micro-chart-bullet", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId", range: "range", value: "value", forecast: "forecast", target: "target", suffix: "suffix", separatorLines: "separatorLines", isDelta: "isDelta" }, viewQueries: [{ propertyName: "deltaDom", first: true, predicate: ["deltaBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"chart-container\">\r\n <div class=\"range\">\r\n @if (target) {\r\n <div class=\"target\" #target [style.left]=\"targetWidth\">\r\n <span>{{ targetWithSuffix }}</span>\r\n </div>\r\n } @if (forecast) {\r\n <div class=\"forecast\" [style.background-color]=\"forecastBackgroundColor\" [style.width]=\"forecastWidth\"></div>\r\n } @if (isDelta && delta) {\r\n <div class=\"delta\" #deltaBox [style.background-color]=\"deltaBackgroundColor\" [style.width]=\"deltaWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ deltaWithSuffix + '\u25B2' }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"deltaBackgroundColor\"></div>\r\n </div>\r\n } @else { @if (value) {\r\n <div class=\"value\" [style.background-color]=\"valueBackgroundColor\" [style.width]=\"valueWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ valueWithSuffix }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"valueBackgroundColor\"></div>\r\n </div>\r\n } }\r\n\r\n <!-- separator lines-->\r\n </div>\r\n @if (separatorLines) {\r\n <div class=\"separator-lines\">\r\n @for (i of separatorLinesFakeArray; track i) {\r\n <div class=\"separator-line\"></div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".separator-lines,.range .value,.range .target,.range .forecast,.range{margin-bottom:auto;margin-top:auto;top:0;bottom:0}:host{display:flex;width:100%;height:100%;align-items:center}.chart-container{height:15px;width:100%;position:relative}.range{width:100%;position:absolute;background-color:#e6eee8;z-index:2}.range .forecast{position:absolute;left:0}.range .target{position:absolute;z-index:5;width:2%;height:24px;background-color:#000}.range .target span{position:absolute;bottom:-20px;right:-10px}.range .value{position:absolute;left:0;height:7px}.range .value .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .value span{position:absolute;bottom:19px;right:-6px}.range .delta{position:absolute;height:15px}.range .delta .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .delta span{position:absolute;bottom:19px}.separator-lines{position:absolute;display:flex;justify-content:space-between;height:20px;width:100%}.separator-lines .separator-line{background-color:#e9730c;width:2px}.separator-lines .separator-line:first-child,.separator-lines .separator-line:last-child{background-color:#c21a1a!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
68
68
|
}
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBulletComponent, decorators: [{
|
|
70
70
|
type: Component,
|
|
71
71
|
args: [{ selector: 'be-micro-chart-bullet', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"chart-container\">\r\n <div class=\"range\">\r\n @if (target) {\r\n <div class=\"target\" #target [style.left]=\"targetWidth\">\r\n <span>{{ targetWithSuffix }}</span>\r\n </div>\r\n } @if (forecast) {\r\n <div class=\"forecast\" [style.background-color]=\"forecastBackgroundColor\" [style.width]=\"forecastWidth\"></div>\r\n } @if (isDelta && delta) {\r\n <div class=\"delta\" #deltaBox [style.background-color]=\"deltaBackgroundColor\" [style.width]=\"deltaWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ deltaWithSuffix + '\u25B2' }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"deltaBackgroundColor\"></div>\r\n </div>\r\n } @else { @if (value) {\r\n <div class=\"value\" [style.background-color]=\"valueBackgroundColor\" [style.width]=\"valueWidth\">\r\n <span [style.color]=\"valueBackgroundColor\">{{ valueWithSuffix }}</span>\r\n <div class=\"pointer\" [style.background-color]=\"valueBackgroundColor\"></div>\r\n </div>\r\n } }\r\n\r\n <!-- separator lines-->\r\n </div>\r\n @if (separatorLines) {\r\n <div class=\"separator-lines\">\r\n @for (i of separatorLinesFakeArray; track i) {\r\n <div class=\"separator-line\"></div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".separator-lines,.range .value,.range .target,.range .forecast,.range{margin-bottom:auto;margin-top:auto;top:0;bottom:0}:host{display:flex;width:100%;height:100%;align-items:center}.chart-container{height:15px;width:100%;position:relative}.range{width:100%;position:absolute;background-color:#e6eee8;z-index:2}.range .forecast{position:absolute;left:0}.range .target{position:absolute;z-index:5;width:2%;height:24px;background-color:#000}.range .target span{position:absolute;bottom:-20px;right:-10px}.range .value{position:absolute;left:0;height:7px}.range .value .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .value span{position:absolute;bottom:19px;right:-6px}.range .delta{position:absolute;height:15px}.range .delta .pointer{position:absolute;width:2px;height:20px;bottom:0}.range .delta span{position:absolute;bottom:19px}.separator-lines{position:absolute;display:flex;justify-content:space-between;height:20px;width:100%}.separator-lines .separator-line{background-color:#e9730c;width:2px}.separator-lines .separator-line:first-child,.separator-lines .separator-line:last-child{background-color:#c21a1a!important}\n"] }]
|
|
72
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: {
|
|
72
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { chartInstanceId: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], parentMoId: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], deltaDom: [{
|
|
73
77
|
type: ViewChild,
|
|
74
78
|
args: ['deltaBox']
|
|
75
79
|
}], range: [{
|
|
@@ -89,37 +93,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
89
93
|
}] } });
|
|
90
94
|
|
|
91
95
|
class ChartBaseDirective extends BaseDirective {
|
|
92
|
-
constructor(_el, renderer2) {
|
|
96
|
+
constructor(_el, renderer2, _cdr) {
|
|
93
97
|
super(_el);
|
|
94
98
|
this._el = _el;
|
|
95
99
|
this.renderer2 = renderer2;
|
|
96
|
-
this.
|
|
97
|
-
trigger: 'item',
|
|
98
|
-
responsive: true,
|
|
99
|
-
position: 'top',
|
|
100
|
-
formatter: '{c}',
|
|
101
|
-
backgroundColor: '#fafcfe',
|
|
102
|
-
borderColor: '#c8e2f7',
|
|
103
|
-
borderWidth: '0.8',
|
|
104
|
-
textStyle: {
|
|
105
|
-
color: '#5d6f80'
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
this.grid = {
|
|
109
|
-
top: 0,
|
|
110
|
-
bottom: 0,
|
|
111
|
-
left: 0,
|
|
112
|
-
right: 0
|
|
113
|
-
};
|
|
114
|
-
this.xAxis = {
|
|
115
|
-
data: [],
|
|
116
|
-
type: 'value'
|
|
117
|
-
};
|
|
118
|
-
this.yAxis = {
|
|
119
|
-
data: [],
|
|
120
|
-
type: 'category'
|
|
121
|
-
};
|
|
122
|
-
this.series = [];
|
|
100
|
+
this._cdr = _cdr;
|
|
123
101
|
}
|
|
124
102
|
ngOnInit() {
|
|
125
103
|
// set some style to chart
|
|
@@ -128,138 +106,43 @@ class ChartBaseDirective extends BaseDirective {
|
|
|
128
106
|
this.renderer2.setStyle(elDom, 'width', '100%');
|
|
129
107
|
this.renderer2.setStyle(elDom, 'height', '100%');
|
|
130
108
|
this.renderer2.setStyle(elDom, 'display', 'block');
|
|
131
|
-
// initialize echart micro-charts
|
|
132
|
-
this._initializeOptions();
|
|
133
109
|
}
|
|
134
110
|
ngAfterViewInit() {
|
|
135
|
-
this.
|
|
111
|
+
this._loadChartInstance(this.chartInstanceId, this.parentMoId);
|
|
112
|
+
}
|
|
113
|
+
_renderChart() {
|
|
136
114
|
setTimeout(() => {
|
|
137
115
|
head.load(['Lib/Echarts/echarts.My.min.js'], () => {
|
|
138
116
|
const elDom = this._el.nativeElement;
|
|
139
117
|
this.chart = echarts.init(elDom);
|
|
140
|
-
this.
|
|
118
|
+
this.chart.setOption(this.chartOption);
|
|
141
119
|
});
|
|
142
120
|
}, 300);
|
|
143
121
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
series: this.series,
|
|
153
|
-
tooltip: this.tooltip
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
157
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: ChartBaseDirective, usesInheritance: true, ngImport: i0 }); }
|
|
158
|
-
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartBaseDirective, decorators: [{
|
|
160
|
-
type: Directive
|
|
161
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
162
|
-
|
|
163
|
-
class MicroChartBaseDirective extends ChartBaseDirective {
|
|
164
|
-
constructor(_el, renderer2) {
|
|
165
|
-
super(_el, renderer2);
|
|
166
|
-
this._el = _el;
|
|
167
|
-
this.renderer2 = renderer2;
|
|
168
|
-
this.xAxis = {
|
|
169
|
-
data: [],
|
|
170
|
-
type: 'value',
|
|
171
|
-
axisLine: {
|
|
172
|
-
show: false
|
|
173
|
-
},
|
|
174
|
-
axisLabel: {
|
|
175
|
-
show: false
|
|
176
|
-
},
|
|
177
|
-
splitLine: {
|
|
178
|
-
show: false
|
|
179
|
-
},
|
|
180
|
-
axisTick: {
|
|
181
|
-
show: false
|
|
182
|
-
},
|
|
183
|
-
max: 100
|
|
184
|
-
};
|
|
185
|
-
this.yAxis = {
|
|
186
|
-
data: [],
|
|
187
|
-
type: 'category',
|
|
188
|
-
axisLabel: {
|
|
189
|
-
show: false
|
|
190
|
-
},
|
|
191
|
-
axisLine: {
|
|
192
|
-
show: false
|
|
193
|
-
},
|
|
194
|
-
splitLine: {
|
|
195
|
-
show: false
|
|
122
|
+
_loadChartInstance(chartInstanceId, parentMoId = null) {
|
|
123
|
+
BarsaApi.Bw.RunBlMethodAsync({
|
|
124
|
+
Parameters: [chartInstanceId, parentMoId],
|
|
125
|
+
Method: 'BarsaGetChartOptions',
|
|
126
|
+
SuccessFn: (chartOption) => {
|
|
127
|
+
this.chartOption = BarsaApi.Ext.decode(chartOption);
|
|
128
|
+
this._renderChart();
|
|
129
|
+
this._cdr.detectChanges();
|
|
196
130
|
},
|
|
197
|
-
|
|
198
|
-
show: false
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
203
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartBaseDirective, usesInheritance: true, ngImport: i0 }); }
|
|
204
|
-
}
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBaseDirective, decorators: [{
|
|
206
|
-
type: Directive
|
|
207
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
208
|
-
|
|
209
|
-
class MicroChartLineBaseDirective extends MicroChartBaseDirective {
|
|
210
|
-
constructor(_el, renderer2) {
|
|
211
|
-
super(_el, renderer2);
|
|
212
|
-
this._el = _el;
|
|
213
|
-
this.renderer2 = renderer2;
|
|
214
|
-
}
|
|
215
|
-
setOptions(options) {
|
|
216
|
-
this._scaleDownLineData();
|
|
217
|
-
// initialize series
|
|
218
|
-
this._initSeries(options);
|
|
219
|
-
// set input data
|
|
220
|
-
this.line.data.forEach((item) => {
|
|
221
|
-
this.xAxis?.data?.push(item.label);
|
|
222
|
-
const dataObj = {
|
|
223
|
-
value: item.value,
|
|
224
|
-
symbol: 'none'
|
|
225
|
-
};
|
|
226
|
-
options.series[0].data.push(dataObj);
|
|
131
|
+
FailFn: () => { }
|
|
227
132
|
});
|
|
228
|
-
this.xAxis.max = undefined;
|
|
229
|
-
this.xAxis.type = 'category';
|
|
230
|
-
// set custom yAxis
|
|
231
|
-
this.yAxis.min = 0;
|
|
232
|
-
this.yAxis.max = 6;
|
|
233
|
-
this.yAxis.type = 'value';
|
|
234
133
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const maxValue = Math.max.apply(Math, this.line.data.map((dataItem) => dataItem.value));
|
|
238
|
-
return this.line.data.forEach((dataItem) => {
|
|
239
|
-
dataItem.value *= 6 / maxValue;
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
_initSeries(options) {
|
|
243
|
-
options.series = [
|
|
244
|
-
{
|
|
245
|
-
type: 'line',
|
|
246
|
-
color: this.line?.color,
|
|
247
|
-
data: [],
|
|
248
|
-
label: {
|
|
249
|
-
show: false
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
];
|
|
253
|
-
}
|
|
254
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartLineBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
255
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartLineBaseDirective, selector: "[beMicroChartLine]", inputs: { line: "line" }, usesInheritance: true, ngImport: i0 }); }
|
|
134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
135
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId" }, exportAs: ["echartRenderer"], usesInheritance: true, ngImport: i0 }); }
|
|
256
136
|
}
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type:
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartBaseDirective, decorators: [{
|
|
258
138
|
type: Directive,
|
|
259
139
|
args: [{
|
|
260
|
-
selector: '[
|
|
140
|
+
selector: '[echartRenderer]',
|
|
141
|
+
exportAs: 'echartRenderer'
|
|
261
142
|
}]
|
|
262
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: {
|
|
143
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { chartInstanceId: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], parentMoId: [{
|
|
263
146
|
type: Input
|
|
264
147
|
}] } });
|
|
265
148
|
|
|
@@ -268,72 +151,15 @@ class MicroChartLineComponent extends BaseComponent {
|
|
|
268
151
|
super();
|
|
269
152
|
this.el = el;
|
|
270
153
|
}
|
|
271
|
-
ngOnInit() {
|
|
272
|
-
super.ngOnInit();
|
|
273
|
-
this.getFirstAndLastValues();
|
|
274
|
-
}
|
|
275
|
-
getFirstAndLastValues() {
|
|
276
|
-
const dataLength = this.line.data.length;
|
|
277
|
-
this.firstValue = this.line.data[0].value.toString();
|
|
278
|
-
this.lastValue = this.line.data[dataLength - 1].value.toString();
|
|
279
|
-
this.firstLabel = this.line.data[0].label;
|
|
280
|
-
this.lastLabel = this.line.data[dataLength - 1].label;
|
|
281
|
-
}
|
|
282
154
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartLineComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
283
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartLineComponent, selector: "be-micro-chart-line", inputs: {
|
|
155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartLineComponent, selector: "be-micro-chart-line", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId" }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"top-labels\">\n <span>{{ lastValue }}{{ line?.suffix }}</span>\n <span>{{ firstValue }}{{ line?.suffix }}</span>\n</div> -->\n\n<div class=\"chart\">\n <div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n</div>\n<!-- \n<div class=\"bottom-labels\">\n <span>{{ lastLabel }}</span>\n <span>{{ firstLabel }}</span>\n</div> -->\n", styles: [":host{display:block;width:100%;height:100%}.chart{width:100%;height:52%}span{margin:0;font-size:10px}.top-labels{width:100%;height:23%;display:flex;justify-content:space-between}.bottom-labels{width:100%;height:25%;display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
284
156
|
}
|
|
285
157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartLineComponent, decorators: [{
|
|
286
158
|
type: Component,
|
|
287
|
-
args: [{ selector: 'be-micro-chart-line', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"top-labels\">\
|
|
288
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
159
|
+
args: [{ selector: 'be-micro-chart-line', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- <div class=\"top-labels\">\n <span>{{ lastValue }}{{ line?.suffix }}</span>\n <span>{{ firstValue }}{{ line?.suffix }}</span>\n</div> -->\n\n<div class=\"chart\">\n <div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n</div>\n<!-- \n<div class=\"bottom-labels\">\n <span>{{ lastLabel }}</span>\n <span>{{ firstLabel }}</span>\n</div> -->\n", styles: [":host{display:block;width:100%;height:100%}.chart{width:100%;height:52%}span{margin:0;font-size:10px}.top-labels{width:100%;height:23%;display:flex;justify-content:space-between}.bottom-labels{width:100%;height:25%;display:flex;justify-content:space-between}\n"] }]
|
|
160
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chartInstanceId: [{
|
|
289
161
|
type: Input
|
|
290
|
-
}]
|
|
291
|
-
|
|
292
|
-
class MicroChartStackbarBaseDirective extends MicroChartBaseDirective {
|
|
293
|
-
constructor(_el, renderer2) {
|
|
294
|
-
super(_el, renderer2);
|
|
295
|
-
this._el = _el;
|
|
296
|
-
this.renderer2 = renderer2;
|
|
297
|
-
}
|
|
298
|
-
setOptions(options) {
|
|
299
|
-
this.chartData.data.forEach((dataItem) => {
|
|
300
|
-
const dataConfig = this.creatData(dataItem);
|
|
301
|
-
options.series.push(dataConfig);
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
creatData(dataItem) {
|
|
305
|
-
return {
|
|
306
|
-
name: 'Direct',
|
|
307
|
-
barWidth: 15,
|
|
308
|
-
type: 'bar',
|
|
309
|
-
stack: 'total',
|
|
310
|
-
emphasis: {
|
|
311
|
-
focus: 'series'
|
|
312
|
-
},
|
|
313
|
-
data: [
|
|
314
|
-
{
|
|
315
|
-
value: dataItem.value,
|
|
316
|
-
itemStyle: {
|
|
317
|
-
color: dataItem.color
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
],
|
|
321
|
-
label: {
|
|
322
|
-
show: true,
|
|
323
|
-
formatter: (d) => d.data.value.toString() + this.chartData.suffix,
|
|
324
|
-
fontSize: 10
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartStackbarBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
329
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartStackbarBaseDirective, selector: "[beMicroChartStackbar]", inputs: { chartData: "chartData" }, usesInheritance: true, ngImport: i0 }); }
|
|
330
|
-
}
|
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartStackbarBaseDirective, decorators: [{
|
|
332
|
-
type: Directive,
|
|
333
|
-
args: [{
|
|
334
|
-
selector: '[beMicroChartStackbar]'
|
|
335
|
-
}]
|
|
336
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { chartData: [{
|
|
162
|
+
}], parentMoId: [{
|
|
337
163
|
type: Input
|
|
338
164
|
}] } });
|
|
339
165
|
|
|
@@ -343,84 +169,14 @@ class MicroChartStackbarComponent extends BaseComponent {
|
|
|
343
169
|
this.el = el;
|
|
344
170
|
}
|
|
345
171
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartStackbarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartStackbarComponent, selector: "be-micro-chart-stackbar", inputs: {
|
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartStackbarComponent, selector: "be-micro-chart-stackbar", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId" }, usesInheritance: true, ngImport: i0, template: "<div *untilInView=\"el\" echartRenderer class=\"chart\" [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}.chart{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
347
173
|
}
|
|
348
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartStackbarComponent, decorators: [{
|
|
349
175
|
type: Component,
|
|
350
|
-
args: [{ selector: 'be-micro-chart-stackbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\"
|
|
351
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
176
|
+
args: [{ selector: 'be-micro-chart-stackbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\" echartRenderer class=\"chart\" [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}.chart{width:100%}\n"] }]
|
|
177
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chartInstanceId: [{
|
|
352
178
|
type: Input
|
|
353
|
-
}]
|
|
354
|
-
|
|
355
|
-
class MicroChartCircularBaseDirective extends MicroChartBaseDirective {
|
|
356
|
-
constructor(_el, renderer2) {
|
|
357
|
-
super(_el, renderer2);
|
|
358
|
-
this._el = _el;
|
|
359
|
-
this.renderer2 = renderer2;
|
|
360
|
-
}
|
|
361
|
-
setOptions(options) {
|
|
362
|
-
// remove extra data from circular chart
|
|
363
|
-
this._initSeries(options);
|
|
364
|
-
// add data to series
|
|
365
|
-
options.series[0].data.push({ value: this.data });
|
|
366
|
-
}
|
|
367
|
-
_initSeries(options) {
|
|
368
|
-
options.series = [
|
|
369
|
-
{
|
|
370
|
-
type: 'gauge',
|
|
371
|
-
progress: {
|
|
372
|
-
show: true,
|
|
373
|
-
width: 5
|
|
374
|
-
},
|
|
375
|
-
axisLine: {
|
|
376
|
-
lineStyle: {
|
|
377
|
-
width: 5
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
axisTick: {
|
|
381
|
-
show: false
|
|
382
|
-
},
|
|
383
|
-
splitLine: {
|
|
384
|
-
show: false,
|
|
385
|
-
length: 15,
|
|
386
|
-
lineStyle: {
|
|
387
|
-
width: 2,
|
|
388
|
-
color: '#999'
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
axisLabel: {
|
|
392
|
-
distance: 30,
|
|
393
|
-
color: '#999',
|
|
394
|
-
fontSize: 10,
|
|
395
|
-
show: false
|
|
396
|
-
},
|
|
397
|
-
anchor: {
|
|
398
|
-
show: true,
|
|
399
|
-
showAbove: true,
|
|
400
|
-
size: 15,
|
|
401
|
-
itemStyle: {
|
|
402
|
-
borderWidth: 1
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
title: {
|
|
406
|
-
show: false
|
|
407
|
-
},
|
|
408
|
-
detail: {
|
|
409
|
-
valueAnimation: true,
|
|
410
|
-
fontSize: 12,
|
|
411
|
-
offsetCenter: [0, '70%']
|
|
412
|
-
},
|
|
413
|
-
data: []
|
|
414
|
-
}
|
|
415
|
-
];
|
|
416
|
-
}
|
|
417
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartCircularBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
418
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartCircularBaseDirective, selector: "[beMicroChartCircular]", inputs: { data: "data" }, usesInheritance: true, ngImport: i0 }); }
|
|
419
|
-
}
|
|
420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartCircularBaseDirective, decorators: [{
|
|
421
|
-
type: Directive,
|
|
422
|
-
args: [{ selector: '[beMicroChartCircular]' }]
|
|
423
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { data: [{
|
|
179
|
+
}], parentMoId: [{
|
|
424
180
|
type: Input
|
|
425
181
|
}] } });
|
|
426
182
|
|
|
@@ -428,111 +184,16 @@ class MicroChartCircularComponent extends BaseComponent {
|
|
|
428
184
|
constructor(el) {
|
|
429
185
|
super();
|
|
430
186
|
this.el = el;
|
|
431
|
-
this.data = 50;
|
|
432
187
|
}
|
|
433
188
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartCircularComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
434
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartCircularComponent, selector: "be-micro-chart-circular", inputs: {
|
|
189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartCircularComponent, selector: "be-micro-chart-circular", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId" }, usesInheritance: true, ngImport: i0, template: "<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
435
190
|
}
|
|
436
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartCircularComponent, decorators: [{
|
|
437
192
|
type: Component,
|
|
438
|
-
args: [{ selector: 'be-micro-chart-circular', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\"
|
|
439
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
440
|
-
type: Input
|
|
441
|
-
}] } });
|
|
442
|
-
|
|
443
|
-
class MicroChartComparisonBaseDirective extends MicroChartBaseDirective {
|
|
444
|
-
constructor(_el, renderer2) {
|
|
445
|
-
super(_el, renderer2);
|
|
446
|
-
this._el = _el;
|
|
447
|
-
this.renderer2 = renderer2;
|
|
448
|
-
}
|
|
449
|
-
setOptions(options) {
|
|
450
|
-
// initialize series
|
|
451
|
-
this._initValues(options);
|
|
452
|
-
// set custom xAxis
|
|
453
|
-
this.xAxis.type = 'value';
|
|
454
|
-
this.xAxis.boundaryGap = ['0%', '50%'];
|
|
455
|
-
// set custom yAxis
|
|
456
|
-
this.yAxis.type = 'category';
|
|
457
|
-
this.yAxis.offset = 6;
|
|
458
|
-
this.yAxis.axisLabel = {
|
|
459
|
-
show: true,
|
|
460
|
-
inside: true,
|
|
461
|
-
lineHeight: 16
|
|
462
|
-
};
|
|
463
|
-
// set custom grid
|
|
464
|
-
this.grid.top = 10;
|
|
465
|
-
const textStyle = {
|
|
466
|
-
verticalAlign: 'bottom',
|
|
467
|
-
fontSize: 12,
|
|
468
|
-
fontWeight: 'bold'
|
|
469
|
-
};
|
|
470
|
-
this.chartData.data.forEach((item) => {
|
|
471
|
-
const seriesData = {
|
|
472
|
-
value: item.value,
|
|
473
|
-
itemStyle: {
|
|
474
|
-
color: item.color
|
|
475
|
-
},
|
|
476
|
-
label: {
|
|
477
|
-
position: ['100', '0%']
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
options.series[0].data.push(seriesData);
|
|
481
|
-
const yAxisData = { value: item.label, textStyle };
|
|
482
|
-
this.yAxis?.data?.push(yAxisData);
|
|
483
|
-
});
|
|
484
|
-
// if we have double tile
|
|
485
|
-
if (this.size === 'l') {
|
|
486
|
-
this.grid.left = 50;
|
|
487
|
-
this.yAxis.axisLabel.inside = false;
|
|
488
|
-
this.yAxis.axisLabel.lineHeight = undefined;
|
|
489
|
-
options.series[0].label.position = 'right';
|
|
490
|
-
this.yAxis.offset = -2;
|
|
491
|
-
options.series[0].showBackground = false;
|
|
492
|
-
this.xAxis.max = 112;
|
|
493
|
-
options.series[0].data.map((dataItem) => {
|
|
494
|
-
delete dataItem.label.offset;
|
|
495
|
-
dataItem.label.position = ['100%', '0%'];
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
options.series[0].label.formatter = (d) => d.data.value + this.chartData.suffix;
|
|
499
|
-
}
|
|
500
|
-
_initValues(options) {
|
|
501
|
-
options.series = [
|
|
502
|
-
{
|
|
503
|
-
showBackground: true,
|
|
504
|
-
barWidth: this.chartData.barWidth ?? 3,
|
|
505
|
-
type: 'bar',
|
|
506
|
-
data: [],
|
|
507
|
-
label: {
|
|
508
|
-
show: true,
|
|
509
|
-
position: 'top',
|
|
510
|
-
distance: 0,
|
|
511
|
-
valueAnimation: true,
|
|
512
|
-
fontFamily: 'monospace',
|
|
513
|
-
formatter: (d) => d.data.value + '%',
|
|
514
|
-
lineHeight: -10
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
];
|
|
518
|
-
options.plotOptions = {
|
|
519
|
-
bar: {
|
|
520
|
-
horizontal: true,
|
|
521
|
-
distributed: true
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartComparisonBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
526
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartComparisonBaseDirective, selector: "[beMicroChartComparison]", inputs: { size: "size", chartData: "chartData" }, usesInheritance: true, ngImport: i0 }); }
|
|
527
|
-
}
|
|
528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartComparisonBaseDirective, decorators: [{
|
|
529
|
-
type: Directive,
|
|
530
|
-
args: [{
|
|
531
|
-
selector: '[beMicroChartComparison]'
|
|
532
|
-
}]
|
|
533
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { size: [{
|
|
193
|
+
args: [{ selector: 'be-micro-chart-circular', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
|
|
194
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chartInstanceId: [{
|
|
534
195
|
type: Input
|
|
535
|
-
}],
|
|
196
|
+
}], parentMoId: [{
|
|
536
197
|
type: Input
|
|
537
198
|
}] } });
|
|
538
199
|
|
|
@@ -542,100 +203,16 @@ class MicroChartComparisonComponent extends BaseComponent {
|
|
|
542
203
|
this.el = el;
|
|
543
204
|
}
|
|
544
205
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartComparisonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
545
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartComparisonComponent, selector: "be-micro-chart-comparison", inputs: {
|
|
206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartComparisonComponent, selector: "be-micro-chart-comparison", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId", size: "size" }, usesInheritance: true, ngImport: i0, template: "<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
546
207
|
}
|
|
547
208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartComparisonComponent, decorators: [{
|
|
548
209
|
type: Component,
|
|
549
|
-
args: [{ selector: 'be-micro-chart-comparison', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\"
|
|
550
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
210
|
+
args: [{ selector: 'be-micro-chart-comparison', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
|
|
211
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chartInstanceId: [{
|
|
551
212
|
type: Input
|
|
552
|
-
}],
|
|
553
|
-
type: Input
|
|
554
|
-
}] } });
|
|
555
|
-
|
|
556
|
-
class MicroChartAreaBaseDirective extends MicroChartBaseDirective {
|
|
557
|
-
constructor(_el, renderer2) {
|
|
558
|
-
super(_el, renderer2);
|
|
559
|
-
this._el = _el;
|
|
560
|
-
this.renderer2 = renderer2;
|
|
561
|
-
this.areas = [];
|
|
562
|
-
}
|
|
563
|
-
/* eslint-disable */
|
|
564
|
-
setOptions(options) {
|
|
565
|
-
this._scaleDownLineData();
|
|
566
|
-
// set custom xAxis
|
|
567
|
-
this.xAxis.type = 'category';
|
|
568
|
-
this.line.data.forEach((item) => {
|
|
569
|
-
this.xAxis?.data?.push(item.label);
|
|
570
|
-
});
|
|
571
|
-
this.xAxis.max = undefined;
|
|
572
|
-
this.xAxis.boundaryGap = false;
|
|
573
|
-
// set custom yAxis
|
|
574
|
-
this.yAxis.splitLine = { show: false };
|
|
575
|
-
this.yAxis.type = 'value';
|
|
576
|
-
this.yAxis.splitNumber = 3;
|
|
577
|
-
this.yAxis.min = 0;
|
|
578
|
-
this.yAxis.max = 6;
|
|
579
|
-
// handel area
|
|
580
|
-
this.areas.forEach((area) => {
|
|
581
|
-
const line = this._createItem(area.color, area.data.map((c) => ({
|
|
582
|
-
value: c,
|
|
583
|
-
symbol: 'none'
|
|
584
|
-
})));
|
|
585
|
-
this.series.push(line);
|
|
586
|
-
});
|
|
587
|
-
// handel line
|
|
588
|
-
const seriesItem = this._createSeriesItem(this.line.data.map((item) => ({
|
|
589
|
-
value: item.value,
|
|
590
|
-
symbol: 'none'
|
|
591
|
-
})));
|
|
592
|
-
this.series.push(seriesItem);
|
|
593
|
-
}
|
|
594
|
-
_scaleDownLineData() {
|
|
595
|
-
const maxValue = Math.max.apply(Math, this.line.data.map((dataItem) => dataItem.value));
|
|
596
|
-
return this.line.data.forEach((dataItem) => {
|
|
597
|
-
dataItem.value *= 6 / maxValue;
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
_createSeriesItem(data) {
|
|
601
|
-
return {
|
|
602
|
-
type: 'line',
|
|
603
|
-
data,
|
|
604
|
-
lineStyle: { width: 1 },
|
|
605
|
-
color: this.line?.color || 'black',
|
|
606
|
-
label: {
|
|
607
|
-
show: false
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
_createItem(color = '', data, name = 'none', stack = 'none') {
|
|
612
|
-
return {
|
|
613
|
-
name,
|
|
614
|
-
type: 'line',
|
|
615
|
-
stack,
|
|
616
|
-
areaStyle: {
|
|
617
|
-
color
|
|
618
|
-
},
|
|
619
|
-
itemStyle: {
|
|
620
|
-
color
|
|
621
|
-
},
|
|
622
|
-
emphasis: {
|
|
623
|
-
focus: 'series'
|
|
624
|
-
},
|
|
625
|
-
data
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartAreaBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
629
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartAreaBaseDirective, selector: "[beMicroChartArea]", inputs: { areas: "areas", line: "line" }, usesInheritance: true, ngImport: i0 }); }
|
|
630
|
-
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartAreaBaseDirective, decorators: [{
|
|
632
|
-
type: Directive,
|
|
633
|
-
args: [{
|
|
634
|
-
selector: '[beMicroChartArea]'
|
|
635
|
-
}]
|
|
636
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { areas: [{
|
|
213
|
+
}], parentMoId: [{
|
|
637
214
|
type: Input
|
|
638
|
-
}],
|
|
215
|
+
}], size: [{
|
|
639
216
|
type: Input
|
|
640
217
|
}] } });
|
|
641
218
|
|
|
@@ -650,66 +227,27 @@ class MicroChartAreaComponent extends BaseComponent {
|
|
|
650
227
|
this.getFirstAndLastValues();
|
|
651
228
|
}
|
|
652
229
|
getFirstAndLastValues() {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
230
|
+
if (this.chartData) {
|
|
231
|
+
const dataLength = this.chartData.line.data.length;
|
|
232
|
+
this.firstValue = this.chartData.line.data[0].value.toString();
|
|
233
|
+
this.lastValue = this.chartData.line.data[dataLength - 1].value.toString();
|
|
234
|
+
this.firstLabel = this.chartData.line.data[0].label;
|
|
235
|
+
this.lastLabel = this.chartData.line.data[dataLength - 1].label;
|
|
236
|
+
}
|
|
658
237
|
}
|
|
659
238
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartAreaComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
660
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
239
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartAreaComponent, selector: "be-micro-chart-area", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId", size: "size", chartData: "chartData" }, usesInheritance: true, ngImport: i0, template: "<!-- @if (size === 'l') {\n<div class=\"right-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastValue }}{{ chartData?.line?.suffix }}</span>\n <span [style.color]=\"chartData.lastValueColor\">{{ lastLabel }}</span>\n</div>\n} @if (size === 's') {\n<div class=\"top-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastValue }}{{ suffix }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstValue }}{{ suffix }}</span>\n</div>\n} -->\n\n<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n<!-- \n@if (size === 'l') {\n<div class=\"left-labels\">\n <span [style.color]=\"chartData.firstValueColor\">{{ firstValue }}{{ suffix }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstLabel }}</span>\n</div>\n} @if (size === 's') {\n<div class=\"bottom-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastLabel }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstLabel }}</span>\n</div>\n} -->\n", styles: [":host{display:block;width:100%;height:100%}span{margin:0;font-size:10px}.top-labels{width:100%;height:23%;display:flex;justify-content:space-between}.bottom-labels{width:100%;height:25%;display:flex;justify-content:space-between}.right-labels{min-width:40px;display:flex;flex-direction:column;justify-content:space-between;text-align:right}.left-labels{min-width:40px;display:flex;flex-direction:column;justify-content:space-between;text-align:left}\n"], dependencies: [{ kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
661
240
|
}
|
|
662
241
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartAreaComponent, decorators: [{
|
|
663
242
|
type: Component,
|
|
664
|
-
args: [{ selector: 'be-micro-chart-area', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (size === 'l') {\
|
|
665
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
243
|
+
args: [{ selector: 'be-micro-chart-area', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- @if (size === 'l') {\n<div class=\"right-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastValue }}{{ chartData?.line?.suffix }}</span>\n <span [style.color]=\"chartData.lastValueColor\">{{ lastLabel }}</span>\n</div>\n} @if (size === 's') {\n<div class=\"top-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastValue }}{{ suffix }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstValue }}{{ suffix }}</span>\n</div>\n} -->\n\n<div *untilInView=\"el\" echartRenderer [chartInstanceId]=\"chartInstanceId\" [parentMoId]=\"parentMoId\"></div>\n<!-- \n@if (size === 'l') {\n<div class=\"left-labels\">\n <span [style.color]=\"chartData.firstValueColor\">{{ firstValue }}{{ suffix }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstLabel }}</span>\n</div>\n} @if (size === 's') {\n<div class=\"bottom-labels\">\n <span [style.color]=\"chartData.lastValueColor\">{{ lastLabel }}</span>\n <span [style.color]=\"chartData.firstValueColor\">{{ firstLabel }}</span>\n</div>\n} -->\n", styles: [":host{display:block;width:100%;height:100%}span{margin:0;font-size:10px}.top-labels{width:100%;height:23%;display:flex;justify-content:space-between}.bottom-labels{width:100%;height:25%;display:flex;justify-content:space-between}.right-labels{min-width:40px;display:flex;flex-direction:column;justify-content:space-between;text-align:right}.left-labels{min-width:40px;display:flex;flex-direction:column;justify-content:space-between;text-align:left}\n"] }]
|
|
244
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { chartInstanceId: [{
|
|
666
245
|
type: Input
|
|
667
|
-
}],
|
|
246
|
+
}], parentMoId: [{
|
|
668
247
|
type: Input
|
|
669
|
-
}]
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
constructor(_el, renderer2) {
|
|
673
|
-
super(_el, renderer2);
|
|
674
|
-
this._el = _el;
|
|
675
|
-
this.renderer2 = renderer2;
|
|
676
|
-
}
|
|
677
|
-
setOptions(options) {
|
|
678
|
-
// initialize series
|
|
679
|
-
this._initSeries(options);
|
|
680
|
-
// set custom grid
|
|
681
|
-
this.grid.bottom = 20;
|
|
682
|
-
// set custom xAxis
|
|
683
|
-
this.xAxis.type = 'category';
|
|
684
|
-
this.xAxis.max = undefined;
|
|
685
|
-
if (this.xAxis.axisLabel) {
|
|
686
|
-
this.xAxis.axisLabel.show = true;
|
|
687
|
-
}
|
|
688
|
-
this.data.forEach((dataItem) => {
|
|
689
|
-
this?.xAxis?.data?.push(dataItem.label);
|
|
690
|
-
const dataSeriesItem = { value: dataItem.value, itemStyle: { color: dataItem.color } };
|
|
691
|
-
options.series[0].data.push(dataSeriesItem);
|
|
692
|
-
});
|
|
693
|
-
// set custom yAxis
|
|
694
|
-
this.yAxis.type = 'value';
|
|
695
|
-
}
|
|
696
|
-
_initSeries(options) {
|
|
697
|
-
options.series = [
|
|
698
|
-
{
|
|
699
|
-
type: 'bar',
|
|
700
|
-
data: []
|
|
701
|
-
}
|
|
702
|
-
];
|
|
703
|
-
}
|
|
704
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBarBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
705
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartBarBaseDirective, selector: "[beMicroChartBar]", inputs: { data: "data" }, usesInheritance: true, ngImport: i0 }); }
|
|
706
|
-
}
|
|
707
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBarBaseDirective, decorators: [{
|
|
708
|
-
type: Directive,
|
|
709
|
-
args: [{
|
|
710
|
-
selector: '[beMicroChartBar]'
|
|
711
|
-
}]
|
|
712
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { data: [{
|
|
248
|
+
}], size: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], chartData: [{
|
|
713
251
|
type: Input
|
|
714
252
|
}] } });
|
|
715
253
|
|
|
@@ -719,12 +257,17 @@ class MicroChartBarComponent extends BaseComponent {
|
|
|
719
257
|
this.el = el;
|
|
720
258
|
}
|
|
721
259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
722
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MicroChartBarComponent, selector: "be-micro-chart-bar", inputs: { chartInstanceId: "chartInstanceId", parentMoId: "parentMoId", size: "size", extraData: "extraData" }, viewQueries: [{ propertyName: "eChartBase", first: true, predicate: ["echartRenderer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n *untilInView=\"el\"\n echartRenderer\n #echartRenderer=\"echartRenderer\"\n [ngClass]=\"size === 'l' ? 'flex-50' : 'flex-100'\"\n [chartInstanceId]=\"chartInstanceId\"\n [parentMoId]=\"parentMoId\"\n></div>\n<!-- @if (size === 'l') {\n<div class=\"chart-desc\">\n <h2>{{ extraData.value }}{{ extraData.suffix }}</h2>\n</div>\n} -->\n", styles: [":host{display:flex;width:100%;height:100%}.flex-50,.flex-100{flex:50%}.chart-desc{flex:50%;display:flex;align-items:flex-end;justify-content:flex-end}.chart-desc h2{margin:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "directive", type: ChartBaseDirective, selector: "[echartRenderer]", inputs: ["chartInstanceId", "parentMoId"], exportAs: ["echartRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
723
261
|
}
|
|
724
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MicroChartBarComponent, decorators: [{
|
|
725
263
|
type: Component,
|
|
726
|
-
args: [{ selector: 'be-micro-chart-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div
|
|
727
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
264
|
+
args: [{ selector: 'be-micro-chart-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *untilInView=\"el\"\n echartRenderer\n #echartRenderer=\"echartRenderer\"\n [ngClass]=\"size === 'l' ? 'flex-50' : 'flex-100'\"\n [chartInstanceId]=\"chartInstanceId\"\n [parentMoId]=\"parentMoId\"\n></div>\n<!-- @if (size === 'l') {\n<div class=\"chart-desc\">\n <h2>{{ extraData.value }}{{ extraData.suffix }}</h2>\n</div>\n} -->\n", styles: [":host{display:flex;width:100%;height:100%}.flex-50,.flex-100{flex:50%}.chart-desc{flex:50%;display:flex;align-items:flex-end;justify-content:flex-end}.chart-desc h2{margin:0}\n"] }]
|
|
265
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { eChartBase: [{
|
|
266
|
+
type: ViewChild,
|
|
267
|
+
args: ['echartRenderer']
|
|
268
|
+
}], chartInstanceId: [{
|
|
269
|
+
type: Input
|
|
270
|
+
}], parentMoId: [{
|
|
728
271
|
type: Input
|
|
729
272
|
}], size: [{
|
|
730
273
|
type: Input
|
|
@@ -732,82 +275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
732
275
|
type: Input
|
|
733
276
|
}] } });
|
|
734
277
|
|
|
735
|
-
class ChartLineTimeBaseDirective extends ChartBaseDirective {
|
|
736
|
-
constructor(groupbyPipe, _el, renderer2) {
|
|
737
|
-
super(_el, renderer2);
|
|
738
|
-
this.groupbyPipe = groupbyPipe;
|
|
739
|
-
this._el = _el;
|
|
740
|
-
this.renderer2 = renderer2;
|
|
741
|
-
this.xAxis = [];
|
|
742
|
-
this.yAxis = [];
|
|
743
|
-
}
|
|
744
|
-
ngOnChanges(changes) {
|
|
745
|
-
super.ngOnChanges(changes);
|
|
746
|
-
const { chartOption } = changes;
|
|
747
|
-
if (chartOption) {
|
|
748
|
-
let options = chartOption.currentValue;
|
|
749
|
-
options = {
|
|
750
|
-
...options,
|
|
751
|
-
toolbox: {
|
|
752
|
-
feature: {
|
|
753
|
-
dataZoom: {
|
|
754
|
-
yAxisIndex: 'none'
|
|
755
|
-
},
|
|
756
|
-
restore: {},
|
|
757
|
-
saveAsImage: {}
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
this._setTooltipFormatter(options, 'series', 'tooltip');
|
|
762
|
-
this._setTooltipFormatter(options, 'xAxis', 'axisLabel');
|
|
763
|
-
this._setTooltipFormatter(options, 'yAxis', 'tooltip');
|
|
764
|
-
if (!chartOption.firstChange) {
|
|
765
|
-
this._renderChart();
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
setOptions(options) {
|
|
770
|
-
this.options = {
|
|
771
|
-
...options,
|
|
772
|
-
...this.chartOption,
|
|
773
|
-
toolbox: {
|
|
774
|
-
feature: {
|
|
775
|
-
dataZoom: {
|
|
776
|
-
yAxisIndex: 'none'
|
|
777
|
-
},
|
|
778
|
-
restore: {},
|
|
779
|
-
saveAsImage: {}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
// set input data
|
|
784
|
-
}
|
|
785
|
-
_setTooltipFormatter(options, prop, prop2) {
|
|
786
|
-
const arr = options[prop];
|
|
787
|
-
if (Array.isArray(arr)) {
|
|
788
|
-
arr.forEach((c) => {
|
|
789
|
-
const obj2 = c[prop2];
|
|
790
|
-
if (obj2 &&
|
|
791
|
-
obj2.formatter &&
|
|
792
|
-
(obj2.formatter.indexOf('=>') > -1 || obj2.formatter.indexOf('function') > -1)) {
|
|
793
|
-
// eslint-disable-next-line no-eval
|
|
794
|
-
obj2.formatter = eval(obj2.formatter);
|
|
795
|
-
}
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartLineTimeBaseDirective, deps: [{ token: i1.GroupByPipe }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
800
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: ChartLineTimeBaseDirective, selector: "[beChartLineTime]", inputs: { chartOption: "chartOption" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
801
|
-
}
|
|
802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ChartLineTimeBaseDirective, decorators: [{
|
|
803
|
-
type: Directive,
|
|
804
|
-
args: [{
|
|
805
|
-
selector: '[beChartLineTime]'
|
|
806
|
-
}]
|
|
807
|
-
}], ctorParameters: () => [{ type: i1.GroupByPipe }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { chartOption: [{
|
|
808
|
-
type: Input
|
|
809
|
-
}] } });
|
|
810
|
-
|
|
811
278
|
const components = [
|
|
812
279
|
MicroChartComparisonComponent,
|
|
813
280
|
MicroChartAreaComponent,
|
|
@@ -816,15 +283,9 @@ const components = [
|
|
|
816
283
|
MicroChartStackbarComponent,
|
|
817
284
|
MicroChartCircularComponent,
|
|
818
285
|
MicroChartLineComponent,
|
|
819
|
-
MicroChartAreaBaseDirective,
|
|
820
|
-
MicroChartLineBaseDirective,
|
|
821
|
-
MicroChartStackbarBaseDirective,
|
|
822
|
-
MicroChartComparisonBaseDirective,
|
|
823
286
|
MicroChartCircularComponent,
|
|
824
|
-
MicroChartBarBaseDirective,
|
|
825
|
-
MicroChartCircularBaseDirective,
|
|
826
287
|
MicroChartBulletComponent,
|
|
827
|
-
|
|
288
|
+
ChartBaseDirective
|
|
828
289
|
];
|
|
829
290
|
class BarsaEchartsModule {
|
|
830
291
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaEchartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -835,30 +296,18 @@ class BarsaEchartsModule {
|
|
|
835
296
|
MicroChartStackbarComponent,
|
|
836
297
|
MicroChartCircularComponent,
|
|
837
298
|
MicroChartLineComponent,
|
|
838
|
-
MicroChartAreaBaseDirective,
|
|
839
|
-
MicroChartLineBaseDirective,
|
|
840
|
-
MicroChartStackbarBaseDirective,
|
|
841
|
-
MicroChartComparisonBaseDirective,
|
|
842
299
|
MicroChartCircularComponent,
|
|
843
|
-
MicroChartBarBaseDirective,
|
|
844
|
-
MicroChartCircularBaseDirective,
|
|
845
300
|
MicroChartBulletComponent,
|
|
846
|
-
|
|
301
|
+
ChartBaseDirective], imports: [CommonModule, BarsaNovinRayCoreModule], exports: [MicroChartComparisonComponent,
|
|
847
302
|
MicroChartAreaComponent,
|
|
848
303
|
MicroChartBarComponent,
|
|
849
304
|
MicroChartAreaComponent,
|
|
850
305
|
MicroChartStackbarComponent,
|
|
851
306
|
MicroChartCircularComponent,
|
|
852
307
|
MicroChartLineComponent,
|
|
853
|
-
MicroChartAreaBaseDirective,
|
|
854
|
-
MicroChartLineBaseDirective,
|
|
855
|
-
MicroChartStackbarBaseDirective,
|
|
856
|
-
MicroChartComparisonBaseDirective,
|
|
857
308
|
MicroChartCircularComponent,
|
|
858
|
-
MicroChartBarBaseDirective,
|
|
859
|
-
MicroChartCircularBaseDirective,
|
|
860
309
|
MicroChartBulletComponent,
|
|
861
|
-
|
|
310
|
+
ChartBaseDirective] }); }
|
|
862
311
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaEchartsModule, imports: [CommonModule, BarsaNovinRayCoreModule] }); }
|
|
863
312
|
}
|
|
864
313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaEchartsModule, decorators: [{
|
|
@@ -875,5 +324,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
875
324
|
* Generated bundle index. Do not edit.
|
|
876
325
|
*/
|
|
877
326
|
|
|
878
|
-
export { BarsaEchartsModule,
|
|
327
|
+
export { BarsaEchartsModule, ChartBaseDirective, MicroChartAreaComponent, MicroChartBarComponent, MicroChartBulletComponent, MicroChartCircularComponent, MicroChartComparisonComponent, MicroChartLineComponent, MicroChartStackbarComponent };
|
|
879
328
|
//# sourceMappingURL=barsa-echarts.mjs.map
|