intelica-library-ui 0.1.85 → 0.1.86
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.
|
@@ -3191,7 +3191,7 @@ class EchartService {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
/// Charts Configuration
|
|
3193
3193
|
/// BAR CHARTS
|
|
3194
|
-
getBarChartOptions(categories, series, labelConfig, tooltipConfig) {
|
|
3194
|
+
getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3195
3195
|
return {
|
|
3196
3196
|
xAxis: this.getCategoryAxisConfiguration(categories),
|
|
3197
3197
|
yAxis: this.getValueAxisConfiguration(),
|
|
@@ -3220,11 +3220,11 @@ class EchartService {
|
|
|
3220
3220
|
formatter: tooltipConfig,
|
|
3221
3221
|
},
|
|
3222
3222
|
grid: this.getGridConfiguration(),
|
|
3223
|
-
legend: this.getLegendConfiguration(),
|
|
3223
|
+
legend: showLegend ? this.getLegendConfiguration() : undefined,
|
|
3224
3224
|
};
|
|
3225
3225
|
}
|
|
3226
|
-
getBarChartStackOptions(categories, series, labelConfig, tooltipConfig) {
|
|
3227
|
-
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig);
|
|
3226
|
+
getBarChartStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3227
|
+
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3228
3228
|
barBase.series.forEach((serie, index) => {
|
|
3229
3229
|
serie.barWidth = '50%';
|
|
3230
3230
|
serie.barGap = '0%';
|
|
@@ -3236,8 +3236,8 @@ class EchartService {
|
|
|
3236
3236
|
});
|
|
3237
3237
|
return barBase;
|
|
3238
3238
|
}
|
|
3239
|
-
getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig) {
|
|
3240
|
-
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig);
|
|
3239
|
+
getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3240
|
+
let barBase = this.getBarChartOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3241
3241
|
barBase.xAxis = this.getValueAxisConfiguration();
|
|
3242
3242
|
barBase.yAxis = this.getCategoryAxisConfiguration(categories);
|
|
3243
3243
|
barBase.series.forEach((serie) => {
|
|
@@ -3247,8 +3247,8 @@ class EchartService {
|
|
|
3247
3247
|
});
|
|
3248
3248
|
return barBase;
|
|
3249
3249
|
}
|
|
3250
|
-
getBarChartHorizontalStackOptions(categories, series, labelConfig, tooltipConfig) {
|
|
3251
|
-
let barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig);
|
|
3250
|
+
getBarChartHorizontalStackOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3251
|
+
let barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3252
3252
|
barBase.series.forEach((serie, index) => {
|
|
3253
3253
|
serie.barWidth = '50%';
|
|
3254
3254
|
serie.barGap = '0%';
|
|
@@ -3263,8 +3263,35 @@ class EchartService {
|
|
|
3263
3263
|
});
|
|
3264
3264
|
return barBase;
|
|
3265
3265
|
}
|
|
3266
|
+
getBarChartTopOptions(categories, series, categoryWidth = 240, labelConfig, tooltipConfig, showLegend = false) {
|
|
3267
|
+
let barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
3268
|
+
if (barBase.yAxis) {
|
|
3269
|
+
// (barBase.yAxis as YAXisComponentOption).show = true;
|
|
3270
|
+
// (barBase.yAxis as YAXisComponentOption).splitLine!.show = true;
|
|
3271
|
+
barBase.yAxis.inverse = true;
|
|
3272
|
+
barBase.yAxis.axisLabel.color = Color.blue;
|
|
3273
|
+
barBase.yAxis.axisLabel.fontSize = 12;
|
|
3274
|
+
barBase.yAxis.axisLabel.width = categoryWidth;
|
|
3275
|
+
barBase.yAxis.axisLabel.overflow = 'break';
|
|
3276
|
+
barBase.yAxis.axisLabel.align = 'left';
|
|
3277
|
+
barBase.yAxis.axisLabel.verticalAlign =
|
|
3278
|
+
'middle';
|
|
3279
|
+
barBase.yAxis.axisLabel.margin =
|
|
3280
|
+
categoryWidth + 30;
|
|
3281
|
+
barBase.yAxis.axisLabel.lineHeight = 16;
|
|
3282
|
+
barBase.grid.top = '0%';
|
|
3283
|
+
barBase.grid.left = -1 * categoryWidth + 60;
|
|
3284
|
+
barBase.grid.right = 20;
|
|
3285
|
+
barBase.grid.bottom = '0%';
|
|
3286
|
+
barBase.grid.containLabel = true;
|
|
3287
|
+
}
|
|
3288
|
+
barBase.series.forEach((serie, index) => {
|
|
3289
|
+
serie.barWidth = '75%';
|
|
3290
|
+
});
|
|
3291
|
+
return barBase;
|
|
3292
|
+
}
|
|
3266
3293
|
/// LINE CHARTS
|
|
3267
|
-
getLineChartOptions(categories, series, labelConfig, tooltipConfig) {
|
|
3294
|
+
getLineChartOptions(categories, series, labelConfig, tooltipConfig, showLegend = false) {
|
|
3268
3295
|
return {
|
|
3269
3296
|
xAxis: this.getCategoryAxisConfiguration(categories),
|
|
3270
3297
|
yAxis: this.getValueAxisConfiguration(true, true, true),
|
|
@@ -3315,7 +3342,7 @@ class EchartService {
|
|
|
3315
3342
|
showDataShadow: false,
|
|
3316
3343
|
},
|
|
3317
3344
|
],
|
|
3318
|
-
legend: this.getLegendConfiguration(),
|
|
3345
|
+
legend: showLegend ? this.getLegendConfiguration() : undefined,
|
|
3319
3346
|
};
|
|
3320
3347
|
}
|
|
3321
3348
|
/// PIE CHARTS
|