Karsa 2 éve
szülő
commit
b232fd67fd
2 módosított fájl, 13 hozzáadás és 14 törlés
  1. 1 1
      src/utils/chartOptions.ts
  2. 12 13
      src/views/chartShow/index.vue

+ 1 - 1
src/utils/chartOptions.ts

@@ -94,7 +94,7 @@ export const defaultOpts = {
   legend: {
     enabled: true,
     verticalAlign: 'top',
-    margin: 3,
+    margin: 20,
     // layout: 'vertical'
   },
   //滚动条

+ 12 - 13
src/views/chartShow/index.vue

@@ -100,7 +100,6 @@ export default defineComponent({
 
     /* 处理图表来源 只限第三方 */
     const dealSourceHandle = (): void => {
-      // const thirdArr = [1,2,3,10,11,15,16,17,18,19,20,21];
 
       // 取出第三方来源 
       const arr = state.dataList.filter(item => item.EdbType === 1 && item.Source!== 9).map(item => ({
@@ -190,8 +189,8 @@ export default defineComponent({
             },
           },
           title: {
-            // text: sameSideIndex !== index ? '' : `单位:${item.Unit}`,
-            text: null,
+            text: sameSideIndex !== index ? '' : `单位:${item.Unit}`,
+            // text: null,
             align: 'high',
             rotation: 0,
             y: -15,
@@ -334,8 +333,8 @@ export default defineComponent({
             },
           },
           title: {
-            // text: sameSideIndex !== index ? '' : `单位:${item.Unit}`,
-            text: null,
+            text: sameSideIndex !== index ? '' : `单位:${item.Unit}`,
+            // text: null,
             align: 'high',
             rotation: 0,
             y: -15,
@@ -462,8 +461,8 @@ export default defineComponent({
               x: -5,
             },
             title: {
-              // text:  `单位:${chartData.Unit}`,
-              text: null,
+              text:  `单位:${chartData.Unit}`,
+              // text: null,
               align: 'high',
               rotation: 0,
               y: -15,
@@ -514,8 +513,8 @@ export default defineComponent({
               x: -5,
             },
             title: {
-              // text:  `单位:${chartData.Unit}`,
-              text: null,
+              text:  `单位:${chartData.Unit}`,
+              // text: null,
               align: 'high',
               rotation: 0,
               y: -15,
@@ -653,8 +652,8 @@ export default defineComponent({
       //y轴
       let yAxis = {
         title: {
-          // text:  `单位:${dataList[1].Unit}`,
-          text: null,
+          text:  `单位:${dataList[1].Unit}`,
+          // text: null,
           align: 'high',
           rotation: 0,
           y: -5,
@@ -706,8 +705,8 @@ export default defineComponent({
         xAxis: {
           ...scatterXAxis,
           title: {
-            // text:  `单位:${dataList[0].Unit}`,
-            text: null,
+            text:  `单位:${dataList[0].Unit}`,
+            // text: null,
             align: 'high',
             rotation: 0,
             x: 0,