moblor-vue 0.1.84 → 0.1.85
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/dist/charts.js +1 -1
- package/dist/moblor-components.esm.js +188 -85
- package/dist/moblor-components.js +1 -1
- package/dist/moblor-vue.esm.js +188 -85
- package/dist/moblor-vue.js +1 -1
- package/package.json +1 -1
|
@@ -364,6 +364,8 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
364
364
|
_this.resizeObserver = null;
|
|
365
365
|
_this.isFirstCheck = true;
|
|
366
366
|
_this.isLayoutChecking = false;
|
|
367
|
+
_this.lastRenderedWidth = 0;
|
|
368
|
+
_this.lastRenderedHeight = 0;
|
|
367
369
|
return _this;
|
|
368
370
|
}
|
|
369
371
|
Object.defineProperty(MoBarChart.prototype, "actualMargin", {
|
|
@@ -398,7 +400,6 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
398
400
|
configurable: true
|
|
399
401
|
});
|
|
400
402
|
MoBarChart.prototype.onDataChanged = function () {
|
|
401
|
-
this.beforeRedraw();
|
|
402
403
|
this.redraw();
|
|
403
404
|
};
|
|
404
405
|
MoBarChart.prototype.mounted = function () {
|
|
@@ -422,6 +423,9 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
422
423
|
}
|
|
423
424
|
});
|
|
424
425
|
this.resizeObserver.observe(this.$el);
|
|
426
|
+
if (this.$el.parentElement) {
|
|
427
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
428
|
+
}
|
|
425
429
|
}
|
|
426
430
|
// 首次渲染
|
|
427
431
|
requestAnimationFrame(function () {
|
|
@@ -450,24 +454,30 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
450
454
|
_this.resizeTimer = null;
|
|
451
455
|
}, 200);
|
|
452
456
|
};
|
|
457
|
+
MoBarChart.prototype.getLayoutSize = function () {
|
|
458
|
+
var rect = this.$el.getBoundingClientRect();
|
|
459
|
+
var parent = this.$el.parentElement;
|
|
460
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
461
|
+
};
|
|
453
462
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
454
463
|
MoBarChart.prototype.checkLayoutAndRedraw = function () {
|
|
455
464
|
var _this = this;
|
|
456
|
-
var rect = this
|
|
457
|
-
// 高宽比 >= 1.5 时使用上下布局(竖屏/瘦高容器)
|
|
465
|
+
var rect = this.getLayoutSize();
|
|
458
466
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
459
467
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
460
468
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
469
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
470
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
461
473
|
this.isNarrowLayout = isNarrow;
|
|
462
474
|
if (layoutChanged) {
|
|
463
475
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
464
476
|
this.$nextTick(function () {
|
|
465
|
-
_this.beforeRedraw();
|
|
466
477
|
_this.redraw();
|
|
467
478
|
});
|
|
468
479
|
}
|
|
469
480
|
else {
|
|
470
|
-
this.beforeRedraw();
|
|
471
481
|
this.redraw();
|
|
472
482
|
}
|
|
473
483
|
};
|
|
@@ -493,6 +503,9 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
493
503
|
|| (!this.hasLineChart && this.aggregates.length > 1)) {
|
|
494
504
|
this.renderLabel();
|
|
495
505
|
}
|
|
506
|
+
var rect = this.getLayoutSize();
|
|
507
|
+
this.lastRenderedWidth = rect.width;
|
|
508
|
+
this.lastRenderedHeight = rect.height;
|
|
496
509
|
};
|
|
497
510
|
MoBarChart.prototype.init = function () {
|
|
498
511
|
var _this = this;
|
|
@@ -511,10 +524,6 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
511
524
|
if (!mainChartElement) {
|
|
512
525
|
return; // 模板还未就绪,跳过渲染
|
|
513
526
|
}
|
|
514
|
-
select(mainChartElement).selectAll('*').remove();
|
|
515
|
-
if (legendsElement) {
|
|
516
|
-
select(legendsElement).selectAll('*').remove();
|
|
517
|
-
}
|
|
518
527
|
// 使用容器布局状态
|
|
519
528
|
var isNarrowLayout = this.isNarrowLayout;
|
|
520
529
|
// 主图尺寸
|
|
@@ -566,24 +575,32 @@ var MoBarChart = /** @class */ (function (_super) {
|
|
|
566
575
|
this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
|
|
567
576
|
this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
|
|
568
577
|
this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
|
|
578
|
+
select(mainChartElement).selectAll('*').remove();
|
|
579
|
+
if (legendsElement) {
|
|
580
|
+
select(legendsElement).selectAll('*').remove();
|
|
581
|
+
}
|
|
569
582
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
570
583
|
var mainSvg = select(mainChartElement)
|
|
571
584
|
.append('svg')
|
|
585
|
+
.attr('width', this.svgWidth)
|
|
586
|
+
.attr('height', this.svgHeight)
|
|
572
587
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
573
588
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
574
589
|
.style('display', 'block')
|
|
575
590
|
.style('width', '100%')
|
|
576
|
-
.style('height', '100%');
|
|
591
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%');
|
|
577
592
|
var legendsSvg = null;
|
|
578
593
|
if (legendsElement) {
|
|
579
594
|
// Legends SVG: viewBox 宽度 = 容器实际宽度,确保文字截断基于真实宽度
|
|
580
595
|
legendsSvg = select(legendsElement)
|
|
581
596
|
.append('svg')
|
|
597
|
+
.attr('width', this.legendSvgWidth)
|
|
598
|
+
.attr('height', this.legendSvgHeight)
|
|
582
599
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
583
600
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
584
601
|
.style('display', 'block')
|
|
585
602
|
.style('width', '100%')
|
|
586
|
-
.style('height', '100%');
|
|
603
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
587
604
|
}
|
|
588
605
|
// 创建图表组
|
|
589
606
|
this.svg = mainSvg
|
|
@@ -1419,7 +1436,7 @@ __vue_render__._withStripped = true;
|
|
|
1419
1436
|
/* style */
|
|
1420
1437
|
var __vue_inject_styles__ = function (inject) {
|
|
1421
1438
|
if (!inject) { return }
|
|
1422
|
-
inject("data-v-1636fefd_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
1439
|
+
inject("data-v-0e9b3dcc_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
1423
1440
|
|
|
1424
1441
|
};
|
|
1425
1442
|
/* scoped */
|
|
@@ -1483,6 +1500,8 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1483
1500
|
_this.resizeObserver = null;
|
|
1484
1501
|
_this.isFirstCheck = true;
|
|
1485
1502
|
_this.isLayoutChecking = false;
|
|
1503
|
+
_this.lastRenderedWidth = 0;
|
|
1504
|
+
_this.lastRenderedHeight = 0;
|
|
1486
1505
|
return _this;
|
|
1487
1506
|
}
|
|
1488
1507
|
Object.defineProperty(MoBarChartHorizontal.prototype, "actualMargin", {
|
|
@@ -1497,7 +1516,6 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1497
1516
|
configurable: true
|
|
1498
1517
|
});
|
|
1499
1518
|
MoBarChartHorizontal.prototype.onDataChanged = function () {
|
|
1500
|
-
this.beforeRedraw();
|
|
1501
1519
|
this.redraw();
|
|
1502
1520
|
};
|
|
1503
1521
|
MoBarChartHorizontal.prototype.mounted = function () {
|
|
@@ -1506,21 +1524,24 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1506
1524
|
// 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
|
|
1507
1525
|
if (typeof ResizeObserver !== 'undefined') {
|
|
1508
1526
|
this.resizeObserver = new ResizeObserver(function () {
|
|
1509
|
-
// ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
|
|
1510
1527
|
if (_this.isFirstCheck) {
|
|
1511
1528
|
_this.isFirstCheck = false;
|
|
1512
1529
|
return;
|
|
1513
1530
|
}
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
_this.isLayoutChecking = true;
|
|
1517
|
-
requestAnimationFrame(function () {
|
|
1518
|
-
_this.isLayoutChecking = false;
|
|
1519
|
-
_this.checkLayoutAndRedraw();
|
|
1520
|
-
});
|
|
1531
|
+
if (_this.isLayoutChecking) {
|
|
1532
|
+
return;
|
|
1521
1533
|
}
|
|
1534
|
+
_this.isLayoutChecking = true;
|
|
1535
|
+
requestAnimationFrame(function () {
|
|
1536
|
+
_this.checkLayoutAndRedraw();
|
|
1537
|
+
// 重绘完成后重置标志,让 ResizeObserver 可以再次响应
|
|
1538
|
+
_this.isLayoutChecking = false;
|
|
1539
|
+
});
|
|
1522
1540
|
});
|
|
1523
1541
|
this.resizeObserver.observe(this.$el);
|
|
1542
|
+
if (this.$el.parentElement) {
|
|
1543
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
1544
|
+
}
|
|
1524
1545
|
}
|
|
1525
1546
|
// 首次渲染
|
|
1526
1547
|
requestAnimationFrame(function () {
|
|
@@ -1549,24 +1570,31 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1549
1570
|
_this.resizeTimer = null;
|
|
1550
1571
|
}, 200);
|
|
1551
1572
|
};
|
|
1573
|
+
MoBarChartHorizontal.prototype.getLayoutSize = function () {
|
|
1574
|
+
var rect = this.$el.getBoundingClientRect();
|
|
1575
|
+
var parent = this.$el.parentElement;
|
|
1576
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
1577
|
+
};
|
|
1552
1578
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
1553
1579
|
MoBarChartHorizontal.prototype.checkLayoutAndRedraw = function () {
|
|
1554
1580
|
var _this = this;
|
|
1555
|
-
var rect = this
|
|
1556
|
-
// 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
|
|
1581
|
+
var rect = this.getLayoutSize();
|
|
1557
1582
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
1558
1583
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
1559
1584
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
1585
|
+
// 尺寸没变化则跳过重绘,避免 ResizeObserver 死循环
|
|
1586
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
1587
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1560
1590
|
this.isNarrowLayout = isNarrow;
|
|
1561
1591
|
if (layoutChanged) {
|
|
1562
1592
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
1563
1593
|
this.$nextTick(function () {
|
|
1564
|
-
_this.beforeRedraw();
|
|
1565
1594
|
_this.redraw();
|
|
1566
1595
|
});
|
|
1567
1596
|
}
|
|
1568
1597
|
else {
|
|
1569
|
-
this.beforeRedraw();
|
|
1570
1598
|
this.redraw();
|
|
1571
1599
|
}
|
|
1572
1600
|
};
|
|
@@ -1593,6 +1621,9 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1593
1621
|
if (this.categories.length > 0) {
|
|
1594
1622
|
this.renderLabel();
|
|
1595
1623
|
}
|
|
1624
|
+
var rect = this.getLayoutSize();
|
|
1625
|
+
this.lastRenderedWidth = rect.width;
|
|
1626
|
+
this.lastRenderedHeight = rect.height;
|
|
1596
1627
|
};
|
|
1597
1628
|
MoBarChartHorizontal.prototype.init = function () {
|
|
1598
1629
|
var _this = this;
|
|
@@ -1623,10 +1654,6 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1623
1654
|
if (!mainChartElement) {
|
|
1624
1655
|
return; // 模板还未就绪,跳过渲染
|
|
1625
1656
|
}
|
|
1626
|
-
select(mainChartElement).selectAll('*').remove();
|
|
1627
|
-
if (legendsElement) {
|
|
1628
|
-
select(legendsElement).selectAll('*').remove();
|
|
1629
|
-
}
|
|
1630
1657
|
// 使用容器布局状态
|
|
1631
1658
|
var isNarrowLayout = this.isNarrowLayout;
|
|
1632
1659
|
// 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
|
|
@@ -1678,22 +1705,30 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
|
|
|
1678
1705
|
this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
|
|
1679
1706
|
this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
|
|
1680
1707
|
this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
|
|
1708
|
+
select(mainChartElement).selectAll('*').remove();
|
|
1709
|
+
if (legendsElement) {
|
|
1710
|
+
select(legendsElement).selectAll('*').remove();
|
|
1711
|
+
}
|
|
1681
1712
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
1682
1713
|
this.mainSvg = select(mainChartElement)
|
|
1683
1714
|
.append('svg')
|
|
1715
|
+
.attr('width', this.svgWidth)
|
|
1716
|
+
.attr('height', this.svgHeight)
|
|
1684
1717
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
1685
1718
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
1686
1719
|
.style('display', 'block')
|
|
1687
1720
|
.style('width', '100%')
|
|
1688
|
-
.style('height', '100%');
|
|
1721
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%');
|
|
1689
1722
|
if (legendsElement) {
|
|
1690
1723
|
this.legendsSvg = select(legendsElement)
|
|
1691
1724
|
.append('svg')
|
|
1725
|
+
.attr('width', this.legendSvgWidth)
|
|
1726
|
+
.attr('height', this.legendSvgHeight)
|
|
1692
1727
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
1693
1728
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
1694
1729
|
.style('display', 'block')
|
|
1695
1730
|
.style('width', '100%')
|
|
1696
|
-
.style('height', '100%');
|
|
1731
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
1697
1732
|
}
|
|
1698
1733
|
if (this.groupType === 'stacked100' && this.categories.length > 0) {
|
|
1699
1734
|
this.xAxisScale = scaleLinear()
|
|
@@ -2125,7 +2160,7 @@ __vue_render__$1._withStripped = true;
|
|
|
2125
2160
|
/* style */
|
|
2126
2161
|
var __vue_inject_styles__$1 = function (inject) {
|
|
2127
2162
|
if (!inject) { return }
|
|
2128
|
-
inject("data-v-6d12389a_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
2163
|
+
inject("data-v-0d5c8f23_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
2129
2164
|
|
|
2130
2165
|
};
|
|
2131
2166
|
/* scoped */
|
|
@@ -2195,10 +2230,11 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2195
2230
|
_this.resizeObserver = null;
|
|
2196
2231
|
_this.isFirstCheck = true;
|
|
2197
2232
|
_this.isLayoutChecking = false;
|
|
2233
|
+
_this.lastRenderedWidth = 0;
|
|
2234
|
+
_this.lastRenderedHeight = 0;
|
|
2198
2235
|
return _this;
|
|
2199
2236
|
}
|
|
2200
2237
|
PieChart.prototype.onDataChanged = function () {
|
|
2201
|
-
this.beforeRedraw();
|
|
2202
2238
|
this.redraw();
|
|
2203
2239
|
};
|
|
2204
2240
|
PieChart.prototype.mounted = function () {
|
|
@@ -2222,6 +2258,9 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2222
2258
|
}
|
|
2223
2259
|
});
|
|
2224
2260
|
this.resizeObserver.observe(this.$el);
|
|
2261
|
+
if (this.$el.parentElement) {
|
|
2262
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
2263
|
+
}
|
|
2225
2264
|
}
|
|
2226
2265
|
// 首次渲染
|
|
2227
2266
|
requestAnimationFrame(function () {
|
|
@@ -2250,24 +2289,30 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2250
2289
|
_this.resizeTimer = null;
|
|
2251
2290
|
}, 200);
|
|
2252
2291
|
};
|
|
2292
|
+
PieChart.prototype.getLayoutSize = function () {
|
|
2293
|
+
var rect = this.$el.getBoundingClientRect();
|
|
2294
|
+
var parent = this.$el.parentElement;
|
|
2295
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
2296
|
+
};
|
|
2253
2297
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
2254
2298
|
PieChart.prototype.checkLayoutAndRedraw = function () {
|
|
2255
2299
|
var _this = this;
|
|
2256
|
-
var rect = this
|
|
2257
|
-
// 高宽比 >= 1.6 时使用上下布局(竖屏/瘦高容器)
|
|
2300
|
+
var rect = this.getLayoutSize();
|
|
2258
2301
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
2259
2302
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
2260
2303
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
2304
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
2305
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
2306
|
+
return;
|
|
2307
|
+
}
|
|
2261
2308
|
this.isNarrowLayout = isNarrow;
|
|
2262
2309
|
if (layoutChanged) {
|
|
2263
2310
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
2264
2311
|
this.$nextTick(function () {
|
|
2265
|
-
_this.beforeRedraw();
|
|
2266
2312
|
_this.redraw();
|
|
2267
2313
|
});
|
|
2268
2314
|
}
|
|
2269
2315
|
else {
|
|
2270
|
-
this.beforeRedraw();
|
|
2271
2316
|
this.redraw();
|
|
2272
2317
|
}
|
|
2273
2318
|
};
|
|
@@ -2283,6 +2328,9 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2283
2328
|
}
|
|
2284
2329
|
this.renderInnerLabel();
|
|
2285
2330
|
this.changeContent();
|
|
2331
|
+
var rect = this.getLayoutSize();
|
|
2332
|
+
this.lastRenderedWidth = rect.width;
|
|
2333
|
+
this.lastRenderedHeight = rect.height;
|
|
2286
2334
|
};
|
|
2287
2335
|
PieChart.prototype.changeContent = function () {
|
|
2288
2336
|
var chartDataForLegend = this.chartDataForLegend;
|
|
@@ -2319,8 +2367,6 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2319
2367
|
if (!mainChartElement || !legendsElement) {
|
|
2320
2368
|
return; // 模板还未就绪,跳过渲染
|
|
2321
2369
|
}
|
|
2322
|
-
select(mainChartElement).selectAll('*').remove();
|
|
2323
|
-
select(legendsElement).selectAll('*').remove();
|
|
2324
2370
|
// 使用容器布局状态
|
|
2325
2371
|
var isNarrowLayout = this.isNarrowLayout;
|
|
2326
2372
|
// 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
|
|
@@ -2372,22 +2418,28 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
2372
2418
|
this.legendSvgHeight = legendStartY + legendsCount * legendItemHeight + 20;
|
|
2373
2419
|
this.width = Math.min(this.svgWidth, this.svgHeight);
|
|
2374
2420
|
this.height = this.svgHeight;
|
|
2421
|
+
select(mainChartElement).selectAll('*').remove();
|
|
2422
|
+
select(legendsElement).selectAll('*').remove();
|
|
2375
2423
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
2376
2424
|
var mainSvg = select(mainChartElement)
|
|
2377
2425
|
.append('svg')
|
|
2426
|
+
.attr('width', this.svgWidth)
|
|
2427
|
+
.attr('height', this.svgHeight)
|
|
2378
2428
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
2379
2429
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
2380
2430
|
.style('display', 'block')
|
|
2381
2431
|
.style('width', '100%')
|
|
2382
|
-
.style('height', '100%');
|
|
2432
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%');
|
|
2383
2433
|
if (legendsElement) {
|
|
2384
2434
|
this.legendsSvg = select(legendsElement)
|
|
2385
2435
|
.append('svg')
|
|
2436
|
+
.attr('width', this.legendSvgWidth)
|
|
2437
|
+
.attr('height', this.legendSvgHeight)
|
|
2386
2438
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
2387
2439
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
2388
2440
|
.style('display', 'block')
|
|
2389
2441
|
.style('width', '100%')
|
|
2390
|
-
.style('height', '100%');
|
|
2442
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
2391
2443
|
}
|
|
2392
2444
|
else {
|
|
2393
2445
|
this.legendsSvg = null;
|
|
@@ -2711,7 +2763,7 @@ __vue_render__$2._withStripped = true;
|
|
|
2711
2763
|
/* style */
|
|
2712
2764
|
var __vue_inject_styles__$2 = function (inject) {
|
|
2713
2765
|
if (!inject) { return }
|
|
2714
|
-
inject("data-v-c8322450_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
2766
|
+
inject("data-v-47043ace_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
2715
2767
|
|
|
2716
2768
|
};
|
|
2717
2769
|
/* scoped */
|
|
@@ -2773,6 +2825,8 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2773
2825
|
_this.resizeObserver = null;
|
|
2774
2826
|
_this.isFirstCheck = true;
|
|
2775
2827
|
_this.isLayoutChecking = false;
|
|
2828
|
+
_this.lastRenderedWidth = 0;
|
|
2829
|
+
_this.lastRenderedHeight = 0;
|
|
2776
2830
|
return _this;
|
|
2777
2831
|
}
|
|
2778
2832
|
Object.defineProperty(LineChart.prototype, "actualMargin", {
|
|
@@ -2790,7 +2844,6 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2790
2844
|
configurable: true
|
|
2791
2845
|
});
|
|
2792
2846
|
LineChart.prototype.onDataChanged = function () {
|
|
2793
|
-
this.beforeRedraw();
|
|
2794
2847
|
this.redraw();
|
|
2795
2848
|
};
|
|
2796
2849
|
LineChart.prototype.mounted = function () {
|
|
@@ -2814,6 +2867,9 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2814
2867
|
}
|
|
2815
2868
|
});
|
|
2816
2869
|
this.resizeObserver.observe(this.$el);
|
|
2870
|
+
if (this.$el.parentElement) {
|
|
2871
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
2872
|
+
}
|
|
2817
2873
|
}
|
|
2818
2874
|
// 首次渲染
|
|
2819
2875
|
requestAnimationFrame(function () {
|
|
@@ -2842,24 +2898,30 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2842
2898
|
_this.resizeTimer = null;
|
|
2843
2899
|
}, 200);
|
|
2844
2900
|
};
|
|
2901
|
+
LineChart.prototype.getLayoutSize = function () {
|
|
2902
|
+
var rect = this.$el.getBoundingClientRect();
|
|
2903
|
+
var parent = this.$el.parentElement;
|
|
2904
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
2905
|
+
};
|
|
2845
2906
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
2846
2907
|
LineChart.prototype.checkLayoutAndRedraw = function () {
|
|
2847
2908
|
var _this = this;
|
|
2848
|
-
var rect = this
|
|
2849
|
-
// 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
|
|
2909
|
+
var rect = this.getLayoutSize();
|
|
2850
2910
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
2851
2911
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
2852
2912
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
2913
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
2914
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
2915
|
+
return;
|
|
2916
|
+
}
|
|
2853
2917
|
this.isNarrowLayout = isNarrow;
|
|
2854
2918
|
if (layoutChanged) {
|
|
2855
2919
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
2856
2920
|
this.$nextTick(function () {
|
|
2857
|
-
_this.beforeRedraw();
|
|
2858
2921
|
_this.redraw();
|
|
2859
2922
|
});
|
|
2860
2923
|
}
|
|
2861
2924
|
else {
|
|
2862
|
-
this.beforeRedraw();
|
|
2863
2925
|
this.redraw();
|
|
2864
2926
|
}
|
|
2865
2927
|
};
|
|
@@ -2878,6 +2940,9 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2878
2940
|
if (this.showValue) {
|
|
2879
2941
|
this.renderData();
|
|
2880
2942
|
}
|
|
2943
|
+
var rect = this.getLayoutSize();
|
|
2944
|
+
this.lastRenderedWidth = rect.width;
|
|
2945
|
+
this.lastRenderedHeight = rect.height;
|
|
2881
2946
|
};
|
|
2882
2947
|
LineChart.prototype.init = function () {
|
|
2883
2948
|
var _this = this;
|
|
@@ -2891,10 +2956,6 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2891
2956
|
if (!mainChartElement) {
|
|
2892
2957
|
return; // 模板还未就绪,跳过渲染
|
|
2893
2958
|
}
|
|
2894
|
-
select(mainChartElement).selectAll('*').remove();
|
|
2895
|
-
if (legendsElement) {
|
|
2896
|
-
select(legendsElement).selectAll('*').remove();
|
|
2897
|
-
}
|
|
2898
2959
|
// 使用容器布局状态
|
|
2899
2960
|
var isNarrowLayout = this.isNarrowLayout;
|
|
2900
2961
|
// 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
|
|
@@ -2947,24 +3008,32 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
2947
3008
|
this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
|
|
2948
3009
|
this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
|
|
2949
3010
|
this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
|
|
3011
|
+
select(mainChartElement).selectAll('*').remove();
|
|
3012
|
+
if (legendsElement) {
|
|
3013
|
+
select(legendsElement).selectAll('*').remove();
|
|
3014
|
+
}
|
|
2950
3015
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
2951
3016
|
this.mainSvg = select(mainChartElement)
|
|
2952
3017
|
.append('svg')
|
|
3018
|
+
.attr('width', this.svgWidth)
|
|
3019
|
+
.attr('height', this.svgHeight)
|
|
2953
3020
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
2954
3021
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
2955
3022
|
.style('display', 'block')
|
|
2956
3023
|
.style('width', '100%')
|
|
2957
|
-
.style('height', '100%')
|
|
3024
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%')
|
|
2958
3025
|
.append('g')
|
|
2959
3026
|
.attr('transform', "translate(" + this.actualMargin.left + ", " + this.actualMargin.top + ")");
|
|
2960
3027
|
if (legendsElement) {
|
|
2961
3028
|
this.legendsSvg = select(legendsElement)
|
|
2962
3029
|
.append('svg')
|
|
3030
|
+
.attr('width', this.legendSvgWidth)
|
|
3031
|
+
.attr('height', this.legendSvgHeight)
|
|
2963
3032
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
2964
3033
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
2965
3034
|
.style('display', 'block')
|
|
2966
3035
|
.style('width', '100%')
|
|
2967
|
-
.style('height', '100%');
|
|
3036
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
2968
3037
|
}
|
|
2969
3038
|
else {
|
|
2970
3039
|
this.legendsSvg = null;
|
|
@@ -3455,7 +3524,7 @@ __vue_render__$3._withStripped = true;
|
|
|
3455
3524
|
/* style */
|
|
3456
3525
|
var __vue_inject_styles__$3 = function (inject) {
|
|
3457
3526
|
if (!inject) { return }
|
|
3458
|
-
inject("data-v-2b999d7a_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
3527
|
+
inject("data-v-35425756_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
3459
3528
|
|
|
3460
3529
|
};
|
|
3461
3530
|
/* scoped */
|
|
@@ -3510,10 +3579,11 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3510
3579
|
_this.resizeObserver = null;
|
|
3511
3580
|
_this.isFirstCheck = true;
|
|
3512
3581
|
_this.isLayoutChecking = false;
|
|
3582
|
+
_this.lastRenderedWidth = 0;
|
|
3583
|
+
_this.lastRenderedHeight = 0;
|
|
3513
3584
|
return _this;
|
|
3514
3585
|
}
|
|
3515
3586
|
FunnelChart.prototype.onDataChanged = function () {
|
|
3516
|
-
this.beforeRedraw();
|
|
3517
3587
|
this.redraw();
|
|
3518
3588
|
};
|
|
3519
3589
|
FunnelChart.prototype.mounted = function () {
|
|
@@ -3537,6 +3607,9 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3537
3607
|
}
|
|
3538
3608
|
});
|
|
3539
3609
|
this.resizeObserver.observe(this.$el);
|
|
3610
|
+
if (this.$el.parentElement) {
|
|
3611
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
3612
|
+
}
|
|
3540
3613
|
}
|
|
3541
3614
|
// 首次渲染
|
|
3542
3615
|
requestAnimationFrame(function () {
|
|
@@ -3565,24 +3638,30 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3565
3638
|
_this.resizeTimer = null;
|
|
3566
3639
|
}, 200);
|
|
3567
3640
|
};
|
|
3641
|
+
FunnelChart.prototype.getLayoutSize = function () {
|
|
3642
|
+
var rect = this.$el.getBoundingClientRect();
|
|
3643
|
+
var parent = this.$el.parentElement;
|
|
3644
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
3645
|
+
};
|
|
3568
3646
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
3569
3647
|
FunnelChart.prototype.checkLayoutAndRedraw = function () {
|
|
3570
3648
|
var _this = this;
|
|
3571
|
-
var rect = this
|
|
3572
|
-
// 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
|
|
3649
|
+
var rect = this.getLayoutSize();
|
|
3573
3650
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
3574
3651
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
3575
3652
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
3653
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
3654
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
3655
|
+
return;
|
|
3656
|
+
}
|
|
3576
3657
|
this.isNarrowLayout = isNarrow;
|
|
3577
3658
|
if (layoutChanged) {
|
|
3578
3659
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
3579
3660
|
this.$nextTick(function () {
|
|
3580
|
-
_this.beforeRedraw();
|
|
3581
3661
|
_this.redraw();
|
|
3582
3662
|
});
|
|
3583
3663
|
}
|
|
3584
3664
|
else {
|
|
3585
|
-
this.beforeRedraw();
|
|
3586
3665
|
this.redraw();
|
|
3587
3666
|
}
|
|
3588
3667
|
};
|
|
@@ -3590,6 +3669,9 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3590
3669
|
this.init();
|
|
3591
3670
|
this.renderFunnel();
|
|
3592
3671
|
this.renderLegend();
|
|
3672
|
+
var rect = this.getLayoutSize();
|
|
3673
|
+
this.lastRenderedWidth = rect.width;
|
|
3674
|
+
this.lastRenderedHeight = rect.height;
|
|
3593
3675
|
};
|
|
3594
3676
|
FunnelChart.prototype.init = function () {
|
|
3595
3677
|
var _this = this;
|
|
@@ -3616,8 +3698,6 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3616
3698
|
if (!mainChartElement || !legendsElement) {
|
|
3617
3699
|
return; // 模板还未就绪,跳过渲染
|
|
3618
3700
|
}
|
|
3619
|
-
select(mainChartElement).selectAll('*').remove();
|
|
3620
|
-
select(legendsElement).selectAll('*').remove();
|
|
3621
3701
|
// 使用容器布局状态
|
|
3622
3702
|
var isNarrowLayout = this.isNarrowLayout;
|
|
3623
3703
|
// 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
|
|
@@ -3709,22 +3789,28 @@ var FunnelChart = /** @class */ (function (_super) {
|
|
|
3709
3789
|
_this.refactoredData.push(temp);
|
|
3710
3790
|
}
|
|
3711
3791
|
});
|
|
3792
|
+
select(mainChartElement).selectAll('*').remove();
|
|
3793
|
+
select(legendsElement).selectAll('*').remove();
|
|
3712
3794
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
3713
3795
|
this.mainSvg = select(mainChartElement)
|
|
3714
3796
|
.append('svg')
|
|
3797
|
+
.attr('width', this.svgWidth)
|
|
3798
|
+
.attr('height', this.svgHeight)
|
|
3715
3799
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
3716
3800
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
3717
3801
|
.style('display', 'block')
|
|
3718
3802
|
.style('width', '100%')
|
|
3719
|
-
.style('height', '100%');
|
|
3803
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%');
|
|
3720
3804
|
if (legendsElement) {
|
|
3721
3805
|
this.legendsSvg = select(legendsElement)
|
|
3722
3806
|
.append('svg')
|
|
3807
|
+
.attr('width', this.legendSvgWidth)
|
|
3808
|
+
.attr('height', this.legendSvgHeight)
|
|
3723
3809
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
3724
3810
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
3725
3811
|
.style('display', 'block')
|
|
3726
3812
|
.style('width', '100%')
|
|
3727
|
-
.style('height', '100%');
|
|
3813
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
3728
3814
|
}
|
|
3729
3815
|
else {
|
|
3730
3816
|
this.legendsSvg = null;
|
|
@@ -3932,7 +4018,7 @@ __vue_render__$4._withStripped = true;
|
|
|
3932
4018
|
/* style */
|
|
3933
4019
|
var __vue_inject_styles__$4 = function (inject) {
|
|
3934
4020
|
if (!inject) { return }
|
|
3935
|
-
inject("data-v-09f079a3_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
4021
|
+
inject("data-v-6a42ee76_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
3936
4022
|
|
|
3937
4023
|
};
|
|
3938
4024
|
/* scoped */
|
|
@@ -4515,10 +4601,11 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4515
4601
|
_this.resizeObserver = null;
|
|
4516
4602
|
_this.isFirstCheck = true;
|
|
4517
4603
|
_this.isLayoutChecking = false;
|
|
4604
|
+
_this.lastRenderedWidth = 0;
|
|
4605
|
+
_this.lastRenderedHeight = 0;
|
|
4518
4606
|
return _this;
|
|
4519
4607
|
}
|
|
4520
4608
|
ScatterChart.prototype.onDataChanged = function () {
|
|
4521
|
-
this.beforeRedraw();
|
|
4522
4609
|
this.redraw();
|
|
4523
4610
|
};
|
|
4524
4611
|
ScatterChart.prototype.mounted = function () {
|
|
@@ -4542,6 +4629,9 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4542
4629
|
}
|
|
4543
4630
|
});
|
|
4544
4631
|
this.resizeObserver.observe(this.$el);
|
|
4632
|
+
if (this.$el.parentElement) {
|
|
4633
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
4634
|
+
}
|
|
4545
4635
|
}
|
|
4546
4636
|
// 首次渲染
|
|
4547
4637
|
requestAnimationFrame(function () {
|
|
@@ -4570,24 +4660,30 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4570
4660
|
_this.resizeTimer = null;
|
|
4571
4661
|
}, 200);
|
|
4572
4662
|
};
|
|
4663
|
+
ScatterChart.prototype.getLayoutSize = function () {
|
|
4664
|
+
var rect = this.$el.getBoundingClientRect();
|
|
4665
|
+
var parent = this.$el.parentElement;
|
|
4666
|
+
return { width: rect.width, height: (parent === null || parent === void 0 ? void 0 : parent.clientHeight) || rect.height };
|
|
4667
|
+
};
|
|
4573
4668
|
/** 检查容器高宽比,切换布局模式并重新渲染 */
|
|
4574
4669
|
ScatterChart.prototype.checkLayoutAndRedraw = function () {
|
|
4575
4670
|
var _this = this;
|
|
4576
|
-
var rect = this
|
|
4577
|
-
// 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
|
|
4671
|
+
var rect = this.getLayoutSize();
|
|
4578
4672
|
var isNarrow = rect.width > 0 && rect.height > 0
|
|
4579
4673
|
&& (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
|
|
4580
4674
|
var layoutChanged = isNarrow !== this.isNarrowLayout;
|
|
4675
|
+
if (!layoutChanged && Math.abs(rect.width - this.lastRenderedWidth) <= 1
|
|
4676
|
+
&& Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
|
|
4677
|
+
return;
|
|
4678
|
+
}
|
|
4581
4679
|
this.isNarrowLayout = isNarrow;
|
|
4582
4680
|
if (layoutChanged) {
|
|
4583
4681
|
// 布局模式切换后,等 CSS 生效再重新渲染
|
|
4584
4682
|
this.$nextTick(function () {
|
|
4585
|
-
_this.beforeRedraw();
|
|
4586
4683
|
_this.redraw();
|
|
4587
4684
|
});
|
|
4588
4685
|
}
|
|
4589
4686
|
else {
|
|
4590
|
-
this.beforeRedraw();
|
|
4591
4687
|
this.redraw();
|
|
4592
4688
|
}
|
|
4593
4689
|
};
|
|
@@ -4600,6 +4696,9 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4600
4696
|
if (this.groupings.length > 1 && this.categories.length > 0) {
|
|
4601
4697
|
this.renderLabel();
|
|
4602
4698
|
}
|
|
4699
|
+
var rect = this.getLayoutSize();
|
|
4700
|
+
this.lastRenderedWidth = rect.width;
|
|
4701
|
+
this.lastRenderedHeight = rect.height;
|
|
4603
4702
|
};
|
|
4604
4703
|
ScatterChart.prototype.init = function () {
|
|
4605
4704
|
var _this = this;
|
|
@@ -4613,10 +4712,6 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4613
4712
|
if (!mainChartElement) {
|
|
4614
4713
|
return; // 模板还未就绪,跳过渲染
|
|
4615
4714
|
}
|
|
4616
|
-
select(mainChartElement).selectAll('*').remove();
|
|
4617
|
-
if (legendsElement) {
|
|
4618
|
-
select(legendsElement).selectAll('*').remove();
|
|
4619
|
-
}
|
|
4620
4715
|
// 使用容器布局状态
|
|
4621
4716
|
var isNarrowLayout = this.isNarrowLayout;
|
|
4622
4717
|
// 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
|
|
@@ -4667,24 +4762,32 @@ var ScatterChart = /** @class */ (function (_super) {
|
|
|
4667
4762
|
this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
|
|
4668
4763
|
this.width = this.svgWidth - this.margin.left - this.margin.right;
|
|
4669
4764
|
this.height = this.svgHeight - this.margin.top - this.margin.bottom;
|
|
4765
|
+
select(mainChartElement).selectAll('*').remove();
|
|
4766
|
+
if (legendsElement) {
|
|
4767
|
+
select(legendsElement).selectAll('*').remove();
|
|
4768
|
+
}
|
|
4670
4769
|
// 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
|
|
4671
4770
|
this.mainSvg = select(mainChartElement)
|
|
4672
4771
|
.append('svg')
|
|
4772
|
+
.attr('width', this.svgWidth)
|
|
4773
|
+
.attr('height', this.svgHeight)
|
|
4673
4774
|
.attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
|
|
4674
4775
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
4675
4776
|
.style('display', 'block')
|
|
4676
4777
|
.style('width', '100%')
|
|
4677
|
-
.style('height', '100%')
|
|
4778
|
+
.style('height', isNarrowLayout ? this.svgHeight + "px" : '100%')
|
|
4678
4779
|
.append('g')
|
|
4679
4780
|
.attr('transform', "translate(" + this.margin.left + ", " + this.margin.top + ")");
|
|
4680
4781
|
if (legendsElement) {
|
|
4681
4782
|
this.legendsSvg = select(legendsElement)
|
|
4682
4783
|
.append('svg')
|
|
4784
|
+
.attr('width', this.legendSvgWidth)
|
|
4785
|
+
.attr('height', this.legendSvgHeight)
|
|
4683
4786
|
.attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
|
|
4684
4787
|
.attr('preserveAspectRatio', 'xMinYMin meet')
|
|
4685
4788
|
.style('display', 'block')
|
|
4686
4789
|
.style('width', '100%')
|
|
4687
|
-
.style('height', '100%');
|
|
4790
|
+
.style('height', isNarrowLayout ? 'auto' : '100%');
|
|
4688
4791
|
}
|
|
4689
4792
|
else {
|
|
4690
4793
|
this.legendsSvg = null;
|
|
@@ -5020,7 +5123,7 @@ __vue_render__$7._withStripped = true;
|
|
|
5020
5123
|
/* style */
|
|
5021
5124
|
var __vue_inject_styles__$7 = function (inject) {
|
|
5022
5125
|
if (!inject) { return }
|
|
5023
|
-
inject("data-v-d711764e_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
5126
|
+
inject("data-v-429fd9e9_0", { source: "@charset \"UTF-8\";\n/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.mo-chart {\n position: relative;\n width: 100%;\n height: 100%;\n font: 1rem sans-serif;\n text-align: center;\n}\n.mo-chart.x-scroll {\n overflow-x: scroll;\n}\n.mo-piece-active:active {\n opacity: 0.8;\n}\n.mo-inner-arc {\n fill: #000;\n opacity: 0.28;\n}\n.mo-inner-text {\n font-size: clamp(8px, 1vmin, 1.6rem);\n fill-opacity: 1;\n}\n.mo-summary-label {\n fill: #323233;\n}\n.mo-summary-value {\n fill: #00A383;\n}\n.mo-axis path {\n fill: none;\n stroke-width: 0;\n}\n.mo-space-line {\n stroke: #e4e7ed;\n stroke-width: 0.5px;\n}\n.mo-space-bold-line {\n stroke: #e4e5e9;\n stroke-width: 1px;\n}\n.mo-axis-point {\n fill: #abb4c7;\n}\n.mo-data-line {\n fill: none;\n stroke: #b8b8b8;\n stroke-width: 1.5px;\n}\n.mo-data-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #3e3f41;\n}\n.mo-axis-text {\n font-size: clamp(1rem, 1vmin, 1.2rem);\n fill: #323233;\n}\n.mo-axis-label {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-axis-div-label {\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-legend-text {\n font-size: clamp(1.2rem, 1vmin, 1.6rem);\n fill: #3e4759;\n}\n.mo-legend-percentage {\n font-size: 1.6rem;\n}\n.mo-label-inner {\n text-anchor: middle;\n font-size: clamp(1rem, 1vmin, 1.6rem);\n fill: #000;\n}\n.mo-gauge-back-arc {\n stroke-width: 6;\n stroke-linejoin: round;\n stroke: #f9f9f9;\n}\n.mo-gauge-value {\n text-anchor: middle;\n fill: #323233;\n}\n.mo-gauge-range {\n font-size: 1.6rem;\n fill: #323233;\n text-anchor: middle;\n}\n.mo-gauge-max-value {\n font-size: 1.4rem;\n fill: #3e4759;\n text-anchor: middle;\n}\n.mo-gauge-value-arc {\n stroke-width: 6;\n stroke: url(#MoGaugeGradient);\n stroke-linejoin: round;\n}\n.mo-gauge-inner-arc {\n fill: #6e71ca;\n}\n.mo-gauge-tick {\n stroke: #323233;\n stroke-width: 0.5;\n}\n.mo-gauge-pointer {\n fill: #323233;\n}\n\n/* line */\n.mo-line-area {\n fill: url(#MoLineAreaGradient);\n stroke-width: 0;\n opacity: 0.6;\n}\n.mo-line-point {\n fill: #00A383;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n/* rotate */\n.mo-tip-container {\n width: 100%;\n height: 40px;\n line-height: 40px;\n border-radius: 18px;\n border: 1px solid #c5c7c9;\n margin: -5px 0 10px 0;\n}\n.mo-tip-pointer {\n position: relative;\n top: -40px;\n width: 100%;\n}\n.mo-triangle-mark {\n position: relative;\n top: 22px;\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid white;\n}\n.mo-triangle {\n margin-right: auto;\n margin-left: auto;\n height: 20px;\n width: 20px;\n border: 10px solid transparent;\n border-bottom: 10px solid #c5c7c9;\n}\n.mo-tip-content {\n position: relative;\n text-align: center;\n font-size: 1.4rem;\n color: #3e4759;\n}\n.mo-tip-content:before {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #c5c7c9;\n position: absolute;\n top: -20px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content:after {\n width: 0px;\n height: 0px;\n border: 10px transparent solid;\n border-bottom-color: #fff;\n position: absolute;\n top: -18px;\n left: calc(50% - 10px);\n content: \"\";\n}\n.mo-tip-content .left-nav {\n width: 15%;\n float: left;\n}\n.mo-tip-content .left-nav img {\n -webkit-transform: rotate(180deg);\n -moz-transform: rotate(180deg);\n transform: rotate(180deg);\n margin-top: 10px;\n}\n.mo-tip-content .right-nav {\n width: 15%;\n float: right;\n}\n.mo-tip-content .right-nav img {\n margin-top: 10px;\n}\n.mo-tip-content .tip {\n width: 70%;\n max-width: 70%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n float: left;\n}\n.mo-tip-content .tip .label {\n margin-left: 10px;\n}\n.mo-metric {\n width: 100%;\n height: 100%;\n color: #323233;\n}\n.mo-metric .mo-metric-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n.mo-metric .mo-metric-label, .mo-metric .mo-metric-value {\n width: 100%;\n}\n.mo-metric .mo-metric-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 2.4rem;\n}\n.mo-metric .mo-metric-value {\n padding-right: 5px;\n font-size: clamp(4rem, 4rem + 2vw, 6rem);\n font-weight: 500;\n word-break: break-word;\n}\n.mo-table {\n width: 100%;\n height: 100%;\n}\n.mo-table .mo-table-row {\n color: #323233;\n position: relative;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.header-row {\n background-color: #00A383;\n color: #fff;\n font-weight: 700;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell {\n position: relative;\n}\n.mo-table .mo-table-row.header-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #39a393;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row.header-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #c8cacc;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell {\n display: inline-block;\n box-sizing: border-box;\n font-size: 1.6rem;\n height: 30px;\n line-height: 30px;\n text-align: left;\n padding: 0 5px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: relative;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #e3e5e8;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mo-table .mo-table-row .mo-table-cell .header-label.have-sort {\n padding-right: 16px;\n}\n.mo-table .mo-table-row .mo-table-cell .sort-icon {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n height: 100%;\n justify-content: flex-end;\n align-items: center;\n}\n.mo-table .mo-table-row .mo-table-cell .mo-table-cell-check, .mo-table .mo-table-row .mo-table-cell .mo-table-cell-uncheck {\n font-size: 2.2rem;\n position: relative;\n top: 10px;\n}\n.mo-table .mo-table-row .mo-table-right-cell {\n text-align: right;\n}\n.mo-table .mo-table-row .mo-table-checkbox-cell {\n width: 18px;\n margin-top: 7.5px;\n}\n\n/* TableChart */\n.table-chart-container {\n display: flex;\n flex-direction: column;\n height: auto !important;\n margin: auto 0;\n}\n.table-chart-container .mo-table {\n height: auto;\n max-height: 100%;\n overflow-y: auto;\n}\n.mo-label-line {\n stroke: #c8cacc;\n stroke-width: 0.5px;\n}\n.mo-label-title {\n font-size: clamp(1.4rem, 1vmin, 1.8rem);\n fill: #3e4759;\n text-anchor: start;\n}\n.mo-cover {\n width: calc(100% + 20px);\n}\n.mo-gauge-inner-bg-arc {\n fill: #fff;\n}\n.chart-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n}\n.chart-container.chart-having-tips {\n flex-direction: column;\n}\n.chart-container .chart-and-legends {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n min-height: 0;\n}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 0;\n max-height: 600px;\n margin: auto 0;\n}\n.chart-container .chart-legends {\n width: 20%;\n height: 100%;\n overflow-y: auto;\n min-height: 0;\n}\n\n/* LineChart 左右布局下图例默认占 20% 宽度(窄屏布局下由 narrow-layout 覆盖为 100%) */\n.line-chart-container .chart-legends {\n width: 20%;\n}\n\n/* 窄屏布局: 容器高宽比 >= 阈值时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\n.bar-chart-container.narrow-layout,\n.bar-chart-horizontal-container.narrow-layout,\n.line-chart-container.narrow-layout,\n.scatter-chart-container.narrow-layout {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.bar-chart-container.narrow-layout .chart-and-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-and-legends,\n.line-chart-container.narrow-layout .chart-and-legends,\n.scatter-chart-container.narrow-layout .chart-and-legends {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart,\n.bar-chart-horizontal-container.narrow-layout .main-chart,\n.line-chart-container.narrow-layout .main-chart,\n.scatter-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.bar-chart-container.narrow-layout .main-chart > svg,\n.bar-chart-horizontal-container.narrow-layout .main-chart > svg,\n.line-chart-container.narrow-layout .main-chart > svg,\n.scatter-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.bar-chart-container.narrow-layout .chart-legends,\n.bar-chart-horizontal-container.narrow-layout .chart-legends,\n.line-chart-container.narrow-layout .chart-legends,\n.scatter-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* FunnelChart / PieChart 没有 .chart-and-legends 包裹层,main-chart 与 chart-legends 为直接子元素 */\n.funnel-chart-container.narrow-layout,\n.pie-chart-container.narrow-layout {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: none;\n height: auto;\n min-height: 0;\n max-height: none;\n margin: 0;\n width: 100%;\n}\n.funnel-chart-container.narrow-layout .main-chart > svg,\n.pie-chart-container.narrow-layout .main-chart > svg {\n height: auto;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n flex: none;\n height: auto;\n width: 100%;\n min-height: 0;\n max-height: 200px;\n overflow-y: auto;\n}\n.chart-limit-tips {\n padding: 0.5rem;\n width: 100%;\n min-height: 3rem;\n color: #eda762;\n font-size: clamp(1.4rem, 1vmin, 1.6rem);\n text-align: left;\n display: flex;\n align-items: center;\n}\n@media (prefers-color-scheme: dark) {\n.mo-axis-label,\n .mo-axis-text,\n .mo-axis-number,\n .mo-axis-div-label,\n .mo-summary-label,\n .mo-legend-text,\n .mo-label-title {\n fill: #f2f2f7;\n}\n.mo-table .mo-table-row {\n color: #f2f2f7;\n}\n.mo-table .mo-table-row:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 50% 100%;\n left: 0;\n bottom: 0;\n height: 1px;\n width: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:after {\n transform: scaleY(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform: scaleY(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:after {\n transform-origin: 33% 66%;\n}\n.mo-table .mo-table-row:before {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #646466;\n display: block;\n z-index: 15;\n transform-origin: 0% 50%;\n left: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row:before {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row:before {\n transform-origin: 0% 33%;\n}\n.mo-table .mo-table-row.total-row {\n background-color: #2c2c2e;\n color: #f2f2f7;\n font-weight: 700;\n}\n.mo-table .mo-table-row .mo-table-cell:after {\n content: \"\";\n position: absolute;\n bottom: auto;\n right: auto;\n background-color: #444447;\n display: block;\n z-index: 15;\n transform-origin: 100% 50%;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n}\n.pixel-ratio-2 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.5);\n}\n.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform: scaleX(0.33);\n}\n.android.pixel-ratio-3 .mo-table .mo-table-row .mo-table-cell:after {\n transform-origin: 66% 33%;\n}\n.mo-tip-content .tip .label {\n color: #f2f2f7;\n}\n.mo-metric .mo-metric-label {\n color: #6e6e6e;\n}\n.mo-metric .mo-metric-value {\n color: #f2f2f7;\n}\n.mo-axis-div-label {\n fill: #f2f2f7;\n}\n.mo-gauge-value {\n fill: #f2f2f7;\n}\n.mo-gauge-max-value {\n fill: #f2f2f7;\n}\n.mo-gauge-tick {\n stroke: #fff;\n}\n.mo-gauge-pointer {\n fill: #fff;\n}\n.mo-gauge-inner-bg-arc {\n fill: #1c1c1e;\n}\n.mo-gauge-back-arc {\n stroke: #2c2c2e;\n}\n}", map: undefined, media: undefined });
|
|
5024
5127
|
|
|
5025
5128
|
};
|
|
5026
5129
|
/* scoped */
|
|
@@ -5528,7 +5631,7 @@ var DashboardDataConvertor = /** @class */ (function (_super) {
|
|
|
5528
5631
|
};
|
|
5529
5632
|
DashboardDataConvertor.prototype.refactorMetadata = function (metadata, data) {
|
|
5530
5633
|
var newMetadata = {};
|
|
5531
|
-
var _a = data.reportResult || {}, reportMetadata = _a.reportMetadata, reportExtendedMetadata = _a.reportExtendedMetadata;
|
|
5634
|
+
var _a = (data && data.reportResult) || {}, reportMetadata = _a.reportMetadata, reportExtendedMetadata = _a.reportExtendedMetadata;
|
|
5532
5635
|
var properties = metadata.properties;
|
|
5533
5636
|
if (reportMetadata) {
|
|
5534
5637
|
newMetadata.reportId = reportMetadata.id;
|
|
@@ -5598,7 +5701,7 @@ var DashboardDataConvertor = /** @class */ (function (_super) {
|
|
|
5598
5701
|
return newMetadata;
|
|
5599
5702
|
};
|
|
5600
5703
|
DashboardDataConvertor.prototype.refactorData = function (metadata, data) {
|
|
5601
|
-
var reportResult = data.reportResult;
|
|
5704
|
+
var reportResult = (data || {}).reportResult;
|
|
5602
5705
|
var properties = metadata.properties;
|
|
5603
5706
|
var newData;
|
|
5604
5707
|
if (properties && properties.visualizationType === 'RichText') {
|
|
@@ -6103,8 +6206,8 @@ var ReportDataConvertor = /** @class */ (function (_super) {
|
|
|
6103
6206
|
this.tableData = this.refactorTableData(reportData);
|
|
6104
6207
|
};
|
|
6105
6208
|
ReportDataConvertor.prototype.refactorMetadata = function (reportData) {
|
|
6106
|
-
var reportMetadata =
|
|
6107
|
-
var groupingColumnInfo =
|
|
6209
|
+
var _a = reportData || {}, reportMetadata = _a.reportMetadata, reportExtendedMetadata = _a.reportExtendedMetadata;
|
|
6210
|
+
var _b = reportExtendedMetadata || {}, groupingColumnInfo = _b.groupingColumnInfo, aggregateColumnInfo = _b.aggregateColumnInfo;
|
|
6108
6211
|
var chart = reportMetadata.chart, currency = reportMetadata.currency;
|
|
6109
6212
|
if (!chart) {
|
|
6110
6213
|
return {
|
|
@@ -6155,9 +6258,9 @@ var ReportDataConvertor = /** @class */ (function (_super) {
|
|
|
6155
6258
|
};
|
|
6156
6259
|
ReportDataConvertor.prototype.refactorData = function (reportData) {
|
|
6157
6260
|
var _this = this;
|
|
6158
|
-
var factMap =
|
|
6159
|
-
var chart =
|
|
6160
|
-
var groupings = groupingsDown.groupings;
|
|
6261
|
+
var _a = reportData || {}, factMap = _a.factMap, reportMetadata = _a.reportMetadata, groupingsDown = _a.groupingsDown;
|
|
6262
|
+
var _b = reportMetadata || {}, chart = _b.chart, aggregates = _b.aggregates, metaGroupingsDown = _b.groupingsDown;
|
|
6263
|
+
var groupings = (groupingsDown || {}).groupings;
|
|
6161
6264
|
var pieces = [];
|
|
6162
6265
|
if (chart) {
|
|
6163
6266
|
var chartGroupings = chart.groupings, summaries_1 = chart.summaries;
|
|
@@ -6286,8 +6389,8 @@ var ReportDataConvertor = /** @class */ (function (_super) {
|
|
|
6286
6389
|
return 1;
|
|
6287
6390
|
};
|
|
6288
6391
|
ReportDataConvertor.prototype.refactorTableData = function (reportData) {
|
|
6289
|
-
var reportMetadata = reportData.reportMetadata;
|
|
6290
|
-
var reportFormat = reportMetadata.reportFormat;
|
|
6392
|
+
var reportMetadata = (reportData || {}).reportMetadata;
|
|
6393
|
+
var reportFormat = (reportMetadata || {}).reportFormat;
|
|
6291
6394
|
if (reportFormat === 'MATRIX') {
|
|
6292
6395
|
return this.convertMatrix(reportData);
|
|
6293
6396
|
}
|