intelica-library-ui 0.1.87 → 0.1.88
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.
|
@@ -158,13 +158,15 @@ const secure = !domain.includes("localhost");
|
|
|
158
158
|
const CookieAttributesGeneral = { domain: domain, path: "/", secure: secure };
|
|
159
159
|
|
|
160
160
|
const Color = {
|
|
161
|
-
mastercard:
|
|
162
|
-
visa:
|
|
163
|
-
amex:
|
|
164
|
-
orange:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
mastercard: "#ff7f00",
|
|
162
|
+
visa: "#17375E",
|
|
163
|
+
amex: "#348AD5",
|
|
164
|
+
orange: "#ff7f00",
|
|
165
|
+
orangeDark: "#CC4900",
|
|
166
|
+
blue: "#17375E",
|
|
167
|
+
gray: "#D3D3D3",
|
|
168
|
+
gray3: "#a6a5a1",
|
|
169
|
+
gray5: "#e9e9e9",
|
|
168
170
|
};
|
|
169
171
|
const getColor = (name) => {
|
|
170
172
|
return Color[name];
|
|
@@ -3139,13 +3141,13 @@ class EchartService {
|
|
|
3139
3141
|
},
|
|
3140
3142
|
axisLine: {
|
|
3141
3143
|
show: false,
|
|
3142
|
-
lineStyle: { color: getColor(
|
|
3144
|
+
lineStyle: { color: getColor("gray"), type: "dashed" },
|
|
3143
3145
|
},
|
|
3144
3146
|
splitLine: {
|
|
3145
3147
|
show: showSplitLine,
|
|
3146
3148
|
lineStyle: {
|
|
3147
3149
|
color: Color.gray,
|
|
3148
|
-
type:
|
|
3150
|
+
type: "dashed",
|
|
3149
3151
|
width: 1,
|
|
3150
3152
|
},
|
|
3151
3153
|
},
|
|
@@ -3158,10 +3160,10 @@ class EchartService {
|
|
|
3158
3160
|
};
|
|
3159
3161
|
}
|
|
3160
3162
|
getCategoryAxisConfiguration(data) {
|
|
3161
|
-
return this.getDefultAxisConfiguration(
|
|
3163
|
+
return this.getDefultAxisConfiguration("category", data, true);
|
|
3162
3164
|
}
|
|
3163
3165
|
getValueAxisConfiguration(showAxis = false, format = false, showAxisLines = false) {
|
|
3164
|
-
let axisConfiguration = this.getDefultAxisConfiguration(
|
|
3166
|
+
let axisConfiguration = this.getDefultAxisConfiguration("value", undefined, showAxis, showAxisLines);
|
|
3165
3167
|
if (format) {
|
|
3166
3168
|
axisConfiguration.axisLabel.formatter = (value) => this._sharedService.FormatNumberWithSuffix(value);
|
|
3167
3169
|
}
|
|
@@ -3178,18 +3180,18 @@ class EchartService {
|
|
|
3178
3180
|
}
|
|
3179
3181
|
getGridConfiguration() {
|
|
3180
3182
|
return {
|
|
3181
|
-
left:
|
|
3182
|
-
right:
|
|
3183
|
-
bottom: '
|
|
3183
|
+
left: "0%",
|
|
3184
|
+
right: "0%",
|
|
3185
|
+
//bottom: '0%',
|
|
3184
3186
|
containLabel: true,
|
|
3185
3187
|
};
|
|
3186
3188
|
}
|
|
3187
3189
|
getLegendConfiguration() {
|
|
3188
3190
|
return {
|
|
3189
|
-
orient:
|
|
3190
|
-
icon:
|
|
3191
|
+
orient: "horizontal", // 'horizontal | vertical'
|
|
3192
|
+
icon: "circle",
|
|
3191
3193
|
bottom: 5,
|
|
3192
|
-
align:
|
|
3194
|
+
align: "auto",
|
|
3193
3195
|
itemGap: 20,
|
|
3194
3196
|
textStyle: { color: Color.blue, fontSize: 14 },
|
|
3195
3197
|
};
|
|
@@ -3202,15 +3204,15 @@ class EchartService {
|
|
|
3202
3204
|
yAxis: this.getValueAxisConfiguration(),
|
|
3203
3205
|
series: [
|
|
3204
3206
|
...series.map((item) => ({
|
|
3205
|
-
type:
|
|
3207
|
+
type: "bar",
|
|
3206
3208
|
name: item.name,
|
|
3207
3209
|
itemStyle: { color: item.color },
|
|
3208
3210
|
data: item.value,
|
|
3209
|
-
barWidth:
|
|
3210
|
-
barGap:
|
|
3211
|
+
barWidth: "25%",
|
|
3212
|
+
barGap: "0%",
|
|
3211
3213
|
label: {
|
|
3212
3214
|
show: true,
|
|
3213
|
-
position:
|
|
3215
|
+
position: "top",
|
|
3214
3216
|
color: Color.blue,
|
|
3215
3217
|
fontSize: 12,
|
|
3216
3218
|
formatter: labelConfig,
|
|
@@ -3218,8 +3220,8 @@ class EchartService {
|
|
|
3218
3220
|
})),
|
|
3219
3221
|
],
|
|
3220
3222
|
tooltip: {
|
|
3221
|
-
trigger:
|
|
3222
|
-
backgroundColor:
|
|
3223
|
+
trigger: "item",
|
|
3224
|
+
backgroundColor: "#FFFFFF",
|
|
3223
3225
|
borderWidth: 2,
|
|
3224
3226
|
textStyle: { fontSize: 12 },
|
|
3225
3227
|
formatter: tooltipConfig,
|
|
@@ -3231,10 +3233,10 @@ class EchartService {
|
|
|
3231
3233
|
getBarChartStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3232
3234
|
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3233
3235
|
barBase.series.forEach((serie, index) => {
|
|
3234
|
-
serie.barWidth =
|
|
3235
|
-
serie.barGap =
|
|
3236
|
-
serie.barCategoryGap =
|
|
3237
|
-
serie.stack =
|
|
3236
|
+
serie.barWidth = "50%";
|
|
3237
|
+
serie.barGap = "0%";
|
|
3238
|
+
serie.barCategoryGap = "10%";
|
|
3239
|
+
serie.stack = "total";
|
|
3238
3240
|
if (index < series.length - 1) {
|
|
3239
3241
|
serie.label = undefined;
|
|
3240
3242
|
}
|
|
@@ -3245,9 +3247,9 @@ class EchartService {
|
|
|
3245
3247
|
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3246
3248
|
barBase.xAxis = this.getValueAxisConfiguration();
|
|
3247
3249
|
barBase.yAxis = this.getCategoryAxisConfiguration(categories);
|
|
3248
|
-
barBase.series.forEach(
|
|
3250
|
+
barBase.series.forEach(serie => {
|
|
3249
3251
|
if (serie.label) {
|
|
3250
|
-
serie.label.position =
|
|
3252
|
+
serie.label.position = "right";
|
|
3251
3253
|
}
|
|
3252
3254
|
});
|
|
3253
3255
|
return barBase;
|
|
@@ -3255,12 +3257,12 @@ class EchartService {
|
|
|
3255
3257
|
getBarChartHorizontalStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3256
3258
|
let barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3257
3259
|
barBase.series.forEach((serie, index) => {
|
|
3258
|
-
serie.barWidth =
|
|
3259
|
-
serie.barGap =
|
|
3260
|
-
serie.barCategoryGap =
|
|
3261
|
-
serie.stack =
|
|
3260
|
+
serie.barWidth = "50%";
|
|
3261
|
+
serie.barGap = "0%";
|
|
3262
|
+
serie.barCategoryGap = "10%";
|
|
3263
|
+
serie.stack = "total";
|
|
3262
3264
|
if (serie.label) {
|
|
3263
|
-
serie.label.position =
|
|
3265
|
+
serie.label.position = "right";
|
|
3264
3266
|
}
|
|
3265
3267
|
if (index < series.length - 1) {
|
|
3266
3268
|
serie.label = undefined;
|
|
@@ -3277,21 +3279,19 @@ class EchartService {
|
|
|
3277
3279
|
barBase.yAxis.axisLabel.color = Color.blue;
|
|
3278
3280
|
barBase.yAxis.axisLabel.fontSize = 12;
|
|
3279
3281
|
barBase.yAxis.axisLabel.width = categoryWidth;
|
|
3280
|
-
barBase.yAxis.axisLabel.overflow =
|
|
3281
|
-
barBase.yAxis.axisLabel.align =
|
|
3282
|
-
barBase.yAxis.axisLabel.verticalAlign =
|
|
3283
|
-
|
|
3284
|
-
barBase.yAxis.axisLabel.margin =
|
|
3285
|
-
categoryWidth + 30;
|
|
3282
|
+
barBase.yAxis.axisLabel.overflow = "break";
|
|
3283
|
+
barBase.yAxis.axisLabel.align = "left";
|
|
3284
|
+
barBase.yAxis.axisLabel.verticalAlign = "middle";
|
|
3285
|
+
barBase.yAxis.axisLabel.margin = categoryWidth + 30;
|
|
3286
3286
|
barBase.yAxis.axisLabel.lineHeight = 16;
|
|
3287
|
-
barBase.grid.top =
|
|
3287
|
+
barBase.grid.top = "0%";
|
|
3288
3288
|
barBase.grid.left = -1 * categoryWidth + 60;
|
|
3289
3289
|
barBase.grid.right = 20;
|
|
3290
|
-
barBase.grid.bottom =
|
|
3290
|
+
barBase.grid.bottom = "0%";
|
|
3291
3291
|
barBase.grid.containLabel = true;
|
|
3292
3292
|
}
|
|
3293
3293
|
barBase.series.forEach((serie, index) => {
|
|
3294
|
-
serie.barWidth =
|
|
3294
|
+
serie.barWidth = "75%";
|
|
3295
3295
|
});
|
|
3296
3296
|
return barBase;
|
|
3297
3297
|
}
|
|
@@ -3302,48 +3302,48 @@ class EchartService {
|
|
|
3302
3302
|
yAxis: this.getValueAxisConfiguration(true, true, true),
|
|
3303
3303
|
series: [
|
|
3304
3304
|
...series.map((item, seriesIndex) => ({
|
|
3305
|
-
type:
|
|
3305
|
+
type: "line",
|
|
3306
3306
|
name: item.name,
|
|
3307
3307
|
data: item.value,
|
|
3308
3308
|
itemStyle: { color: item.color },
|
|
3309
|
-
symbol:
|
|
3309
|
+
symbol: "circle",
|
|
3310
3310
|
symbolSize: 14,
|
|
3311
3311
|
emphasis: {
|
|
3312
3312
|
itemStyle: {
|
|
3313
3313
|
color: item.color,
|
|
3314
|
-
borderColor: item.color +
|
|
3314
|
+
borderColor: item.color + "40", // 40 ( hexadecimal ) = .25 ( decimal )
|
|
3315
3315
|
borderWidth: 16,
|
|
3316
3316
|
},
|
|
3317
3317
|
},
|
|
3318
3318
|
})),
|
|
3319
3319
|
],
|
|
3320
3320
|
tooltip: {
|
|
3321
|
-
trigger:
|
|
3322
|
-
backgroundColor:
|
|
3321
|
+
trigger: "item",
|
|
3322
|
+
backgroundColor: "#FFFFFF",
|
|
3323
3323
|
borderWidth: 2,
|
|
3324
3324
|
textStyle: { fontSize: 12 },
|
|
3325
3325
|
formatter: tooltipConfig,
|
|
3326
3326
|
},
|
|
3327
3327
|
dataZoom: [
|
|
3328
3328
|
{
|
|
3329
|
-
type:
|
|
3329
|
+
type: "inside", // inside | slider
|
|
3330
3330
|
show: true,
|
|
3331
3331
|
height: 12,
|
|
3332
3332
|
bottom: 10,
|
|
3333
|
-
backgroundColor:
|
|
3334
|
-
borderColor:
|
|
3335
|
-
fillerColor:
|
|
3336
|
-
handleSize:
|
|
3333
|
+
backgroundColor: "#ddd",
|
|
3334
|
+
borderColor: "transparent",
|
|
3335
|
+
fillerColor: "rgba(150, 150, 150, 0.5)",
|
|
3336
|
+
handleSize: "80%",
|
|
3337
3337
|
handleStyle: {
|
|
3338
|
-
color:
|
|
3339
|
-
borderColor:
|
|
3338
|
+
color: "#A0A0A0",
|
|
3339
|
+
borderColor: "transparent",
|
|
3340
3340
|
shadowBlur: 2,
|
|
3341
|
-
shadowColor:
|
|
3341
|
+
shadowColor: "rgba(0, 0, 0, 0.2)",
|
|
3342
3342
|
},
|
|
3343
3343
|
showDataShadow: false,
|
|
3344
3344
|
},
|
|
3345
3345
|
{
|
|
3346
|
-
type:
|
|
3346
|
+
type: "inside",
|
|
3347
3347
|
showDataShadow: false,
|
|
3348
3348
|
},
|
|
3349
3349
|
],
|
|
@@ -3355,13 +3355,13 @@ class EchartService {
|
|
|
3355
3355
|
return {
|
|
3356
3356
|
series: [
|
|
3357
3357
|
{
|
|
3358
|
-
data: data.map(
|
|
3358
|
+
data: data.map(item => ({
|
|
3359
3359
|
...item,
|
|
3360
3360
|
itemStyle: { color: item.color },
|
|
3361
3361
|
})),
|
|
3362
|
-
name:
|
|
3363
|
-
type:
|
|
3364
|
-
radius: [
|
|
3362
|
+
name: "Pie Chart",
|
|
3363
|
+
type: "pie",
|
|
3364
|
+
radius: ["40%", "70%"],
|
|
3365
3365
|
avoidLabelOverlap: false,
|
|
3366
3366
|
emphasis: {
|
|
3367
3367
|
scale: true,
|
|
@@ -3373,7 +3373,7 @@ class EchartService {
|
|
|
3373
3373
|
},
|
|
3374
3374
|
label: {
|
|
3375
3375
|
show: true,
|
|
3376
|
-
position:
|
|
3376
|
+
position: "outside",
|
|
3377
3377
|
color: Color.blue,
|
|
3378
3378
|
fontSize: 14,
|
|
3379
3379
|
formatter: labelConfig,
|
|
@@ -3381,43 +3381,43 @@ class EchartService {
|
|
|
3381
3381
|
},
|
|
3382
3382
|
],
|
|
3383
3383
|
tooltip: {
|
|
3384
|
-
trigger:
|
|
3384
|
+
trigger: "item",
|
|
3385
3385
|
formatter: tooltipConfig,
|
|
3386
3386
|
// extraCssText: this.chartService.getTooltipCssText(),
|
|
3387
3387
|
},
|
|
3388
3388
|
legend: {
|
|
3389
|
-
orient:
|
|
3390
|
-
icon:
|
|
3389
|
+
orient: "horizontal", // 'horizontal | vertical'
|
|
3390
|
+
icon: "circle",
|
|
3391
3391
|
bottom: 5,
|
|
3392
|
-
align:
|
|
3392
|
+
align: "auto",
|
|
3393
3393
|
itemGap: 20,
|
|
3394
3394
|
textStyle: { color: Color.blue, fontSize: 14 },
|
|
3395
3395
|
},
|
|
3396
3396
|
};
|
|
3397
3397
|
}
|
|
3398
|
-
getRateDoughnutPieOptions(letter, value, color) {
|
|
3398
|
+
getRateDoughnutPieOptions(letter, value, textSize, color) {
|
|
3399
3399
|
const power = Math.ceil(Math.log10(value));
|
|
3400
3400
|
const placeholderValue = Math.pow(10, power);
|
|
3401
3401
|
const data = [
|
|
3402
3402
|
{ name: letter, value: value, itemStyle: { color: color } },
|
|
3403
3403
|
{
|
|
3404
|
-
name:
|
|
3404
|
+
name: "placeholder",
|
|
3405
3405
|
value: placeholderValue - value,
|
|
3406
|
-
itemStyle: { color: Color.
|
|
3406
|
+
itemStyle: { color: Color.gray5 },
|
|
3407
3407
|
},
|
|
3408
3408
|
];
|
|
3409
3409
|
return {
|
|
3410
3410
|
tooltip: {
|
|
3411
|
-
trigger:
|
|
3411
|
+
trigger: "none",
|
|
3412
3412
|
},
|
|
3413
3413
|
series: [
|
|
3414
3414
|
{
|
|
3415
|
-
name:
|
|
3416
|
-
type:
|
|
3415
|
+
name: "RateDoughnutPie",
|
|
3416
|
+
type: "pie",
|
|
3417
3417
|
tooltip: {
|
|
3418
|
-
trigger:
|
|
3418
|
+
trigger: "none",
|
|
3419
3419
|
},
|
|
3420
|
-
radius: [
|
|
3420
|
+
radius: ["80%", "60%"],
|
|
3421
3421
|
data: data,
|
|
3422
3422
|
startAngle: 0,
|
|
3423
3423
|
selectedMode: false,
|
|
@@ -3426,20 +3426,26 @@ class EchartService {
|
|
|
3426
3426
|
show: true,
|
|
3427
3427
|
formatter: letter,
|
|
3428
3428
|
color: color,
|
|
3429
|
-
|
|
3430
|
-
|
|
3429
|
+
position: "center",
|
|
3430
|
+
fontWeight: "bold",
|
|
3431
|
+
fontSize: textSize,
|
|
3432
|
+
fontFamily: "Arial",
|
|
3433
|
+
lineHeight: textSize * -0.22,
|
|
3434
|
+
align: "center",
|
|
3435
|
+
verticalAlign: "middle",
|
|
3436
|
+
backgroundColor: "transparent",
|
|
3431
3437
|
},
|
|
3432
3438
|
},
|
|
3433
3439
|
],
|
|
3434
3440
|
};
|
|
3435
3441
|
}
|
|
3436
3442
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3437
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, providedIn:
|
|
3443
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, providedIn: "root" });
|
|
3438
3444
|
}
|
|
3439
3445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, decorators: [{
|
|
3440
3446
|
type: Injectable,
|
|
3441
3447
|
args: [{
|
|
3442
|
-
providedIn:
|
|
3448
|
+
providedIn: "root",
|
|
3443
3449
|
}]
|
|
3444
3450
|
}] });
|
|
3445
3451
|
|