moblor-vue 0.1.78 → 0.1.80

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.
@@ -333,6 +333,10 @@ var MoBarChart = /** @class */ (function (_super) {
333
333
  var _this = _super !== null && _super.apply(this, arguments) || this;
334
334
  // 常量定义
335
335
  _this.TITLE_HEIGHT = 20;
336
+ _this.LEGEND_ITEM_HEIGHT = 25;
337
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
338
+ // 布局切换阈值: 容器高宽比 >= 1.8 时使用上下布局,否则左右布局
339
+ _this.NARROW_ASPECT_RATIO = 1.8;
336
340
  _this.MIN_WIDTH = 20;
337
341
  _this.svgWidth = 0;
338
342
  _this.svgHeight = 0;
@@ -355,6 +359,11 @@ var MoBarChart = /** @class */ (function (_super) {
355
359
  _this.labelGroup = null;
356
360
  _this.displayData = [];
357
361
  _this.maxDisplayCount = 20;
362
+ _this.isNarrowLayout = false;
363
+ _this.resizeTimer = null;
364
+ _this.resizeObserver = null;
365
+ _this.isFirstCheck = true;
366
+ _this.isLayoutChecking = false;
358
367
  return _this;
359
368
  }
360
369
  Object.defineProperty(MoBarChart.prototype, "actualMargin", {
@@ -393,7 +402,74 @@ var MoBarChart = /** @class */ (function (_super) {
393
402
  this.redraw();
394
403
  };
395
404
  MoBarChart.prototype.mounted = function () {
396
- this.redraw();
405
+ var _this = this;
406
+ window.addEventListener('resize', this.handleResize);
407
+ // 使用 ResizeObserver 监听容器宽度变化,实现基于容器宽度的布局切换
408
+ if (typeof ResizeObserver !== 'undefined') {
409
+ this.resizeObserver = new ResizeObserver(function () {
410
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
411
+ if (_this.isFirstCheck) {
412
+ _this.isFirstCheck = false;
413
+ return;
414
+ }
415
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
416
+ if (!_this.isLayoutChecking) {
417
+ _this.isLayoutChecking = true;
418
+ requestAnimationFrame(function () {
419
+ _this.isLayoutChecking = false;
420
+ _this.checkLayoutAndRedraw();
421
+ });
422
+ }
423
+ });
424
+ this.resizeObserver.observe(this.$el);
425
+ }
426
+ // 首次渲染
427
+ requestAnimationFrame(function () {
428
+ _this.isFirstCheck = false;
429
+ _this.checkLayoutAndRedraw();
430
+ });
431
+ };
432
+ MoBarChart.prototype.beforeDestroy = function () {
433
+ window.removeEventListener('resize', this.handleResize);
434
+ if (this.resizeTimer) {
435
+ clearTimeout(this.resizeTimer);
436
+ this.resizeTimer = null;
437
+ }
438
+ if (this.resizeObserver) {
439
+ this.resizeObserver.disconnect();
440
+ this.resizeObserver = null;
441
+ }
442
+ };
443
+ MoBarChart.prototype.handleResize = function () {
444
+ var _this = this;
445
+ if (this.resizeTimer) {
446
+ clearTimeout(this.resizeTimer);
447
+ }
448
+ this.resizeTimer = setTimeout(function () {
449
+ _this.checkLayoutAndRedraw();
450
+ _this.resizeTimer = null;
451
+ }, 200);
452
+ };
453
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
454
+ MoBarChart.prototype.checkLayoutAndRedraw = function () {
455
+ var _this = this;
456
+ var rect = this.$el.getBoundingClientRect();
457
+ // 高宽比 >= 1.5 时使用上下布局(竖屏/瘦高容器)
458
+ var isNarrow = rect.width > 0 && rect.height > 0
459
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
460
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
461
+ this.isNarrowLayout = isNarrow;
462
+ if (layoutChanged) {
463
+ // 布局模式切换后,等 CSS 生效再重新渲染
464
+ this.$nextTick(function () {
465
+ _this.beforeRedraw();
466
+ _this.redraw();
467
+ });
468
+ }
469
+ else {
470
+ this.beforeRedraw();
471
+ this.redraw();
472
+ }
397
473
  };
398
474
  MoBarChart.prototype.redraw = function () {
399
475
  this.init();
@@ -408,9 +484,11 @@ var MoBarChart = /** @class */ (function (_super) {
408
484
  if (this.hasLineChart) {
409
485
  this.renderLine(data);
410
486
  }
411
- // 清除现有的标签
412
- this.labelGroup.selectAll('*').remove();
413
- this.labelGroup.attr('transform', 'translate(0, 0)');
487
+ // 清除现有的标签(仅在有 legends 容器时)
488
+ if (this.labelGroup) {
489
+ this.labelGroup.selectAll('*').remove();
490
+ this.labelGroup.attr('transform', 'translate(0, 0)');
491
+ }
414
492
  if (this.categories.length > 0
415
493
  || (!this.hasLineChart && this.aggregates.length > 1)) {
416
494
  this.renderLabel();
@@ -430,36 +508,94 @@ var MoBarChart = /** @class */ (function (_super) {
430
508
  // 清除现有的SVG
431
509
  var mainChartElement = this.$el.querySelector('.main-chart');
432
510
  var legendsElement = this.$el.querySelector('.chart-legends');
511
+ if (!mainChartElement) {
512
+ return; // 模板还未就绪,跳过渲染
513
+ }
433
514
  select(mainChartElement).selectAll('*').remove();
434
- select(legendsElement).selectAll('*').remove();
435
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
436
- ? mainChartElement.clientWidth : 300;
437
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
438
- ? mainChartElement.clientHeight : 300;
439
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
440
- ? legendsElement.clientWidth : 150;
441
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
442
- ? legendsElement.clientHeight : this.svgHeight;
515
+ if (legendsElement) {
516
+ select(legendsElement).selectAll('*').remove();
517
+ }
518
+ // 使用容器布局状态
519
+ var isNarrowLayout = this.isNarrowLayout;
520
+ // 主图尺寸
521
+ var mainRect = mainChartElement.getBoundingClientRect();
522
+ if (mainRect.width > 0) {
523
+ this.svgWidth = mainRect.width;
524
+ }
525
+ else if (mainChartElement.clientWidth > 0) {
526
+ this.svgWidth = mainChartElement.clientWidth;
527
+ }
528
+ else {
529
+ this.svgWidth = 300;
530
+ }
531
+ if (mainRect.height > 0) {
532
+ this.svgHeight = mainRect.height;
533
+ }
534
+ else if (isNarrowLayout) {
535
+ this.svgHeight = 280;
536
+ }
537
+ else if (mainChartElement.clientHeight > 0) {
538
+ this.svgHeight = mainChartElement.clientHeight;
539
+ }
540
+ else {
541
+ this.svgHeight = 300;
542
+ }
543
+ // Legends 宽度 - 仅在存在 legends 容器时计算
544
+ if (legendsElement) {
545
+ var legendsRect = legendsElement.getBoundingClientRect();
546
+ if (legendsRect.width > 0) {
547
+ this.legendSvgWidth = legendsRect.width;
548
+ }
549
+ else if (legendsElement.clientWidth > 0) {
550
+ this.legendSvgWidth = legendsElement.clientWidth;
551
+ }
552
+ else {
553
+ // 根据布局模式估算宽度
554
+ var containerWidth = this.$el.getBoundingClientRect().width;
555
+ if (isNarrowLayout) {
556
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
557
+ }
558
+ else {
559
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.33 : 150;
560
+ }
561
+ }
562
+ }
563
+ // Legends 高度 - 始终基于图例数量计算
564
+ var legendsCount = this.getLegendsCount();
565
+ var itemHeight = isNarrowLayout ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
566
+ this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
443
567
  this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
444
568
  this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
445
- // 创建新的SVG
569
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
446
570
  var mainSvg = select(mainChartElement)
447
571
  .append('svg')
448
- .attr('width', this.svgWidth)
449
- .attr('height', this.svgHeight);
450
- var legendsSvg = select(legendsElement)
451
- .append('svg')
452
- .attr('width', this.legendSvgWidth)
453
- .attr('height', this.legendSvgHeight);
572
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
573
+ .attr('preserveAspectRatio', 'xMinYMin meet')
574
+ .style('display', 'block')
575
+ .style('width', '100%')
576
+ .style('height', '100%');
577
+ var legendsSvg = null;
578
+ if (legendsElement) {
579
+ // Legends SVG: viewBox 宽度 = 容器实际宽度,确保文字截断基于真实宽度
580
+ legendsSvg = select(legendsElement)
581
+ .append('svg')
582
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
583
+ .attr('preserveAspectRatio', 'xMinYMin meet')
584
+ .style('display', 'block')
585
+ .style('width', '100%')
586
+ .style('height', '100%');
587
+ }
454
588
  // 创建图表组
455
589
  this.svg = mainSvg
456
590
  .append('g')
457
591
  .attr('class', 'chart-group')
458
592
  .attr('transform', "translate(" + this.actualMargin.left + ", " + this.actualMargin.top + ")");
459
- // 创建注解组
460
- this.labelGroup = legendsSvg
461
- .append('g')
462
- .attr('class', 'label-group');
593
+ // 创建注解组(仅在存在 legends 容器时)
594
+ if (legendsSvg) {
595
+ this.labelGroup = legendsSvg
596
+ .append('g')
597
+ .attr('class', 'label-group');
598
+ }
463
599
  // 配置x轴比例尺
464
600
  this.xAxisScale = scaleBand()
465
601
  .domain(this.displayData.map(function (d) { return d.label; }))
@@ -965,9 +1101,24 @@ var MoBarChart = /** @class */ (function (_super) {
965
1101
  return "rotate(-90, " + textX + ", " + textY + ")";
966
1102
  });
967
1103
  };
1104
+ MoBarChart.prototype.getLegendsCount = function () {
1105
+ if (this.categories.length > 0) {
1106
+ return this.categories.length;
1107
+ }
1108
+ if (!this.hasLineChart && this.aggregates.length > 1) {
1109
+ return this.aggregates.length;
1110
+ }
1111
+ return this.aggregates.length > 0 ? 1 : 0;
1112
+ };
968
1113
  MoBarChart.prototype.renderLabel = function () {
969
1114
  var _this = this;
970
1115
  var _a;
1116
+ if (!this.labelGroup) {
1117
+ return; // 没有 legends 容器,跳过渲染
1118
+ }
1119
+ var itemHeight = this.isNarrowLayout
1120
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
1121
+ : this.LEGEND_ITEM_HEIGHT;
971
1122
  // 添加标题
972
1123
  var currentY = 0;
973
1124
  if ((_a = this.groupings[1]) === null || _a === void 0 ? void 0 : _a.label) {
@@ -1004,13 +1155,13 @@ var MoBarChart = /** @class */ (function (_super) {
1004
1155
  .attr('width', 15)
1005
1156
  .attr('height', 15)
1006
1157
  .attr('x', 10)
1007
- .attr('y', function (d, i) { return currentY + i * 25; })
1158
+ .attr('y', function (d, i) { return currentY + i * itemHeight; })
1008
1159
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
1009
1160
  // 图例文本
1010
1161
  if (this.categories.length > 0) {
1011
1162
  legends.append('text')
1012
1163
  .attr('x', 35)
1013
- .attr('y', function (d, i) { return currentY + 12 + i * 25; })
1164
+ .attr('y', function (d, i) { return currentY + 12 + i * itemHeight; })
1014
1165
  .attr('class', 'mo-legend-text')
1015
1166
  .text(function (d) { return ChartService
1016
1167
  .formatDomainValue(d, _this.legendSvgWidth - 35, false); });
@@ -1018,11 +1169,22 @@ var MoBarChart = /** @class */ (function (_super) {
1018
1169
  else if (!this.hasLineChart && this.aggregates.length > 1) {
1019
1170
  legends.append('text')
1020
1171
  .attr('x', 35)
1021
- .attr('y', function (d, i) { return currentY + 12 + i * 25; })
1172
+ .attr('y', function (d, i) { return currentY + 12 + i * itemHeight; })
1022
1173
  .attr('class', 'mo-legend-text')
1023
1174
  .text(function (d) { return ChartService
1024
1175
  .formatDomainValue(d.label, _this.legendSvgWidth, false); });
1025
1176
  }
1177
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
1178
+ var legendsCount = legendsData.length;
1179
+ var newHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
1180
+ this.legendSvgHeight = newHeight;
1181
+ var legendsElement = this.$el.querySelector('.chart-legends');
1182
+ if (legendsElement) {
1183
+ var legendsSvg = legendsElement.querySelector('svg');
1184
+ if (legendsSvg) {
1185
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
1186
+ }
1187
+ }
1026
1188
  };
1027
1189
  var _a;
1028
1190
  __decorate([
@@ -1213,20 +1375,34 @@ var __vue_render__ = function () {
1213
1375
  _vm.groupType === "stacked" ||
1214
1376
  _vm.groupType === "stacked100" ||
1215
1377
  (!_vm.hasLineChart && _vm.aggregates.length > 1)
1216
- ? _c("div", { staticClass: "chart-container chart-having-tips" }, [
1217
- _vm._m(0),
1218
- _vm._v(" "),
1219
- _vm.data.length > 20
1220
- ? _c("div", { staticClass: "chart-limit-tips" }, [
1221
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1222
- : _vm._e() ])
1223
- : _c("div", { staticClass: "chart-container chart-having-tips" }, [
1224
- _c("div", { staticClass: "main-chart" }),
1225
- _vm._v(" "),
1226
- _vm.data.length > 20
1227
- ? _c("div", { staticClass: "chart-limit-tips" }, [
1228
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1229
- : _vm._e() ])
1378
+ ? _c(
1379
+ "div",
1380
+ {
1381
+ staticClass: "chart-container chart-having-tips bar-chart-container",
1382
+ class: { "narrow-layout": _vm.isNarrowLayout },
1383
+ },
1384
+ [
1385
+ _vm._m(0),
1386
+ _vm._v(" "),
1387
+ _vm.data.length > 20
1388
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
1389
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1390
+ : _vm._e() ]
1391
+ )
1392
+ : _c(
1393
+ "div",
1394
+ {
1395
+ staticClass: "chart-container chart-having-tips bar-chart-container",
1396
+ class: { "narrow-layout": _vm.isNarrowLayout },
1397
+ },
1398
+ [
1399
+ _c("div", { staticClass: "main-chart" }),
1400
+ _vm._v(" "),
1401
+ _vm.data.length > 20
1402
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
1403
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1404
+ : _vm._e() ]
1405
+ )
1230
1406
  };
1231
1407
  var __vue_staticRenderFns__ = [
1232
1408
  function () {
@@ -1243,7 +1419,7 @@ __vue_render__._withStripped = true;
1243
1419
  /* style */
1244
1420
  var __vue_inject_styles__ = function (inject) {
1245
1421
  if (!inject) { return }
1246
- inject("data-v-04b7eb40_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
1247
1423
 
1248
1424
  };
1249
1425
  /* scoped */
@@ -1296,6 +1472,17 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1296
1472
  _this.barOffsetY = 7;
1297
1473
  _this.displayData = [];
1298
1474
  _this.maxDisplayCount = 20;
1475
+ // 常量定义
1476
+ _this.TITLE_HEIGHT = 15;
1477
+ _this.LEGEND_ITEM_HEIGHT = 25;
1478
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
1479
+ // 布局切换阈值: 容器高宽比 >= 1.8 时使用上下布局,否则左右布局
1480
+ _this.NARROW_ASPECT_RATIO = 1.8;
1481
+ _this.isNarrowLayout = false;
1482
+ _this.resizeTimer = null;
1483
+ _this.resizeObserver = null;
1484
+ _this.isFirstCheck = true;
1485
+ _this.isLayoutChecking = false;
1299
1486
  return _this;
1300
1487
  }
1301
1488
  Object.defineProperty(MoBarChartHorizontal.prototype, "actualMargin", {
@@ -1314,7 +1501,74 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1314
1501
  this.redraw();
1315
1502
  };
1316
1503
  MoBarChartHorizontal.prototype.mounted = function () {
1317
- this.redraw();
1504
+ var _this = this;
1505
+ window.addEventListener('resize', this.handleResize);
1506
+ // 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
1507
+ if (typeof ResizeObserver !== 'undefined') {
1508
+ this.resizeObserver = new ResizeObserver(function () {
1509
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
1510
+ if (_this.isFirstCheck) {
1511
+ _this.isFirstCheck = false;
1512
+ return;
1513
+ }
1514
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
1515
+ if (!_this.isLayoutChecking) {
1516
+ _this.isLayoutChecking = true;
1517
+ requestAnimationFrame(function () {
1518
+ _this.isLayoutChecking = false;
1519
+ _this.checkLayoutAndRedraw();
1520
+ });
1521
+ }
1522
+ });
1523
+ this.resizeObserver.observe(this.$el);
1524
+ }
1525
+ // 首次渲染
1526
+ requestAnimationFrame(function () {
1527
+ _this.isFirstCheck = false;
1528
+ _this.checkLayoutAndRedraw();
1529
+ });
1530
+ };
1531
+ MoBarChartHorizontal.prototype.beforeDestroy = function () {
1532
+ window.removeEventListener('resize', this.handleResize);
1533
+ if (this.resizeTimer) {
1534
+ clearTimeout(this.resizeTimer);
1535
+ this.resizeTimer = null;
1536
+ }
1537
+ if (this.resizeObserver) {
1538
+ this.resizeObserver.disconnect();
1539
+ this.resizeObserver = null;
1540
+ }
1541
+ };
1542
+ MoBarChartHorizontal.prototype.handleResize = function () {
1543
+ var _this = this;
1544
+ if (this.resizeTimer) {
1545
+ clearTimeout(this.resizeTimer);
1546
+ }
1547
+ this.resizeTimer = setTimeout(function () {
1548
+ _this.checkLayoutAndRedraw();
1549
+ _this.resizeTimer = null;
1550
+ }, 200);
1551
+ };
1552
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
1553
+ MoBarChartHorizontal.prototype.checkLayoutAndRedraw = function () {
1554
+ var _this = this;
1555
+ var rect = this.$el.getBoundingClientRect();
1556
+ // 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
1557
+ var isNarrow = rect.width > 0 && rect.height > 0
1558
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
1559
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
1560
+ this.isNarrowLayout = isNarrow;
1561
+ if (layoutChanged) {
1562
+ // 布局模式切换后,等 CSS 生效再重新渲染
1563
+ this.$nextTick(function () {
1564
+ _this.beforeRedraw();
1565
+ _this.redraw();
1566
+ });
1567
+ }
1568
+ else {
1569
+ this.beforeRedraw();
1570
+ this.redraw();
1571
+ }
1318
1572
  };
1319
1573
  MoBarChartHorizontal.prototype.redraw = function () {
1320
1574
  this.init();
@@ -1331,9 +1585,11 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1331
1585
  && this.aggregates.length <= 1) {
1332
1586
  this.renderData(data);
1333
1587
  }
1334
- // 清除现有的标签
1335
- this.labelGroup.selectAll('*').remove();
1336
- this.labelGroup.attr('transform', 'translate(0, 0)');
1588
+ // 清除现有的标签(仅在有 legends 容器时)
1589
+ if (this.labelGroup) {
1590
+ this.labelGroup.selectAll('*').remove();
1591
+ this.labelGroup.attr('transform', 'translate(0, 0)');
1592
+ }
1337
1593
  if (this.categories.length > 0) {
1338
1594
  this.renderLabel();
1339
1595
  }
@@ -1364,27 +1620,81 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1364
1620
  // 清除现有的SVG
1365
1621
  var mainChartElement = this.$el.querySelector('.main-chart');
1366
1622
  var legendsElement = this.$el.querySelector('.chart-legends');
1623
+ if (!mainChartElement) {
1624
+ return; // 模板还未就绪,跳过渲染
1625
+ }
1367
1626
  select(mainChartElement).selectAll('*').remove();
1368
- select(legendsElement).selectAll('*').remove();
1369
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
1370
- ? mainChartElement.clientWidth : 300;
1371
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
1372
- ? mainChartElement.clientHeight : 300;
1373
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
1374
- ? legendsElement.clientWidth : 150;
1375
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
1376
- ? legendsElement.clientHeight : this.svgHeight;
1627
+ if (legendsElement) {
1628
+ select(legendsElement).selectAll('*').remove();
1629
+ }
1630
+ // 使用容器布局状态
1631
+ var isNarrowLayout = this.isNarrowLayout;
1632
+ // 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
1633
+ var mainRect = mainChartElement.getBoundingClientRect();
1634
+ if (mainRect.width > 0) {
1635
+ this.svgWidth = mainRect.width;
1636
+ }
1637
+ else if (mainChartElement.clientWidth > 0) {
1638
+ this.svgWidth = mainChartElement.clientWidth;
1639
+ }
1640
+ else {
1641
+ this.svgWidth = 300;
1642
+ }
1643
+ if (mainRect.height > 0) {
1644
+ this.svgHeight = mainRect.height;
1645
+ }
1646
+ else if (isNarrowLayout) {
1647
+ this.svgHeight = 280;
1648
+ }
1649
+ else if (mainChartElement.clientHeight > 0) {
1650
+ this.svgHeight = mainChartElement.clientHeight;
1651
+ }
1652
+ else {
1653
+ this.svgHeight = 300;
1654
+ }
1655
+ // Legends 宽度 - 仅在存在 legends 容器时计算
1656
+ if (legendsElement) {
1657
+ var legendsRect = legendsElement.getBoundingClientRect();
1658
+ if (legendsRect.width > 0) {
1659
+ this.legendSvgWidth = legendsRect.width;
1660
+ }
1661
+ else if (legendsElement.clientWidth > 0) {
1662
+ this.legendSvgWidth = legendsElement.clientWidth;
1663
+ }
1664
+ else {
1665
+ // 根据布局模式估算宽度
1666
+ var containerWidth = this.$el.getBoundingClientRect().width;
1667
+ if (isNarrowLayout) {
1668
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
1669
+ }
1670
+ else {
1671
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.25 : 150;
1672
+ }
1673
+ }
1674
+ }
1675
+ // Legends 高度 - 始终基于图例数量计算
1676
+ var legendsCount = this.categories.length;
1677
+ var itemHeight = isNarrowLayout ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
1678
+ this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
1377
1679
  this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
1378
1680
  this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
1379
- // 创建新的SVG
1681
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
1380
1682
  this.mainSvg = select(mainChartElement)
1381
1683
  .append('svg')
1382
- .attr('width', this.svgWidth)
1383
- .attr('height', this.svgHeight);
1384
- this.legendsSvg = select(legendsElement)
1385
- .append('svg')
1386
- .attr('width', this.legendSvgWidth)
1387
- .attr('height', this.legendSvgHeight);
1684
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
1685
+ .attr('preserveAspectRatio', 'xMinYMin meet')
1686
+ .style('display', 'block')
1687
+ .style('width', '100%')
1688
+ .style('height', '100%');
1689
+ if (legendsElement) {
1690
+ this.legendsSvg = select(legendsElement)
1691
+ .append('svg')
1692
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
1693
+ .attr('preserveAspectRatio', 'xMinYMin meet')
1694
+ .style('display', 'block')
1695
+ .style('width', '100%')
1696
+ .style('height', '100%');
1697
+ }
1388
1698
  if (this.groupType === 'stacked100' && this.categories.length > 0) {
1389
1699
  this.xAxisScale = scaleLinear()
1390
1700
  .domain([0, 1])
@@ -1429,7 +1739,13 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1429
1739
  .formatDomainValue(domain, _this.actualMargin.left - 20, false); });
1430
1740
  this.mainChart = this.mainSvg.append('g')
1431
1741
  .attr('transform', "translate(" + this.actualMargin.left + ", " + this.actualMargin.top + ")");
1432
- this.labelGroup = this.legendsSvg.append('g').attr('transform', 'translate(0, 0)');
1742
+ // 创建注解组(仅在存在 legends 容器时)
1743
+ if (this.legendsSvg) {
1744
+ this.labelGroup = this.legendsSvg.append('g').attr('transform', 'translate(0, 0)');
1745
+ }
1746
+ else {
1747
+ this.labelGroup = null;
1748
+ }
1433
1749
  };
1434
1750
  MoBarChartHorizontal.prototype.renderAxis = function () {
1435
1751
  var chartXAxis = this.mainSvg.append('g')
@@ -1654,10 +1970,15 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1654
1970
  };
1655
1971
  MoBarChartHorizontal.prototype.renderLabel = function () {
1656
1972
  var _this = this;
1657
- var titleHeight = 15;
1973
+ if (!this.labelGroup) {
1974
+ return; // 没有 legends 容器,跳过渲染
1975
+ }
1976
+ var itemHeight = this.isNarrowLayout
1977
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
1978
+ : this.LEGEND_ITEM_HEIGHT;
1658
1979
  this.labelGroup.append('text')
1659
1980
  .attr('x', 10)
1660
- .attr('y', titleHeight)
1981
+ .attr('y', this.TITLE_HEIGHT)
1661
1982
  .attr('class', 'mo-label-title')
1662
1983
  .text(ChartService.formatDomainValue(this.groupings[1].label, this.legendSvgWidth, false));
1663
1984
  var legends = this.labelGroup.selectAll('.mo-label')
@@ -1665,19 +1986,30 @@ var MoBarChartHorizontal = /** @class */ (function (_super) {
1665
1986
  .enter()
1666
1987
  .append('g')
1667
1988
  .attr('class', 'mo-label');
1668
- var currentY = titleHeight + 15;
1989
+ var currentY = this.TITLE_HEIGHT + 15;
1669
1990
  legends.append('rect')
1670
1991
  .attr('width', '15')
1671
1992
  .attr('height', '15')
1672
1993
  .attr('x', 10)
1673
- .attr('y', function (d, i) { return currentY + i * 25; })
1994
+ .attr('y', function (d, i) { return currentY + i * itemHeight; })
1674
1995
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
1675
1996
  legends.append('text')
1676
1997
  .attr('x', 35)
1677
- .attr('y', function (d, i) { return currentY + 12 + i * 25; })
1998
+ .attr('y', function (d, i) { return currentY + 12 + i * itemHeight; })
1678
1999
  .attr('class', 'mo-legend-text')
1679
2000
  .text(function (d) { return ChartService
1680
2001
  .formatDomainValue(d, _this.legendSvgWidth, false); });
2002
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
2003
+ var legendsCount = this.categories.length;
2004
+ var newHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
2005
+ this.legendSvgHeight = newHeight;
2006
+ var legendsElement = this.$el.querySelector('.chart-legends');
2007
+ if (legendsElement) {
2008
+ var legendsSvg = legendsElement.querySelector('svg');
2009
+ if (legendsSvg) {
2010
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
2011
+ }
2012
+ }
1681
2013
  };
1682
2014
  var _a;
1683
2015
  __decorate([
@@ -1747,20 +2079,36 @@ var __vue_render__$1 = function () {
1747
2079
  return _vm.groupType === "grouped" ||
1748
2080
  _vm.groupType === "stacked" ||
1749
2081
  _vm.groupType === "stacked100"
1750
- ? _c("div", { staticClass: "chart-container chart-having-tips" }, [
1751
- _vm._m(0),
1752
- _vm._v(" "),
1753
- _vm.data.length > 20
1754
- ? _c("div", { staticClass: "chart-limit-tips" }, [
1755
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1756
- : _vm._e() ])
1757
- : _c("div", { staticClass: "chart-container chart-having-tips" }, [
1758
- _c("div", { staticClass: "main-chart" }),
1759
- _vm._v(" "),
1760
- _vm.data.length > 20
1761
- ? _c("div", { staticClass: "chart-limit-tips" }, [
1762
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
1763
- : _vm._e() ])
2082
+ ? _c(
2083
+ "div",
2084
+ {
2085
+ staticClass:
2086
+ "chart-container chart-having-tips bar-chart-horizontal-container",
2087
+ class: { "narrow-layout": _vm.isNarrowLayout },
2088
+ },
2089
+ [
2090
+ _vm._m(0),
2091
+ _vm._v(" "),
2092
+ _vm.data.length > 20
2093
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
2094
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
2095
+ : _vm._e() ]
2096
+ )
2097
+ : _c(
2098
+ "div",
2099
+ {
2100
+ staticClass:
2101
+ "chart-container chart-having-tips bar-chart-horizontal-container",
2102
+ class: { "narrow-layout": _vm.isNarrowLayout },
2103
+ },
2104
+ [
2105
+ _c("div", { staticClass: "main-chart" }),
2106
+ _vm._v(" "),
2107
+ _vm.data.length > 20
2108
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
2109
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
2110
+ : _vm._e() ]
2111
+ )
1764
2112
  };
1765
2113
  var __vue_staticRenderFns__$1 = [
1766
2114
  function () {
@@ -1777,7 +2125,7 @@ __vue_render__$1._withStripped = true;
1777
2125
  /* style */
1778
2126
  var __vue_inject_styles__$1 = function (inject) {
1779
2127
  if (!inject) { return }
1780
- inject("data-v-1762f448_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
1781
2129
 
1782
2130
  };
1783
2131
  /* scoped */
@@ -1836,6 +2184,17 @@ var PieChart = /** @class */ (function (_super) {
1836
2184
  startAngle: 0,
1837
2185
  originalAngle: 0,
1838
2186
  };
2187
+ // 常量定义
2188
+ _this.LEGEND_ITEM_HEIGHT = 25;
2189
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
2190
+ _this.LEGEND_TITLE_OFFSET = 65; // 有标题时图例起始 Y 偏移
2191
+ // 布局切换阈值: 容器高宽比 >= 1.6 时使用上下布局,否则左右布局
2192
+ _this.NARROW_ASPECT_RATIO = 1.6;
2193
+ _this.isNarrowLayout = false;
2194
+ _this.resizeTimer = null;
2195
+ _this.resizeObserver = null;
2196
+ _this.isFirstCheck = true;
2197
+ _this.isLayoutChecking = false;
1839
2198
  return _this;
1840
2199
  }
1841
2200
  PieChart.prototype.onDataChanged = function () {
@@ -1843,7 +2202,74 @@ var PieChart = /** @class */ (function (_super) {
1843
2202
  this.redraw();
1844
2203
  };
1845
2204
  PieChart.prototype.mounted = function () {
1846
- this.redraw();
2205
+ var _this = this;
2206
+ window.addEventListener('resize', this.handleResize);
2207
+ // 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
2208
+ if (typeof ResizeObserver !== 'undefined') {
2209
+ this.resizeObserver = new ResizeObserver(function () {
2210
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
2211
+ if (_this.isFirstCheck) {
2212
+ _this.isFirstCheck = false;
2213
+ return;
2214
+ }
2215
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
2216
+ if (!_this.isLayoutChecking) {
2217
+ _this.isLayoutChecking = true;
2218
+ requestAnimationFrame(function () {
2219
+ _this.isLayoutChecking = false;
2220
+ _this.checkLayoutAndRedraw();
2221
+ });
2222
+ }
2223
+ });
2224
+ this.resizeObserver.observe(this.$el);
2225
+ }
2226
+ // 首次渲染
2227
+ requestAnimationFrame(function () {
2228
+ _this.isFirstCheck = false;
2229
+ _this.checkLayoutAndRedraw();
2230
+ });
2231
+ };
2232
+ PieChart.prototype.beforeDestroy = function () {
2233
+ window.removeEventListener('resize', this.handleResize);
2234
+ if (this.resizeTimer) {
2235
+ clearTimeout(this.resizeTimer);
2236
+ this.resizeTimer = null;
2237
+ }
2238
+ if (this.resizeObserver) {
2239
+ this.resizeObserver.disconnect();
2240
+ this.resizeObserver = null;
2241
+ }
2242
+ };
2243
+ PieChart.prototype.handleResize = function () {
2244
+ var _this = this;
2245
+ if (this.resizeTimer) {
2246
+ clearTimeout(this.resizeTimer);
2247
+ }
2248
+ this.resizeTimer = setTimeout(function () {
2249
+ _this.checkLayoutAndRedraw();
2250
+ _this.resizeTimer = null;
2251
+ }, 200);
2252
+ };
2253
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
2254
+ PieChart.prototype.checkLayoutAndRedraw = function () {
2255
+ var _this = this;
2256
+ var rect = this.$el.getBoundingClientRect();
2257
+ // 高宽比 >= 1.6 时使用上下布局(竖屏/瘦高容器)
2258
+ var isNarrow = rect.width > 0 && rect.height > 0
2259
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
2260
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
2261
+ this.isNarrowLayout = isNarrow;
2262
+ if (layoutChanged) {
2263
+ // 布局模式切换后,等 CSS 生效再重新渲染
2264
+ this.$nextTick(function () {
2265
+ _this.beforeRedraw();
2266
+ _this.redraw();
2267
+ });
2268
+ }
2269
+ else {
2270
+ this.beforeRedraw();
2271
+ this.redraw();
2272
+ }
1847
2273
  };
1848
2274
  PieChart.prototype.redraw = function () {
1849
2275
  this.init();
@@ -1890,27 +2316,77 @@ var PieChart = /** @class */ (function (_super) {
1890
2316
  // 清除现有的SVG
1891
2317
  var mainChartElement = this.$el.querySelector('.main-chart');
1892
2318
  var legendsElement = this.$el.querySelector('.chart-legends');
2319
+ if (!mainChartElement || !legendsElement) {
2320
+ return; // 模板还未就绪,跳过渲染
2321
+ }
1893
2322
  select(mainChartElement).selectAll('*').remove();
1894
2323
  select(legendsElement).selectAll('*').remove();
1895
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
1896
- ? mainChartElement.clientWidth : 300;
1897
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
1898
- ? mainChartElement.clientHeight : 300;
1899
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
1900
- ? legendsElement.clientWidth : 150;
1901
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
1902
- ? legendsElement.clientHeight : this.svgHeight;
2324
+ // 使用容器布局状态
2325
+ var isNarrowLayout = this.isNarrowLayout;
2326
+ // 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
2327
+ var mainRect = mainChartElement.getBoundingClientRect();
2328
+ if (mainRect.width > 0) {
2329
+ this.svgWidth = mainRect.width;
2330
+ }
2331
+ else if (mainChartElement.clientWidth > 0) {
2332
+ this.svgWidth = mainChartElement.clientWidth;
2333
+ }
2334
+ else {
2335
+ this.svgWidth = 300;
2336
+ }
2337
+ if (mainRect.height > 0) {
2338
+ this.svgHeight = mainRect.height;
2339
+ }
2340
+ else if (isNarrowLayout) {
2341
+ this.svgHeight = 280;
2342
+ }
2343
+ else if (mainChartElement.clientHeight > 0) {
2344
+ this.svgHeight = mainChartElement.clientHeight;
2345
+ }
2346
+ else {
2347
+ this.svgHeight = 300;
2348
+ }
2349
+ // Legends 宽度
2350
+ var legendsRect = legendsElement.getBoundingClientRect();
2351
+ if (legendsRect.width > 0) {
2352
+ this.legendSvgWidth = legendsRect.width;
2353
+ }
2354
+ else if (legendsElement.clientWidth > 0) {
2355
+ this.legendSvgWidth = legendsElement.clientWidth;
2356
+ }
2357
+ else {
2358
+ var containerWidth = this.$el.getBoundingClientRect().width;
2359
+ if (isNarrowLayout) {
2360
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
2361
+ }
2362
+ else {
2363
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.25 : 150;
2364
+ }
2365
+ }
2366
+ // Legends 高度 - 基于图例数量计算
2367
+ var hasTitle = !!(this.groupBy && this.aggregate);
2368
+ var legendStartY = hasTitle ? this.LEGEND_TITLE_OFFSET : 0;
2369
+ var legendsCount = this.chartDataForLegend.length;
2370
+ var legendItemHeight = isNarrowLayout
2371
+ ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
2372
+ this.legendSvgHeight = legendStartY + legendsCount * legendItemHeight + 20;
1903
2373
  this.width = Math.min(this.svgWidth, this.svgHeight);
1904
2374
  this.height = this.svgHeight;
1905
- // 创建新的SVG
2375
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
1906
2376
  var mainSvg = select(mainChartElement)
1907
2377
  .append('svg')
1908
- .attr('width', this.svgWidth)
1909
- .attr('height', this.svgHeight);
2378
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
2379
+ .attr('preserveAspectRatio', 'xMinYMin meet')
2380
+ .style('display', 'block')
2381
+ .style('width', '100%')
2382
+ .style('height', '100%');
1910
2383
  this.legendsSvg = select(legendsElement)
1911
2384
  .append('svg')
1912
- .attr('width', this.legendSvgWidth)
1913
- .attr('height', this.legendSvgHeight);
2385
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
2386
+ .attr('preserveAspectRatio', 'xMinYMin meet')
2387
+ .style('display', 'block')
2388
+ .style('width', '100%')
2389
+ .style('height', '100%');
1914
2390
  this.radius = Math.max(0, this.width / 2 - Math.min(30, this.width * 0.1));
1915
2391
  this.innerRadius = this.donut ? this.radius * 0.43 : 0;
1916
2392
  this.rotation = {
@@ -1985,6 +2461,12 @@ var PieChart = /** @class */ (function (_super) {
1985
2461
  var _this = this;
1986
2462
  if (this.chartDataForLegend.length === 0)
1987
2463
  { return; }
2464
+ if (!this.legendsSvg) {
2465
+ return; // 没有 legends 容器,跳过渲染
2466
+ }
2467
+ var itemHeight = this.isNarrowLayout
2468
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
2469
+ : this.LEGEND_ITEM_HEIGHT;
1988
2470
  // 添加标题
1989
2471
  var currentY = 0;
1990
2472
  if (this.groupBy && this.aggregate) {
@@ -1993,7 +2475,7 @@ var PieChart = /** @class */ (function (_super) {
1993
2475
  .attr('y', 40)
1994
2476
  .attr('class', 'mo-label-title')
1995
2477
  .text(ChartService.formatDomainValue(this.groupBy.label, this.legendSvgWidth, false));
1996
- currentY = 65;
2478
+ currentY = this.LEGEND_TITLE_OFFSET;
1997
2479
  }
1998
2480
  // 添加图例
1999
2481
  var legends = this.legendsSvg.selectAll('.mo-legend')
@@ -2006,15 +2488,26 @@ var PieChart = /** @class */ (function (_super) {
2006
2488
  .attr('width', 15)
2007
2489
  .attr('height', 15)
2008
2490
  .attr('x', 10)
2009
- .attr('y', function (d, i) { return currentY + i * 25; })
2491
+ .attr('y', function (d, i) { return currentY + i * itemHeight; })
2010
2492
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
2011
2493
  // 图例文本
2012
2494
  legends.append('text')
2013
2495
  .attr('x', 35)
2014
- .attr('y', function (d, i) { return currentY + 12 + i * 25; })
2496
+ .attr('y', function (d, i) { return currentY + 12 + i * itemHeight; })
2015
2497
  .attr('class', 'mo-legend-text')
2016
2498
  .text(function (d) { return ChartService
2017
2499
  .formatDomainValue(d.label, _this.legendSvgWidth - 5, false); });
2500
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
2501
+ var legendsCount = this.chartDataForLegend.length;
2502
+ var newHeight = currentY + legendsCount * itemHeight + 20;
2503
+ this.legendSvgHeight = newHeight;
2504
+ var legendsElement = this.$el.querySelector('.chart-legends');
2505
+ if (legendsElement) {
2506
+ var legendsSvg = legendsElement.querySelector('svg');
2507
+ if (legendsSvg) {
2508
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
2509
+ }
2510
+ }
2018
2511
  };
2019
2512
  PieChart.prototype.addDonut = function () {
2020
2513
  var _this = this;
@@ -2195,24 +2688,25 @@ var __vue_render__$2 = function () {
2195
2688
  var _vm = this;
2196
2689
  var _h = _vm.$createElement;
2197
2690
  var _c = _vm._self._c || _h;
2198
- return _vm._m(0)
2199
- };
2200
- var __vue_staticRenderFns__$2 = [
2201
- function () {
2202
- var _vm = this;
2203
- var _h = _vm.$createElement;
2204
- var _c = _vm._self._c || _h;
2205
- return _c("div", { staticClass: "chart-container" }, [
2691
+ return _c(
2692
+ "div",
2693
+ {
2694
+ staticClass: "chart-container pie-chart-container",
2695
+ class: { "narrow-layout": _vm.isNarrowLayout },
2696
+ },
2697
+ [
2206
2698
  _c("div", { staticClass: "main-chart" }),
2207
2699
  _vm._v(" "),
2208
- _c("div", { staticClass: "chart-legends" }) ])
2209
- } ];
2700
+ _c("div", { staticClass: "chart-legends" }) ]
2701
+ )
2702
+ };
2703
+ var __vue_staticRenderFns__$2 = [];
2210
2704
  __vue_render__$2._withStripped = true;
2211
2705
 
2212
2706
  /* style */
2213
2707
  var __vue_inject_styles__$2 = function (inject) {
2214
2708
  if (!inject) { return }
2215
- inject("data-v-08807cf6_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
2709
+ inject("data-v-a09720c8_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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
2216
2710
 
2217
2711
  };
2218
2712
  /* scoped */
@@ -2263,6 +2757,17 @@ var LineChart = /** @class */ (function (_super) {
2263
2757
  _this.refactoredData = [];
2264
2758
  _this.displayData = [];
2265
2759
  _this.maxDisplayCount = 20;
2760
+ // 常量定义
2761
+ _this.TITLE_HEIGHT = 25;
2762
+ _this.LEGEND_ITEM_HEIGHT = 25;
2763
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
2764
+ // 布局切换阈值: 容器高宽比 >= 1.8 时使用上下布局,否则左右布局
2765
+ _this.NARROW_ASPECT_RATIO = 1.8;
2766
+ _this.isNarrowLayout = false;
2767
+ _this.resizeTimer = null;
2768
+ _this.resizeObserver = null;
2769
+ _this.isFirstCheck = true;
2770
+ _this.isLayoutChecking = false;
2266
2771
  return _this;
2267
2772
  }
2268
2773
  Object.defineProperty(LineChart.prototype, "actualMargin", {
@@ -2284,7 +2789,74 @@ var LineChart = /** @class */ (function (_super) {
2284
2789
  this.redraw();
2285
2790
  };
2286
2791
  LineChart.prototype.mounted = function () {
2287
- this.redraw();
2792
+ var _this = this;
2793
+ window.addEventListener('resize', this.handleResize);
2794
+ // 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
2795
+ if (typeof ResizeObserver !== 'undefined') {
2796
+ this.resizeObserver = new ResizeObserver(function () {
2797
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
2798
+ if (_this.isFirstCheck) {
2799
+ _this.isFirstCheck = false;
2800
+ return;
2801
+ }
2802
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
2803
+ if (!_this.isLayoutChecking) {
2804
+ _this.isLayoutChecking = true;
2805
+ requestAnimationFrame(function () {
2806
+ _this.isLayoutChecking = false;
2807
+ _this.checkLayoutAndRedraw();
2808
+ });
2809
+ }
2810
+ });
2811
+ this.resizeObserver.observe(this.$el);
2812
+ }
2813
+ // 首次渲染
2814
+ requestAnimationFrame(function () {
2815
+ _this.isFirstCheck = false;
2816
+ _this.checkLayoutAndRedraw();
2817
+ });
2818
+ };
2819
+ LineChart.prototype.beforeDestroy = function () {
2820
+ window.removeEventListener('resize', this.handleResize);
2821
+ if (this.resizeTimer) {
2822
+ clearTimeout(this.resizeTimer);
2823
+ this.resizeTimer = null;
2824
+ }
2825
+ if (this.resizeObserver) {
2826
+ this.resizeObserver.disconnect();
2827
+ this.resizeObserver = null;
2828
+ }
2829
+ };
2830
+ LineChart.prototype.handleResize = function () {
2831
+ var _this = this;
2832
+ if (this.resizeTimer) {
2833
+ clearTimeout(this.resizeTimer);
2834
+ }
2835
+ this.resizeTimer = setTimeout(function () {
2836
+ _this.checkLayoutAndRedraw();
2837
+ _this.resizeTimer = null;
2838
+ }, 200);
2839
+ };
2840
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
2841
+ LineChart.prototype.checkLayoutAndRedraw = function () {
2842
+ var _this = this;
2843
+ var rect = this.$el.getBoundingClientRect();
2844
+ // 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
2845
+ var isNarrow = rect.width > 0 && rect.height > 0
2846
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
2847
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
2848
+ this.isNarrowLayout = isNarrow;
2849
+ if (layoutChanged) {
2850
+ // 布局模式切换后,等 CSS 生效再重新渲染
2851
+ this.$nextTick(function () {
2852
+ _this.beforeRedraw();
2853
+ _this.redraw();
2854
+ });
2855
+ }
2856
+ else {
2857
+ this.beforeRedraw();
2858
+ this.redraw();
2859
+ }
2288
2860
  };
2289
2861
  LineChart.prototype.redraw = function () {
2290
2862
  this.init();
@@ -2311,29 +2883,87 @@ var LineChart = /** @class */ (function (_super) {
2311
2883
  // 清除现有的SVG
2312
2884
  var mainChartElement = this.$el.querySelector('.main-chart');
2313
2885
  var legendsElement = this.$el.querySelector('.chart-legends');
2886
+ if (!mainChartElement) {
2887
+ return; // 模板还未就绪,跳过渲染
2888
+ }
2314
2889
  select(mainChartElement).selectAll('*').remove();
2315
- select(legendsElement).selectAll('*').remove();
2316
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
2317
- ? mainChartElement.clientWidth : 300;
2318
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
2319
- ? mainChartElement.clientHeight : 300;
2320
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
2321
- ? legendsElement.clientWidth : 150;
2322
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
2323
- ? legendsElement.clientHeight : this.svgHeight;
2890
+ if (legendsElement) {
2891
+ select(legendsElement).selectAll('*').remove();
2892
+ }
2893
+ // 使用容器布局状态
2894
+ var isNarrowLayout = this.isNarrowLayout;
2895
+ // 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
2896
+ var mainRect = mainChartElement.getBoundingClientRect();
2897
+ if (mainRect.width > 0) {
2898
+ this.svgWidth = mainRect.width;
2899
+ }
2900
+ else if (mainChartElement.clientWidth > 0) {
2901
+ this.svgWidth = mainChartElement.clientWidth;
2902
+ }
2903
+ else {
2904
+ this.svgWidth = 300;
2905
+ }
2906
+ if (mainRect.height > 0) {
2907
+ this.svgHeight = mainRect.height;
2908
+ }
2909
+ else if (isNarrowLayout) {
2910
+ this.svgHeight = 280;
2911
+ }
2912
+ else if (mainChartElement.clientHeight > 0) {
2913
+ this.svgHeight = mainChartElement.clientHeight;
2914
+ }
2915
+ else {
2916
+ this.svgHeight = 300;
2917
+ }
2918
+ // Legends 宽度 - 仅在存在 legends 容器时计算
2919
+ if (legendsElement) {
2920
+ var legendsRect = legendsElement.getBoundingClientRect();
2921
+ if (legendsRect.width > 0) {
2922
+ this.legendSvgWidth = legendsRect.width;
2923
+ }
2924
+ else if (legendsElement.clientWidth > 0) {
2925
+ this.legendSvgWidth = legendsElement.clientWidth;
2926
+ }
2927
+ else {
2928
+ var containerWidth = this.$el.getBoundingClientRect().width;
2929
+ if (isNarrowLayout) {
2930
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
2931
+ }
2932
+ else {
2933
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.20 : 150;
2934
+ }
2935
+ }
2936
+ }
2937
+ // Legends 高度 - 基于图例数量计算(使用上一轮的 categories/aggregates 作为估算)
2938
+ var legendsCount = this.aggregates.length > 1
2939
+ ? this.aggregates.length
2940
+ : this.categories.length;
2941
+ var itemHeight = isNarrowLayout ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
2942
+ this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
2324
2943
  this.width = this.svgWidth - this.actualMargin.left - this.actualMargin.right;
2325
2944
  this.height = this.svgHeight - this.actualMargin.top - this.actualMargin.bottom;
2326
- // 创建新的SVG
2945
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
2327
2946
  this.mainSvg = select(mainChartElement)
2328
2947
  .append('svg')
2329
- .attr('width', this.svgWidth)
2330
- .attr('height', this.svgHeight)
2948
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
2949
+ .attr('preserveAspectRatio', 'xMinYMin meet')
2950
+ .style('display', 'block')
2951
+ .style('width', '100%')
2952
+ .style('height', '100%')
2331
2953
  .append('g')
2332
2954
  .attr('transform', "translate(" + this.actualMargin.left + ", " + this.actualMargin.top + ")");
2333
- this.legendsSvg = select(legendsElement)
2334
- .append('svg')
2335
- .attr('width', this.legendSvgWidth)
2336
- .attr('height', this.legendSvgHeight);
2955
+ if (legendsElement) {
2956
+ this.legendsSvg = select(legendsElement)
2957
+ .append('svg')
2958
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
2959
+ .attr('preserveAspectRatio', 'xMinYMin meet')
2960
+ .style('display', 'block')
2961
+ .style('width', '100%')
2962
+ .style('height', '100%');
2963
+ }
2964
+ else {
2965
+ this.legendsSvg = null;
2966
+ }
2337
2967
  this.categories = [];
2338
2968
  var limitedData = this.displayData.slice(0, 20);
2339
2969
  this.maxValue = max(limitedData, function (d) { return max(d.values); });
@@ -2588,6 +3218,12 @@ var LineChart = /** @class */ (function (_super) {
2588
3218
  };
2589
3219
  LineChart.prototype.renderMeasure = function () {
2590
3220
  var _this = this;
3221
+ if (!this.legendsSvg) {
3222
+ return; // 没有 legends 容器,跳过渲染
3223
+ }
3224
+ var itemHeight = this.isNarrowLayout
3225
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
3226
+ : this.LEGEND_ITEM_HEIGHT;
2591
3227
  var labelGroup = this.legendsSvg.append('g');
2592
3228
  labelGroup.append('text')
2593
3229
  .attr('x', 0)
@@ -2603,18 +3239,26 @@ var LineChart = /** @class */ (function (_super) {
2603
3239
  .attr('width', '15')
2604
3240
  .attr('height', '15')
2605
3241
  .attr('x', 0)
2606
- .attr('y', function (d, i) { return 25 + i * 25; })
3242
+ .attr('y', function (d, i) { return 25 + i * itemHeight; })
2607
3243
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
2608
3244
  legends.append('text')
2609
3245
  .attr('x', 20)
2610
- .attr('y', function (d, i) { return 37 + i * 25; })
3246
+ .attr('y', function (d, i) { return 37 + i * itemHeight; })
2611
3247
  .attr('class', 'mo-legend-text')
2612
3248
  .style('fill', this.labelColor || '')
2613
3249
  .text(function (d) { return ChartService
2614
3250
  .formatDomainValue(d.label, _this.legendSvgWidth, false); });
3251
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
3252
+ this.updateLegendsSvgSize(this.aggregates.length, itemHeight);
2615
3253
  };
2616
3254
  LineChart.prototype.renderLabel = function () {
2617
3255
  var _this = this;
3256
+ if (!this.legendsSvg) {
3257
+ return; // 没有 legends 容器,跳过渲染
3258
+ }
3259
+ var itemHeight = this.isNarrowLayout
3260
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
3261
+ : this.LEGEND_ITEM_HEIGHT;
2618
3262
  var labelGroup = this.legendsSvg.append('g');
2619
3263
  labelGroup.append('text')
2620
3264
  .attr('x', 0)
@@ -2630,15 +3274,29 @@ var LineChart = /** @class */ (function (_super) {
2630
3274
  .attr('width', '15')
2631
3275
  .attr('height', '15')
2632
3276
  .attr('x', 0)
2633
- .attr('y', function (d, i) { return 25 + i * 25; })
3277
+ .attr('y', function (d, i) { return 25 + i * itemHeight; })
2634
3278
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
2635
3279
  legends.append('text')
2636
3280
  .attr('x', 20)
2637
- .attr('y', function (d, i) { return 37 + i * 25; })
3281
+ .attr('y', function (d, i) { return 37 + i * itemHeight; })
2638
3282
  .attr('class', 'mo-legend-text')
2639
3283
  .style('fill', this.labelColor || '')
2640
3284
  .text(function (d) { return ChartService
2641
3285
  .formatDomainValue(d.key, _this.legendSvgWidth, false); });
3286
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
3287
+ this.updateLegendsSvgSize(this.categories.length, itemHeight);
3288
+ };
3289
+ /** 根据图例数量更新 legends SVG 的 viewBox 和高度 */
3290
+ LineChart.prototype.updateLegendsSvgSize = function (legendsCount, itemHeight) {
3291
+ var newHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
3292
+ this.legendSvgHeight = newHeight;
3293
+ var legendsElement = this.$el.querySelector('.chart-legends');
3294
+ if (legendsElement) {
3295
+ var legendsSvg = legendsElement.querySelector('svg');
3296
+ if (legendsSvg) {
3297
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
3298
+ }
3299
+ }
2642
3300
  };
2643
3301
  LineChart.prototype.renderData = function () {
2644
3302
  var _this = this;
@@ -2748,20 +3406,34 @@ var __vue_render__$3 = function () {
2748
3406
  _vm.groupType === "cumulativeGrouped" ||
2749
3407
  _vm.aggregates.length > 1 ||
2750
3408
  _vm.categories.length > 0
2751
- ? _c("div", { staticClass: "chart-container chart-having-tips" }, [
2752
- _vm._m(0),
2753
- _vm._v(" "),
2754
- _vm.data.length > 20
2755
- ? _c("div", { staticClass: "chart-limit-tips" }, [
2756
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
2757
- : _vm._e() ])
2758
- : _c("div", { staticClass: "chart-container chart-having-tips" }, [
2759
- _c("div", { staticClass: "main-chart" }),
2760
- _vm._v(" "),
2761
- _vm.data.length > 20
2762
- ? _c("div", { staticClass: "chart-limit-tips" }, [
2763
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
2764
- : _vm._e() ])
3409
+ ? _c(
3410
+ "div",
3411
+ {
3412
+ staticClass: "chart-container chart-having-tips line-chart-container",
3413
+ class: { "narrow-layout": _vm.isNarrowLayout },
3414
+ },
3415
+ [
3416
+ _vm._m(0),
3417
+ _vm._v(" "),
3418
+ _vm.data.length > 20
3419
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
3420
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
3421
+ : _vm._e() ]
3422
+ )
3423
+ : _c(
3424
+ "div",
3425
+ {
3426
+ staticClass: "chart-container chart-having-tips line-chart-container",
3427
+ class: { "narrow-layout": _vm.isNarrowLayout },
3428
+ },
3429
+ [
3430
+ _c("div", { staticClass: "main-chart" }),
3431
+ _vm._v(" "),
3432
+ _vm.data.length > 20
3433
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
3434
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
3435
+ : _vm._e() ]
3436
+ )
2765
3437
  };
2766
3438
  var __vue_staticRenderFns__$3 = [
2767
3439
  function () {
@@ -2771,17 +3443,14 @@ var __vue_staticRenderFns__$3 = [
2771
3443
  return _c("div", { staticClass: "chart-and-legends" }, [
2772
3444
  _c("div", { staticClass: "main-chart" }),
2773
3445
  _vm._v(" "),
2774
- _c("div", {
2775
- staticClass: "chart-legends",
2776
- staticStyle: { width: "20%" },
2777
- }) ])
3446
+ _c("div", { staticClass: "chart-legends" }) ])
2778
3447
  } ];
2779
3448
  __vue_render__$3._withStripped = true;
2780
3449
 
2781
3450
  /* style */
2782
3451
  var __vue_inject_styles__$3 = function (inject) {
2783
3452
  if (!inject) { return }
2784
- inject("data-v-9b29bf16_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
3453
+ 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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
2785
3454
 
2786
3455
  };
2787
3456
  /* scoped */
@@ -2825,6 +3494,17 @@ var FunnelChart = /** @class */ (function (_super) {
2825
3494
  _this.total = 0;
2826
3495
  _this.refactoredData = [];
2827
3496
  _this.colorMap = new Map();
3497
+ // 常量定义
3498
+ _this.TITLE_HEIGHT = 30;
3499
+ _this.LEGEND_ITEM_HEIGHT = 25;
3500
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
3501
+ // 布局切换阈值: 容器高宽比 >= 1.6 时使用上下布局,否则左右布局
3502
+ _this.NARROW_ASPECT_RATIO = 1.6;
3503
+ _this.isNarrowLayout = false;
3504
+ _this.resizeTimer = null;
3505
+ _this.resizeObserver = null;
3506
+ _this.isFirstCheck = true;
3507
+ _this.isLayoutChecking = false;
2828
3508
  return _this;
2829
3509
  }
2830
3510
  FunnelChart.prototype.onDataChanged = function () {
@@ -2832,7 +3512,74 @@ var FunnelChart = /** @class */ (function (_super) {
2832
3512
  this.redraw();
2833
3513
  };
2834
3514
  FunnelChart.prototype.mounted = function () {
2835
- this.redraw();
3515
+ var _this = this;
3516
+ window.addEventListener('resize', this.handleResize);
3517
+ // 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
3518
+ if (typeof ResizeObserver !== 'undefined') {
3519
+ this.resizeObserver = new ResizeObserver(function () {
3520
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
3521
+ if (_this.isFirstCheck) {
3522
+ _this.isFirstCheck = false;
3523
+ return;
3524
+ }
3525
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
3526
+ if (!_this.isLayoutChecking) {
3527
+ _this.isLayoutChecking = true;
3528
+ requestAnimationFrame(function () {
3529
+ _this.isLayoutChecking = false;
3530
+ _this.checkLayoutAndRedraw();
3531
+ });
3532
+ }
3533
+ });
3534
+ this.resizeObserver.observe(this.$el);
3535
+ }
3536
+ // 首次渲染
3537
+ requestAnimationFrame(function () {
3538
+ _this.isFirstCheck = false;
3539
+ _this.checkLayoutAndRedraw();
3540
+ });
3541
+ };
3542
+ FunnelChart.prototype.beforeDestroy = function () {
3543
+ window.removeEventListener('resize', this.handleResize);
3544
+ if (this.resizeTimer) {
3545
+ clearTimeout(this.resizeTimer);
3546
+ this.resizeTimer = null;
3547
+ }
3548
+ if (this.resizeObserver) {
3549
+ this.resizeObserver.disconnect();
3550
+ this.resizeObserver = null;
3551
+ }
3552
+ };
3553
+ FunnelChart.prototype.handleResize = function () {
3554
+ var _this = this;
3555
+ if (this.resizeTimer) {
3556
+ clearTimeout(this.resizeTimer);
3557
+ }
3558
+ this.resizeTimer = setTimeout(function () {
3559
+ _this.checkLayoutAndRedraw();
3560
+ _this.resizeTimer = null;
3561
+ }, 200);
3562
+ };
3563
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
3564
+ FunnelChart.prototype.checkLayoutAndRedraw = function () {
3565
+ var _this = this;
3566
+ var rect = this.$el.getBoundingClientRect();
3567
+ // 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
3568
+ var isNarrow = rect.width > 0 && rect.height > 0
3569
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
3570
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
3571
+ this.isNarrowLayout = isNarrow;
3572
+ if (layoutChanged) {
3573
+ // 布局模式切换后,等 CSS 生效再重新渲染
3574
+ this.$nextTick(function () {
3575
+ _this.beforeRedraw();
3576
+ _this.redraw();
3577
+ });
3578
+ }
3579
+ else {
3580
+ this.beforeRedraw();
3581
+ this.redraw();
3582
+ }
2836
3583
  };
2837
3584
  FunnelChart.prototype.redraw = function () {
2838
3585
  this.init();
@@ -2861,21 +3608,63 @@ var FunnelChart = /** @class */ (function (_super) {
2861
3608
  // 清除现有的SVG
2862
3609
  var mainChartElement = this.$el.querySelector('.main-chart');
2863
3610
  var legendsElement = this.$el.querySelector('.chart-legends');
3611
+ if (!mainChartElement || !legendsElement) {
3612
+ return; // 模板还未就绪,跳过渲染
3613
+ }
2864
3614
  select(mainChartElement).selectAll('*').remove();
2865
3615
  select(legendsElement).selectAll('*').remove();
2866
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
2867
- ? mainChartElement.clientWidth : 300;
2868
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
2869
- ? mainChartElement.clientHeight : 300;
2870
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
2871
- ? legendsElement.clientWidth : 150;
2872
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
2873
- ? legendsElement.clientHeight : this.svgHeight;
3616
+ // 使用容器布局状态
3617
+ var isNarrowLayout = this.isNarrowLayout;
3618
+ // 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
3619
+ var mainRect = mainChartElement.getBoundingClientRect();
3620
+ if (mainRect.width > 0) {
3621
+ this.svgWidth = mainRect.width;
3622
+ }
3623
+ else if (mainChartElement.clientWidth > 0) {
3624
+ this.svgWidth = mainChartElement.clientWidth;
3625
+ }
3626
+ else {
3627
+ this.svgWidth = 300;
3628
+ }
3629
+ if (mainRect.height > 0) {
3630
+ this.svgHeight = mainRect.height;
3631
+ }
3632
+ else if (isNarrowLayout) {
3633
+ this.svgHeight = 280;
3634
+ }
3635
+ else if (mainChartElement.clientHeight > 0) {
3636
+ this.svgHeight = mainChartElement.clientHeight;
3637
+ }
3638
+ else {
3639
+ this.svgHeight = 300;
3640
+ }
3641
+ // Legends 宽度
3642
+ var legendsRect = legendsElement.getBoundingClientRect();
3643
+ if (legendsRect.width > 0) {
3644
+ this.legendSvgWidth = legendsRect.width;
3645
+ }
3646
+ else if (legendsElement.clientWidth > 0) {
3647
+ this.legendSvgWidth = legendsElement.clientWidth;
3648
+ }
3649
+ else {
3650
+ var containerWidth = this.$el.getBoundingClientRect().width;
3651
+ if (isNarrowLayout) {
3652
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
3653
+ }
3654
+ else {
3655
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.25 : 150;
3656
+ }
3657
+ }
3658
+ // Legends 高度 - 基于图例数量计算
3659
+ var legendsCount = chartDataForLegend.length;
3660
+ var legendItemHeight = isNarrowLayout
3661
+ ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
3662
+ this.legendSvgHeight = this.TITLE_HEIGHT + 20 + legendsCount * legendItemHeight + 20;
2874
3663
  this.funnelWidth = this.svgWidth;
2875
3664
  this.funnelHeight = this.svgHeight;
2876
3665
  // 计算顶部和底部的宽度
2877
3666
  var minHeight = 15; // 最小高度
2878
- var funnelBottomOffset = 50;
3667
+ var funnelBottomOffset = 15;
2879
3668
  var accumulatedY = 50;
2880
3669
  var availableHeight = this.funnelHeight - accumulatedY - funnelBottomOffset;
2881
3670
  var topWidth = this.funnelWidth / 1.5;
@@ -2915,15 +3704,21 @@ var FunnelChart = /** @class */ (function (_super) {
2915
3704
  _this.refactoredData.push(temp);
2916
3705
  }
2917
3706
  });
2918
- // 创建新的SVG
3707
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
2919
3708
  this.mainSvg = select(mainChartElement)
2920
3709
  .append('svg')
2921
- .attr('width', this.svgWidth)
2922
- .attr('height', this.svgHeight);
3710
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
3711
+ .attr('preserveAspectRatio', 'xMinYMin meet')
3712
+ .style('display', 'block')
3713
+ .style('width', '100%')
3714
+ .style('height', '100%');
2923
3715
  this.legendsSvg = select(legendsElement)
2924
3716
  .append('svg')
2925
- .attr('width', this.legendSvgWidth)
2926
- .attr('height', this.legendSvgHeight);
3717
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
3718
+ .attr('preserveAspectRatio', 'xMinYMin meet')
3719
+ .style('display', 'block')
3720
+ .style('width', '100%')
3721
+ .style('height', '100%');
2927
3722
  this.total = totalValue;
2928
3723
  this.chartDataForLegend = chartDataForLegend;
2929
3724
  };
@@ -3019,12 +3814,29 @@ var FunnelChart = /** @class */ (function (_super) {
3019
3814
  .attr('y', 23);
3020
3815
  }
3021
3816
  else {
3817
+ var itemHeight_1 = this.isNarrowLayout
3818
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
3819
+ : this.LEGEND_ITEM_HEIGHT;
3022
3820
  legendRect
3023
3821
  .attr('x', 0)
3024
- .attr('y', function (d, i) { return i * 25; });
3822
+ .attr('y', function (d, i) { return i * itemHeight_1; });
3025
3823
  legendText
3026
3824
  .attr('x', 25)
3027
- .attr('y', function (d, i) { return (i * 25) + 13; });
3825
+ .attr('y', function (d, i) { return (i * itemHeight_1) + 13; });
3826
+ }
3827
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox 和高度
3828
+ var legendItemHeight = this.isNarrowLayout
3829
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
3830
+ : this.LEGEND_ITEM_HEIGHT;
3831
+ var legendsCount = legendData.length;
3832
+ var newHeight = this.TITLE_HEIGHT + 20 + 50 + legendsCount * legendItemHeight + 20;
3833
+ this.legendSvgHeight = newHeight;
3834
+ var legendsElement = this.$el.querySelector('.chart-legends');
3835
+ if (legendsElement) {
3836
+ var legendsSvg = legendsElement.querySelector('svg');
3837
+ if (legendsSvg) {
3838
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
3839
+ }
3028
3840
  }
3029
3841
  };
3030
3842
  var _a, _b;
@@ -3092,24 +3904,25 @@ var __vue_render__$4 = function () {
3092
3904
  var _vm = this;
3093
3905
  var _h = _vm.$createElement;
3094
3906
  var _c = _vm._self._c || _h;
3095
- return _vm._m(0)
3096
- };
3097
- var __vue_staticRenderFns__$4 = [
3098
- function () {
3099
- var _vm = this;
3100
- var _h = _vm.$createElement;
3101
- var _c = _vm._self._c || _h;
3102
- return _c("div", { staticClass: "chart-container" }, [
3907
+ return _c(
3908
+ "div",
3909
+ {
3910
+ staticClass: "chart-container funnel-chart-container",
3911
+ class: { "narrow-layout": _vm.isNarrowLayout },
3912
+ },
3913
+ [
3103
3914
  _c("div", { staticClass: "main-chart" }),
3104
3915
  _vm._v(" "),
3105
- _c("div", { staticClass: "chart-legends" }) ])
3106
- } ];
3916
+ _c("div", { staticClass: "chart-legends" }) ]
3917
+ )
3918
+ };
3919
+ var __vue_staticRenderFns__$4 = [];
3107
3920
  __vue_render__$4._withStripped = true;
3108
3921
 
3109
3922
  /* style */
3110
3923
  var __vue_inject_styles__$4 = function (inject) {
3111
3924
  if (!inject) { return }
3112
- inject("data-v-46dee47e_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
3925
+ inject("data-v-20d706a7_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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
3113
3926
 
3114
3927
  };
3115
3928
  /* scoped */
@@ -3145,10 +3958,16 @@ var GaugeChart = /** @class */ (function (_super) {
3145
3958
  _this.width = 0;
3146
3959
  _this.height = 0;
3147
3960
  _this.radius = 0;
3961
+ _this.centerX = 0;
3148
3962
  _this.backgroundArc = null;
3149
3963
  _this.arc = null;
3150
3964
  _this.centerArc = null;
3151
3965
  _this.scale = null;
3966
+ _this.resizeObserver = null;
3967
+ _this.resizeTimer = null;
3968
+ _this.isFirstCheck = true;
3969
+ _this.lastRenderedWidth = 0;
3970
+ _this.lastRenderedHeight = 0;
3152
3971
  return _this;
3153
3972
  }
3154
3973
  Object.defineProperty(GaugeChart.prototype, "minValue", {
@@ -3207,27 +4026,80 @@ var GaugeChart = /** @class */ (function (_super) {
3207
4026
  this.redraw();
3208
4027
  };
3209
4028
  GaugeChart.prototype.mounted = function () {
4029
+ var _this = this;
3210
4030
  this.redraw();
4031
+ // 监听容器尺寸变化,重新渲染仪表盘
4032
+ if (typeof ResizeObserver !== 'undefined') {
4033
+ this.resizeObserver = new ResizeObserver(function () {
4034
+ // observe 时会立即触发一次,跳过首次触发
4035
+ if (_this.isFirstCheck) {
4036
+ _this.isFirstCheck = false;
4037
+ return;
4038
+ }
4039
+ // 拖动过程中 SVG 通过 viewBox 自动缩放,无需逐帧重绘;
4040
+ // 每次通知都重置尾部防抖,resize 结束后按最终尺寸重绘一次
4041
+ if (_this.resizeTimer) {
4042
+ clearTimeout(_this.resizeTimer);
4043
+ }
4044
+ _this.resizeTimer = setTimeout(function () {
4045
+ _this.resizeTimer = null;
4046
+ _this.redrawIfResized();
4047
+ }, 120);
4048
+ });
4049
+ this.resizeObserver.observe(this.$el);
4050
+ }
3211
4051
  };
3212
- GaugeChart.prototype.redraw = function () {
4052
+ /** 容器尺寸相对上次渲染有变化时才重绘,且 resize 重绘不播放入场动画 */
4053
+ GaugeChart.prototype.redrawIfResized = function () {
4054
+ var el = this.$el;
4055
+ var rect = el ? el.getBoundingClientRect() : null;
4056
+ if (!rect) {
4057
+ return;
4058
+ }
4059
+ if (Math.abs(rect.width - this.lastRenderedWidth) <= 1
4060
+ && Math.abs(rect.height - this.lastRenderedHeight) <= 1) {
4061
+ return;
4062
+ }
4063
+ this.beforeRedraw();
4064
+ this.redraw(false);
4065
+ };
4066
+ GaugeChart.prototype.beforeDestroy = function () {
4067
+ if (this.resizeTimer) {
4068
+ clearTimeout(this.resizeTimer);
4069
+ this.resizeTimer = null;
4070
+ }
4071
+ if (this.resizeObserver) {
4072
+ this.resizeObserver.disconnect();
4073
+ this.resizeObserver = null;
4074
+ }
4075
+ };
4076
+ GaugeChart.prototype.redraw = function (animate) {
4077
+ if (animate === void 0) { animate = true; }
3213
4078
  this.init();
3214
- this.renderGauge();
4079
+ this.renderGauge(animate);
3215
4080
  this.renderData();
3216
- this.renderPointer();
4081
+ this.renderPointer(animate);
3217
4082
  };
3218
4083
  GaugeChart.prototype.init = function () {
3219
4084
  var moChartElement = this.$el;
3220
- var svgWidth = moChartElement && moChartElement.clientWidth > 0
3221
- ? moChartElement.clientWidth : 300;
3222
- var svgHeight = moChartElement && moChartElement.clientHeight > 0
3223
- ? moChartElement.clientHeight : 300;
4085
+ // 使用 getBoundingClientRect 获取真实尺寸(clientWidth 在频繁重绘时可能读到过期的整数值)
4086
+ var rect = moChartElement ? moChartElement.getBoundingClientRect() : null;
4087
+ var svgWidth = rect && rect.width > 0 ? rect.width : 300;
4088
+ var svgHeight = rect && rect.height > 0 ? rect.height : 300;
3224
4089
  this.width = Math.min(svgWidth, svgHeight);
3225
4090
  this.height = svgHeight;
3226
- this.radius = this.width / 2 - 5;
4091
+ this.radius = Math.max(0, this.width / 2 - 5);
4092
+ // 表盘圆心取容器水平中心,半径仍按宽高较小值计算
4093
+ this.centerX = svgWidth / 2;
4094
+ this.lastRenderedWidth = svgWidth;
4095
+ this.lastRenderedHeight = svgHeight;
3227
4096
  this.svg = select(this.$el)
3228
4097
  .append('svg')
3229
- .attr('width', this.width)
3230
- .attr('height', this.height);
4098
+ .attr('viewBox', "0 0 " + svgWidth + " " + svgHeight)
4099
+ .attr('preserveAspectRatio', 'xMidYMid meet')
4100
+ .style('display', 'block')
4101
+ .style('width', '100%')
4102
+ .style('height', '100%');
3231
4103
  this.defineGradient();
3232
4104
  this.backgroundArc = arc()
3233
4105
  .innerRadius(this.radius)
@@ -3246,26 +4118,35 @@ var GaugeChart = /** @class */ (function (_super) {
3246
4118
  .range([this.minAngle, this.maxAngle])
3247
4119
  .domain([this.minValue, this.maxValue]);
3248
4120
  };
3249
- GaugeChart.prototype.renderGauge = function () {
4121
+ GaugeChart.prototype.renderGauge = function (animate) {
3250
4122
  var _this = this;
3251
4123
  // background arc
3252
4124
  this.svg.append('path')
3253
4125
  .attr('class', 'mo-gauge-back-arc')
3254
- .attr('transform', "translate(" + this.width / 2 + ", " + this.height / 2 + ")")
4126
+ .attr('transform', "translate(" + this.centerX + ", " + this.height / 2 + ")")
3255
4127
  .attr('d', this.backgroundArc);
3256
4128
  // arc
3257
- this.svg.append('path')
4129
+ var valueArcPath = this.svg.append('path')
3258
4130
  .attr('class', 'mo-gauge-value-arc')
3259
- .attr('transform', "translate(" + this.width / 2 + ", " + this.height / 2 + ")")
3260
- .transition()
3261
- .duration(1000)
3262
- .attrTween('d', function () {
3263
- var start = _this.angleToRadian(_this.minAngle);
3264
- var end = _this.angleToRadian(_this.scale(_this.data.value));
3265
- var arc1 = { startAngle: start, endAngle: start };
3266
- var arc2 = { startAngle: start, endAngle: end };
3267
- return function (d) { return _this.arc(interpolateObject(arc1, arc2)(d)); };
3268
- });
4131
+ .attr('transform', "translate(" + this.centerX + ", " + this.height / 2 + ")");
4132
+ if (animate) {
4133
+ valueArcPath
4134
+ .transition()
4135
+ .duration(1000)
4136
+ .attrTween('d', function () {
4137
+ var start = _this.angleToRadian(_this.minAngle);
4138
+ var end = _this.angleToRadian(_this.scale(_this.data.value));
4139
+ var arc1 = { startAngle: start, endAngle: start };
4140
+ var arc2 = { startAngle: start, endAngle: end };
4141
+ return function (d) { return _this.arc(interpolateObject(arc1, arc2)(d)); };
4142
+ });
4143
+ }
4144
+ else {
4145
+ // resize 重绘时直接渲染最终状态,不重播入场动画
4146
+ var start = this.angleToRadian(this.minAngle);
4147
+ var end = this.angleToRadian(this.scale(this.data.value));
4148
+ valueArcPath.attr('d', this.arc({ startAngle: start, endAngle: end }));
4149
+ }
3269
4150
  // ticks
3270
4151
  var pathTick = this.tickCalc();
3271
4152
  var ticksAngles = this.getTicksAngles();
@@ -3279,12 +4160,12 @@ var GaugeChart = /** @class */ (function (_super) {
3279
4160
  // center arc
3280
4161
  this.svg.append('path')
3281
4162
  .attr('class', 'mo-gauge-inner-arc')
3282
- .attr('transform', "translate(" + this.width / 2 + ", " + this.height / 2 + ")")
4163
+ .attr('transform', "translate(" + this.centerX + ", " + this.height / 2 + ")")
3283
4164
  .attr('d', this.centerArc);
3284
4165
  };
3285
4166
  GaugeChart.prototype.renderData = function () {
3286
4167
  var textElement = this.svg.append('g')
3287
- .attr('transform', "translate(" + this.width / 2 + ", " + ((this.height / 2) + 80) + ")");
4168
+ .attr('transform', "translate(" + this.centerX + ", " + ((this.height / 2) + 80) + ")");
3288
4169
  textElement.append('text')
3289
4170
  .text([
3290
4171
  ChartService.formatValue(this.data.value, '', this.decimal),
@@ -3311,8 +4192,7 @@ var GaugeChart = /** @class */ (function (_super) {
3311
4192
  .style('font-size', Math.min(16, this.width * 0.05) + "px");
3312
4193
  }
3313
4194
  };
3314
- GaugeChart.prototype.renderPointer = function () {
3315
- var _this = this;
4195
+ GaugeChart.prototype.renderPointer = function (animate) {
3316
4196
  var pointerHeight = this.radius - 10;
3317
4197
  var pointerRadius = 2.5;
3318
4198
  var lineData = [
@@ -3325,20 +4205,26 @@ var GaugeChart = /** @class */ (function (_super) {
3325
4205
  var pointerg = this.svg.append('g')
3326
4206
  .data([lineData])
3327
4207
  .attr('class', 'mo-gauge-pointer')
3328
- .attr('transform', "translate(" + this.width / 2 + ", " + this.height / 2 + ")");
3329
- pointerg.append('path')
3330
- .attr('d', pointerLine)
3331
- .attr('transform', "rotate(" + this.scale(this.minValue) + ")")
3332
- .transition()
3333
- .duration(1000)
3334
- .attrTween('transform', function () {
3335
- var start = _this.scale(_this.minValue);
3336
- var end = _this.scale(_this.data.value);
3337
- return interpolateString("rotate(" + start + ")", "rotate(" + end + ")");
3338
- });
4208
+ .attr('transform', "translate(" + this.centerX + ", " + this.height / 2 + ")");
4209
+ var startRotate = this.scale(this.minValue);
4210
+ var endRotate = this.scale(this.data.value);
4211
+ var pointerPath = pointerg
4212
+ .append('path')
4213
+ .attr('d', pointerLine);
4214
+ if (animate) {
4215
+ pointerPath
4216
+ .attr('transform', "rotate(" + startRotate + ")")
4217
+ .transition()
4218
+ .duration(1000)
4219
+ .attrTween('transform', function () { return interpolateString("rotate(" + startRotate + ")", "rotate(" + endRotate + ")"); });
4220
+ }
4221
+ else {
4222
+ // resize 重绘时直接渲染最终角度,不重播动画
4223
+ pointerPath.attr('transform', "rotate(" + endRotate + ")");
4224
+ }
3339
4225
  this.svg.append('circle')
3340
4226
  .attr('class', 'mo-gauge-inner-bg-arc')
3341
- .attr('cx', this.width / 2)
4227
+ .attr('cx', this.centerX)
3342
4228
  .attr('cy', this.height / 2)
3343
4229
  .attr('r', 10);
3344
4230
  };
@@ -3379,8 +4265,8 @@ var GaugeChart = /** @class */ (function (_super) {
3379
4265
  var ticksStart = _this.radius - 15;
3380
4266
  var y1 = _this.height / 2 + (ticksStart * Math.sin(tickAngleRad));
3381
4267
  var y2 = _this.height / 2 + ((ticksStart + 5) * Math.sin(tickAngleRad));
3382
- var x1 = _this.width / 2 + (ticksStart * Math.cos(tickAngleRad));
3383
- var x2 = _this.width / 2 + ((ticksStart + 5) * Math.cos(tickAngleRad));
4268
+ var x1 = _this.centerX + (ticksStart * Math.cos(tickAngleRad));
4269
+ var x2 = _this.centerX + ((ticksStart + 5) * Math.cos(tickAngleRad));
3384
4270
  var lineData = [{ x: x1, y: y1 }, { x: x2, y: y2 }];
3385
4271
  return line(function (d1) { return d1.x; }, function (d1) { return d1.y; })(lineData);
3386
4272
  };
@@ -3466,7 +4352,7 @@ __vue_render__$5._withStripped = true;
3466
4352
  /* style */
3467
4353
  var __vue_inject_styles__$5 = function (inject) {
3468
4354
  if (!inject) { return }
3469
- inject("data-v-b66fee0c_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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}\n.mo-gauge-chart {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}", map: undefined, media: undefined });
4355
+ inject("data-v-77580b6c_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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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}\n.mo-gauge-chart {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}", map: undefined, media: undefined });
3470
4356
 
3471
4357
  };
3472
4358
  /* scoped */
@@ -3548,7 +4434,7 @@ __vue_render__$6._withStripped = true;
3548
4434
  /* style */
3549
4435
  var __vue_inject_styles__$6 = function (inject) {
3550
4436
  if (!inject) { return }
3551
- inject("data-v-87bb7704_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
4437
+ inject("data-v-87bb7704_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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
3552
4438
 
3553
4439
  };
3554
4440
  /* scoped */
@@ -3597,6 +4483,17 @@ var ScatterChart = /** @class */ (function (_super) {
3597
4483
  _this.additionalHeight = 0;
3598
4484
  _this.displayData = [];
3599
4485
  _this.maxDisplayCount = 20;
4486
+ // 常量定义
4487
+ _this.TITLE_HEIGHT = 20;
4488
+ _this.LEGEND_ITEM_HEIGHT = 25;
4489
+ _this.LEGEND_ITEM_HEIGHT_NARROW = 20;
4490
+ // 布局切换阈值: 容器高宽比 >= 1.8 时使用上下布局,否则左右布局
4491
+ _this.NARROW_ASPECT_RATIO = 1.8;
4492
+ _this.isNarrowLayout = false;
4493
+ _this.resizeTimer = null;
4494
+ _this.resizeObserver = null;
4495
+ _this.isFirstCheck = true;
4496
+ _this.isLayoutChecking = false;
3600
4497
  return _this;
3601
4498
  }
3602
4499
  ScatterChart.prototype.onDataChanged = function () {
@@ -3604,7 +4501,74 @@ var ScatterChart = /** @class */ (function (_super) {
3604
4501
  this.redraw();
3605
4502
  };
3606
4503
  ScatterChart.prototype.mounted = function () {
3607
- this.redraw();
4504
+ var _this = this;
4505
+ window.addEventListener('resize', this.handleResize);
4506
+ // 使用 ResizeObserver 监听容器尺寸变化,实现基于容器高宽比的布局切换
4507
+ if (typeof ResizeObserver !== 'undefined') {
4508
+ this.resizeObserver = new ResizeObserver(function () {
4509
+ // ResizeObserver 在 observe 时会立即触发一次,跳过首次触发
4510
+ if (_this.isFirstCheck) {
4511
+ _this.isFirstCheck = false;
4512
+ return;
4513
+ }
4514
+ // 使用 requestAnimationFrame 延迟执行,避免 DOM 修改触发 ResizeObserver 死循环
4515
+ if (!_this.isLayoutChecking) {
4516
+ _this.isLayoutChecking = true;
4517
+ requestAnimationFrame(function () {
4518
+ _this.isLayoutChecking = false;
4519
+ _this.checkLayoutAndRedraw();
4520
+ });
4521
+ }
4522
+ });
4523
+ this.resizeObserver.observe(this.$el);
4524
+ }
4525
+ // 首次渲染
4526
+ requestAnimationFrame(function () {
4527
+ _this.isFirstCheck = false;
4528
+ _this.checkLayoutAndRedraw();
4529
+ });
4530
+ };
4531
+ ScatterChart.prototype.beforeDestroy = function () {
4532
+ window.removeEventListener('resize', this.handleResize);
4533
+ if (this.resizeTimer) {
4534
+ clearTimeout(this.resizeTimer);
4535
+ this.resizeTimer = null;
4536
+ }
4537
+ if (this.resizeObserver) {
4538
+ this.resizeObserver.disconnect();
4539
+ this.resizeObserver = null;
4540
+ }
4541
+ };
4542
+ ScatterChart.prototype.handleResize = function () {
4543
+ var _this = this;
4544
+ if (this.resizeTimer) {
4545
+ clearTimeout(this.resizeTimer);
4546
+ }
4547
+ this.resizeTimer = setTimeout(function () {
4548
+ _this.checkLayoutAndRedraw();
4549
+ _this.resizeTimer = null;
4550
+ }, 200);
4551
+ };
4552
+ /** 检查容器高宽比,切换布局模式并重新渲染 */
4553
+ ScatterChart.prototype.checkLayoutAndRedraw = function () {
4554
+ var _this = this;
4555
+ var rect = this.$el.getBoundingClientRect();
4556
+ // 高宽比 >= 1.8 时使用上下布局(竖屏/瘦高容器)
4557
+ var isNarrow = rect.width > 0 && rect.height > 0
4558
+ && (rect.height / rect.width) >= this.NARROW_ASPECT_RATIO;
4559
+ var layoutChanged = isNarrow !== this.isNarrowLayout;
4560
+ this.isNarrowLayout = isNarrow;
4561
+ if (layoutChanged) {
4562
+ // 布局模式切换后,等 CSS 生效再重新渲染
4563
+ this.$nextTick(function () {
4564
+ _this.beforeRedraw();
4565
+ _this.redraw();
4566
+ });
4567
+ }
4568
+ else {
4569
+ this.beforeRedraw();
4570
+ this.redraw();
4571
+ }
3608
4572
  };
3609
4573
  ScatterChart.prototype.redraw = function () {
3610
4574
  this.init();
@@ -3625,29 +4589,85 @@ var ScatterChart = /** @class */ (function (_super) {
3625
4589
  // 清除现有的SVG
3626
4590
  var mainChartElement = this.$el.querySelector('.main-chart');
3627
4591
  var legendsElement = this.$el.querySelector('.chart-legends');
4592
+ if (!mainChartElement) {
4593
+ return; // 模板还未就绪,跳过渲染
4594
+ }
3628
4595
  select(mainChartElement).selectAll('*').remove();
3629
- select(legendsElement).selectAll('*').remove();
3630
- this.svgWidth = mainChartElement && mainChartElement.clientWidth > 0
3631
- ? mainChartElement.clientWidth : 300;
3632
- this.svgHeight = mainChartElement && mainChartElement.clientHeight > 0
3633
- ? mainChartElement.clientHeight : 300;
3634
- this.legendSvgWidth = legendsElement && legendsElement.clientWidth > 0
3635
- ? legendsElement.clientWidth : 150;
3636
- this.legendSvgHeight = legendsElement && legendsElement.clientHeight > 0
3637
- ? legendsElement.clientHeight : this.svgHeight;
4596
+ if (legendsElement) {
4597
+ select(legendsElement).selectAll('*').remove();
4598
+ }
4599
+ // 使用容器布局状态
4600
+ var isNarrowLayout = this.isNarrowLayout;
4601
+ // 主图尺寸 - 优先使用 getBoundingClientRect 获取真实尺寸
4602
+ var mainRect = mainChartElement.getBoundingClientRect();
4603
+ if (mainRect.width > 0) {
4604
+ this.svgWidth = mainRect.width;
4605
+ }
4606
+ else if (mainChartElement.clientWidth > 0) {
4607
+ this.svgWidth = mainChartElement.clientWidth;
4608
+ }
4609
+ else {
4610
+ this.svgWidth = 300;
4611
+ }
4612
+ if (mainRect.height > 0) {
4613
+ this.svgHeight = mainRect.height;
4614
+ }
4615
+ else if (isNarrowLayout) {
4616
+ this.svgHeight = 280;
4617
+ }
4618
+ else if (mainChartElement.clientHeight > 0) {
4619
+ this.svgHeight = mainChartElement.clientHeight;
4620
+ }
4621
+ else {
4622
+ this.svgHeight = 300;
4623
+ }
4624
+ // Legends 宽度 - 仅在存在 legends 容器时计算
4625
+ if (legendsElement) {
4626
+ var legendsRect = legendsElement.getBoundingClientRect();
4627
+ if (legendsRect.width > 0) {
4628
+ this.legendSvgWidth = legendsRect.width;
4629
+ }
4630
+ else if (legendsElement.clientWidth > 0) {
4631
+ this.legendSvgWidth = legendsElement.clientWidth;
4632
+ }
4633
+ else {
4634
+ var containerWidth = this.$el.getBoundingClientRect().width;
4635
+ if (isNarrowLayout) {
4636
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth : 300;
4637
+ }
4638
+ else {
4639
+ this.legendSvgWidth = containerWidth > 0 ? containerWidth * 0.25 : 150;
4640
+ }
4641
+ }
4642
+ }
4643
+ // Legends 高度 - 基于图例数量计算
4644
+ var legendsCount = this.categories.length;
4645
+ var itemHeight = isNarrowLayout ? this.LEGEND_ITEM_HEIGHT_NARROW : this.LEGEND_ITEM_HEIGHT;
4646
+ this.legendSvgHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
3638
4647
  this.width = this.svgWidth - this.margin.left - this.margin.right;
3639
4648
  this.height = this.svgHeight - this.margin.top - this.margin.bottom;
3640
- // 创建新的SVG
4649
+ // 创建新的SVG - 使用 viewBox + width:100% 确保 SVG 正确填满容器
3641
4650
  this.mainSvg = select(mainChartElement)
3642
4651
  .append('svg')
3643
- .attr('width', this.svgWidth)
3644
- .attr('height', this.svgHeight)
4652
+ .attr('viewBox', "0 0 " + this.svgWidth + " " + this.svgHeight)
4653
+ .attr('preserveAspectRatio', 'xMinYMin meet')
4654
+ .style('display', 'block')
4655
+ .style('width', '100%')
4656
+ .style('height', '100%')
3645
4657
  .append('g')
3646
4658
  .attr('transform', "translate(" + this.margin.left + ", " + this.margin.top + ")");
3647
- this.legendsSvg = select(legendsElement)
3648
- .append('svg')
3649
- .attr('width', this.legendSvgWidth)
3650
- .attr('height', this.legendSvgHeight);
4659
+ if (legendsElement) {
4660
+ this.legendsSvg = select(legendsElement)
4661
+ .append('svg')
4662
+ .attr('viewBox', "0 0 " + this.legendSvgWidth + " " + this.legendSvgHeight)
4663
+ .attr('preserveAspectRatio', 'xMinYMin meet')
4664
+ .style('display', 'block')
4665
+ .style('width', '100%')
4666
+ .style('height', '100%');
4667
+ }
4668
+ else {
4669
+ this.legendsSvg = null;
4670
+ }
3651
4671
  var limitedData = this.displayData.slice(-20);
3652
4672
  var xMaxValue = max(limitedData, function (d) { return d.values[0]; });
3653
4673
  var yMaxValue = max(limitedData, function (d) { return d.values[1]; });
@@ -3813,11 +4833,17 @@ var ScatterChart = /** @class */ (function (_super) {
3813
4833
  };
3814
4834
  ScatterChart.prototype.renderLabel = function () {
3815
4835
  var _this = this;
4836
+ if (!this.legendsSvg) {
4837
+ return; // 没有 legends 容器,跳过渲染
4838
+ }
4839
+ var itemHeight = this.isNarrowLayout
4840
+ ? this.LEGEND_ITEM_HEIGHT_NARROW
4841
+ : this.LEGEND_ITEM_HEIGHT;
3816
4842
  var labelGroup = this.legendsSvg.append('g');
3817
4843
  labelGroup.attr('transform', 'translate(0, 0)');
3818
4844
  labelGroup.append('text')
3819
4845
  .attr('x', 0)
3820
- .attr('y', 20)
4846
+ .attr('y', this.TITLE_HEIGHT)
3821
4847
  .attr('class', 'mo-label-title')
3822
4848
  .text(ChartService.formatDomainValue(this.groupings[1].label, this.legendSvgWidth, false));
3823
4849
  var legends = labelGroup.selectAll('.mo-label')
@@ -3825,19 +4851,31 @@ var ScatterChart = /** @class */ (function (_super) {
3825
4851
  .enter()
3826
4852
  .append('g')
3827
4853
  .attr('class', 'mo-label');
4854
+ var currentY = this.TITLE_HEIGHT + 15;
3828
4855
  legends.append('rect')
3829
4856
  .attr('width', '15')
3830
4857
  .attr('height', '15')
3831
4858
  .attr('x', 0)
3832
- .attr('y', function (d, i) { return 35 + i * 25; })
4859
+ .attr('y', function (d, i) { return currentY + i * itemHeight; })
3833
4860
  .attr('fill', function (d, i) { return ChartService.getColor(i, _this.colors); });
3834
4861
  legends.append('text')
3835
4862
  .attr('x', 25)
3836
- .attr('y', function (d, i) { return 47 + i * 25; })
4863
+ .attr('y', function (d, i) { return currentY + 12 + i * itemHeight; })
3837
4864
  .attr('class', 'mo-legend-text')
3838
4865
  .style('fill', this.labelColor || '')
3839
4866
  .text(function (d) { return ChartService
3840
4867
  .formatDomainValue(d.key, _this.legendSvgWidth, false); });
4868
+ // 渲染完成后,根据实际图例数量调整 SVG viewBox
4869
+ var legendsCount = this.categories.length;
4870
+ var newHeight = this.TITLE_HEIGHT + 15 + legendsCount * itemHeight + 20;
4871
+ this.legendSvgHeight = newHeight;
4872
+ var legendsElement = this.$el.querySelector('.chart-legends');
4873
+ if (legendsElement) {
4874
+ var legendsSvg = legendsElement.querySelector('svg');
4875
+ if (legendsSvg) {
4876
+ legendsSvg.setAttribute('viewBox', "0 0 " + this.legendSvgWidth + " " + newHeight);
4877
+ }
4878
+ }
3841
4879
  };
3842
4880
  ScatterChart.prototype.refactorGroupedData = function () {
3843
4881
  var pieces = [];
@@ -3915,20 +4953,36 @@ var __vue_render__$7 = function () {
3915
4953
  var _h = _vm.$createElement;
3916
4954
  var _c = _vm._self._c || _h;
3917
4955
  return _vm.groupType === "grouped" || _vm.categories.length > 0
3918
- ? _c("div", { staticClass: "chart-container chart-having-tips" }, [
3919
- _vm._m(0),
3920
- _vm._v(" "),
3921
- _vm.data.length > 20
3922
- ? _c("div", { staticClass: "chart-limit-tips" }, [
3923
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
3924
- : _vm._e() ])
3925
- : _c("div", { staticClass: "chart-container chart-having-tips" }, [
3926
- _c("div", { staticClass: "main-chart" }),
3927
- _vm._v(" "),
3928
- _vm.data.length > 20
3929
- ? _c("div", { staticClass: "chart-limit-tips" }, [
3930
- _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
3931
- : _vm._e() ])
4956
+ ? _c(
4957
+ "div",
4958
+ {
4959
+ staticClass:
4960
+ "chart-container chart-having-tips scatter-chart-container",
4961
+ class: { "narrow-layout": _vm.isNarrowLayout },
4962
+ },
4963
+ [
4964
+ _vm._m(0),
4965
+ _vm._v(" "),
4966
+ _vm.data.length > 20
4967
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
4968
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
4969
+ : _vm._e() ]
4970
+ )
4971
+ : _c(
4972
+ "div",
4973
+ {
4974
+ staticClass:
4975
+ "chart-container chart-having-tips scatter-chart-container",
4976
+ class: { "narrow-layout": _vm.isNarrowLayout },
4977
+ },
4978
+ [
4979
+ _c("div", { staticClass: "main-chart" }),
4980
+ _vm._v(" "),
4981
+ _vm.data.length > 20
4982
+ ? _c("div", { staticClass: "chart-limit-tips" }, [
4983
+ _vm._v("\n " + _vm._s(_vm.CHART_LIMIT_TIPS_TEXT) + "\n ") ])
4984
+ : _vm._e() ]
4985
+ )
3932
4986
  };
3933
4987
  var __vue_staticRenderFns__$7 = [
3934
4988
  function () {
@@ -3945,7 +4999,7 @@ __vue_render__$7._withStripped = true;
3945
4999
  /* style */
3946
5000
  var __vue_inject_styles__$7 = function (inject) {
3947
5001
  if (!inject) { return }
3948
- inject("data-v-6ee0dd74_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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 });
5002
+ 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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 });
3949
5003
 
3950
5004
  };
3951
5005
  /* scoped */
@@ -3985,10 +5039,58 @@ var TableChart = /** @class */ (function (_super) {
3985
5039
  _this.checkedImage = img$1;
3986
5040
  _this.uncheckedImage = img$2;
3987
5041
  _this.maxDisplayCount = 20;
5042
+ _this.containerWidth = 0;
5043
+ _this.resizeObserver = null;
5044
+ _this.resizeFrame = 0;
5045
+ _this.resizeTimer = null;
5046
+ _this.isFirstCheck = true;
3988
5047
  return _this;
3989
5048
  }
3990
5049
  TableChart.prototype.mounted = function () {
5050
+ var _this = this;
3991
5051
  this.ready = true;
5052
+ this.containerWidth = this.getWidth();
5053
+ // 监听容器尺寸变化,重新计算单元格宽度
5054
+ if (typeof ResizeObserver !== 'undefined') {
5055
+ this.resizeObserver = new ResizeObserver(function () {
5056
+ // observe 时会立即触发一次,跳过首次触发
5057
+ if (_this.isFirstCheck) {
5058
+ _this.isFirstCheck = false;
5059
+ return;
5060
+ }
5061
+ // rAF 合帧立即更新,拖动过程中列宽实时跟随
5062
+ if (!_this.resizeFrame) {
5063
+ _this.resizeFrame = requestAnimationFrame(function () {
5064
+ _this.resizeFrame = 0;
5065
+ _this.containerWidth = _this.getWidth();
5066
+ });
5067
+ }
5068
+ // 尾部防抖兜底:快速 resize 时浏览器可能丢弃 ResizeObserver 通知,
5069
+ // 停止后强制按最终宽度刷新一次
5070
+ if (_this.resizeTimer) {
5071
+ clearTimeout(_this.resizeTimer);
5072
+ }
5073
+ _this.resizeTimer = setTimeout(function () {
5074
+ _this.resizeTimer = null;
5075
+ _this.containerWidth = _this.getWidth();
5076
+ }, 150);
5077
+ });
5078
+ this.resizeObserver.observe(this.$el);
5079
+ }
5080
+ };
5081
+ TableChart.prototype.beforeDestroy = function () {
5082
+ if (this.resizeFrame) {
5083
+ cancelAnimationFrame(this.resizeFrame);
5084
+ this.resizeFrame = 0;
5085
+ }
5086
+ if (this.resizeTimer) {
5087
+ clearTimeout(this.resizeTimer);
5088
+ this.resizeTimer = null;
5089
+ }
5090
+ if (this.resizeObserver) {
5091
+ this.resizeObserver.disconnect();
5092
+ this.resizeObserver = null;
5093
+ }
3992
5094
  };
3993
5095
  TableChart.prototype.isNumber = function (index) {
3994
5096
  var header = this.data.headers[index];
@@ -4005,7 +5107,7 @@ var TableChart = /** @class */ (function (_super) {
4005
5107
  return header && header.dataType === 'boolean';
4006
5108
  };
4007
5109
  TableChart.prototype.getCellWidth = function (index) {
4008
- var width = this.getWidth();
5110
+ var width = this.containerWidth > 0 ? this.containerWidth : this.getWidth();
4009
5111
  var cellSize = this.data.headers.length;
4010
5112
  var cellWidth = width / cellSize;
4011
5113
  if (cellWidth.toString().indexOf('.') > 0
@@ -4204,7 +5306,7 @@ __vue_render__$8._withStripped = true;
4204
5306
  /* style */
4205
5307
  var __vue_inject_styles__$8 = function (inject) {
4206
5308
  if (!inject) { return }
4207
- inject("data-v-63fba983_0", { source: "/* 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 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.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}\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}\n.chart-container .main-chart {\n flex: 1;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.chart-container .chart-legends {\n width: 33%;\n height: 100%;\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}\n.no-data {\n width: 100%;\n height: 100%;\n min-height: 35rem;\n font-size: 1.4rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fff;\n}\n@media (prefers-color-scheme: dark) {\n.no-data {\n background-color: #1c1c1e;\n color: #6e6e6e;\n}\n}", map: undefined, media: undefined });
5309
+ inject("data-v-7eaa36cd_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 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.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}\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/* 窄屏布局: 容器高宽比 >= 1.8 时,图表与图例从左右布局变为上下布局 */\n/* 适用于使用 .chart-and-legends 包裹层的图表:BarChart / BarChartHorizontal / LineChart / ScatterChart */\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 flex-direction: column;\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: 1;\n height: auto;\n min-height: 200px;\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 margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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 flex-direction: column;\n}\n.funnel-chart-container.narrow-layout .main-chart,\n.pie-chart-container.narrow-layout .main-chart {\n flex: 1;\n height: auto;\n min-height: 200px;\n}\n.funnel-chart-container.narrow-layout .chart-legends,\n.pie-chart-container.narrow-layout .chart-legends {\n margin-top: 15px;\n margin-left: 30px;\n padding-bottom: 40px;\n width: 100%;\n flex: 1;\n height: auto;\n min-height: 100px;\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}\n.no-data {\n width: 100%;\n height: 100%;\n min-height: 35rem;\n font-size: 1.4rem;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fff;\n}\n@media (prefers-color-scheme: dark) {\n.no-data {\n background-color: #1c1c1e;\n color: #6e6e6e;\n}\n}", map: undefined, media: undefined });
4208
5310
 
4209
5311
  };
4210
5312
  /* scoped */