Karsa 1 年之前
父节点
当前提交
4380259502
共有 1 个文件被更改,包括 18 次插入10 次删除
  1. 18 10
      src/views/hzyb/chart/Detail.vue

+ 18 - 10
src/views/hzyb/chart/Detail.vue

@@ -2096,19 +2096,27 @@ const setAxisPlotAreas = (axis,axisType) => {
             toMarkerValue = Number(_.toValue);
             toMarkerValue = Number(_.toValue);
         }
         }
 
 
+        //默认label有些偏移 重新归正下
+        let positionMapValue = {
+            'top': 12,
+            'middle': 0,
+            'bottom': -10
+        }
+
         return { 
         return { 
-        from: fromMarkerValue,
-        to: toMarkerValue,
-        color: _.color,
-        label: {
-            text: _.text||'',
-            verticalAlign: _.textPosition,
-            style: {
-            color: _.textColor,
-            fontSize: _.textFontSize
+            from: fromMarkerValue,
+            to: toMarkerValue,
+            color: _.color,
+            label: {
+                text: _.text||'',
+                verticalAlign: _.textPosition,
+                y: positionMapValue[_.textPosition],
+                style: {
+                    color: _.textColor,
+                    fontSize: _.textFontSize
+                }
             }
             }
         }
         }
-        }
     })
     })
 
 
     return plotBands
     return plotBands