yanghao 1 неделя назад
Родитель
Сommit
61556e9729
1 измененных файлов с 9 добавлено и 6 удалено
  1. 9 6
      src/views/pms/stat/rdkb/rd-Inventory-safety.vue

+ 9 - 6
src/views/pms/stat/rdkb/rd-Inventory-safety.vue

@@ -141,7 +141,8 @@ function getChartLayout(chartRef: Ref<HTMLDivElement | undefined>) {
     distributionLegendGap: compact ? 4 : 10,
     distributionLegendFontSize: compact ? 10 : 14,
     trendGridTop: compact ? 10 : 32,
-    trendGridRight: compact ? 12 : THEME.grid.right,
+    trendGridLeft: compact ? 34 : 48,
+    trendGridRight: compact ? 34 : 48,
     trendGridBottom: compact ? 2 : THEME.grid.bottom,
     legendTop: compact ? 0 : 4,
     legendRight: compact ? 2 : 6,
@@ -155,7 +156,8 @@ function getChartLayout(chartRef: Ref<HTMLDivElement | undefined>) {
     barGap: compact ? '12%' : '5%',
     barCategoryGap: compact ? '46%' : '36%',
     labelDistance: compact ? 4 : 7,
-    labelFontSize: compact ? 6 : 8
+    distributionLabelFontSize: compact ? 6 : 8,
+    trendLabelFontSize: compact ? 10 : 12
   }
 }
 
@@ -283,7 +285,7 @@ function getDistributionOption(
           bleedMargin: 0,
           formatter: '{b}\n{d}%',
           color: 'inherit',
-          fontSize: layout.labelFontSize,
+          fontSize: layout.distributionLabelFontSize,
           fontWeight: 500,
           fontFamily: FONT_FAMILY
         },
@@ -334,7 +336,7 @@ function getDistributionOption(
           bleedMargin: 0,
           formatter: '{b}\n{d}%',
           color: 'inherit',
-          fontSize: layout.labelFontSize,
+          fontSize: layout.distributionLabelFontSize,
           fontWeight: 500,
           fontFamily: FONT_FAMILY
         },
@@ -422,6 +424,7 @@ function getInventoryAgingOption(data: unknown): echarts.EChartsOption {
     animation: false,
     grid: {
       ...THEME.grid,
+      left: layout.trendGridLeft,
       top: layout.trendGridTop,
       right: layout.trendGridRight,
       bottom: layout.trendGridBottom
@@ -434,7 +437,7 @@ function getInventoryAgingOption(data: unknown): echarts.EChartsOption {
     }),
     xAxis: {
       type: 'category',
-      boundaryGap: false,
+      boundaryGap: true,
       data: months,
       axisTick: { show: false },
       axisLabel: {
@@ -487,7 +490,7 @@ function getInventoryAgingOption(data: unknown): echarts.EChartsOption {
         label: {
           show: true,
           color: THEME.color.orange.line,
-          fontSize: layout.labelFontSize,
+          fontSize: layout.trendLabelFontSize,
           fontFamily: FONT_FAMILY,
           formatter(params: any) {
             return `${formatAmount(Number(params.value))}万`