From 683dec23954007e97a400fda4cd5006d1eb20041 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 16 九月 2022 14:15:54 +0800
Subject: [PATCH] 1.看板根据需求进行了修改

---
 src/utils/myEcharts.js |  218 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 203 insertions(+), 15 deletions(-)

diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index 232c099..68f6185 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -146,7 +146,7 @@
         // color: '#fff',
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       },
       subtextStyle: {
         color: '#90979c',
@@ -177,7 +177,8 @@
     },
     xAxis: {
       type: 'category',
-      data: ['杞﹂棿涓�', '杞﹂棿浜�', '杞﹂棿涓�', '杞﹂棿鍥�', '杞﹂棿浜�'],
+      // data: ['杞﹂棿涓�', '杞﹂棿浜�', '杞﹂棿涓�', '杞﹂棿鍥�', '杞﹂棿浜�'],
+      data: ['鎬昏杞﹂棿', '娉ㄥ杞﹂棿', '鐢垫満杞﹂棿', '閾濅欢杞﹂棿'],
       axisLine: {
         lineStyle: {
           show: true,
@@ -389,7 +390,7 @@
         // color: '#fff',
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       }
     },
     tooltip: {
@@ -479,7 +480,7 @@
     },
     yAxis:
       {
-        name: '浜匡紙鍏冿級',
+        name: '涓囧厓',
         nameTextStyle: {
           color: colorY,
           fontSize: 14,
@@ -677,7 +678,7 @@
       textStyle: {
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       }
     },
     legend: {
@@ -710,7 +711,7 @@
         // color: '#fff',
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       }
     },
     xAxis: {
@@ -977,7 +978,7 @@
         // color: '#fff',
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       }
     },
     grid: {
@@ -1099,24 +1100,25 @@
 
 export function bar4() {
   const data = [{
-    name: '杞﹂棿涓�',
+    name: '鎬昏杞﹂棿',
     value: Math.floor(Math.random() * 10 + 90)
   },
   {
-    name: '杞﹂棿浜�',
+    name: '娉ㄥ杞﹂棿',
     value: Math.floor(Math.random() * 10 + 90)
   },
   {
-    name: '杞﹂棿涓�',
+    name: '鐢垫満杞﹂棿',
     value: Math.floor(Math.random() * 10 + 90)
   },
   {
-    name: '杞﹂棿鍥�',
-    value: Math.floor(Math.random() * 10 + 90)
-  }, {
-    name: '杞﹂棿浜�',
+    name: '閾濅欢杞﹂棿',
     value: Math.floor(Math.random() * 10 + 90)
   }
+    //   {
+    //   name: '杞﹂棿浜�',
+    //   value: Math.floor(Math.random() * 10 + 90)
+    // }
   ]
   const getArrByKey = (data, k) => {
     const key = k || 'value'
@@ -1156,7 +1158,7 @@
         // color: '#fff',
         color: '#00ffff',
         fontSize: '18',
-        fontWeight: 'lighter'
+        fontWeight: 'bolder'
       },
       subtextStyle: {
         color: '#90979c',
@@ -1275,3 +1277,189 @@
 
   return option
 }
+
+export function barline1() {
+  return {
+    backgroundColor: 'transparent',
+    tooltip: {},
+    title: {
+      text: '璁㈠崟瀹屾垚鎬绘暟',
+      left: '50%',
+      top: '5%',
+      textAlign: 'center',
+      textStyle: {
+        // color: '#fff',
+        color: '#00ffff',
+        fontSize: '18',
+        fontWeight: 'bolder'
+      }
+    },
+    grid: {
+      left: '4%',
+      right: '4%',
+      bottom: '4%',
+      top: '15%',
+      containLabel: true
+    },
+    legend: {
+      show: false,
+      itemGap: 50,
+      data: ['娉ㄥ唽鎬婚噺', '鏈�鏂版敞鍐岄噺'],
+      textStyle: {
+        color: '#f9f9f9',
+        borderColor: '#fff'
+      }
+    },
+    xAxis: [{
+      type: 'category',
+      boundaryGap: true,
+      axisLabel: {
+        interval: 0,
+        formatter: '{value}',
+        fontSize: 14,
+        margin: 20,
+        textStyle: {
+          color: colorX
+        }
+      },
+      axisLine: {
+        lineStyle: {
+          color: '#032c58'
+        }
+      },
+      splitLine: {
+        show: false,
+        lineStyle: {
+          color: '#032c58'
+        }
+      },
+      axisTick: {
+        show: false
+      },
+      data: ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�']
+    }],
+    yAxis: [
+      {
+        max: 800,
+        boundaryGap: false,
+        splitNumber: 4,
+        type: 'value',
+        axisLabel: {
+          textStyle: {
+            fontSize: 14,
+            color: colorY
+          }
+        },
+        name: '鍗�',
+        nameTextStyle: {
+          color: colorY,
+          fontSize: 14,
+          lineHeight: 20
+        },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            color: '#032c58'
+          }
+        },
+        axisLine: {
+          show: true,
+          lineStyle: {
+            color: '#032c58'
+          }
+        },
+        axisTick: {
+          show: true
+        }
+      }
+    ],
+    series: [
+      {
+        name: '娉ㄥ唽鎬婚噺',
+        type: 'line',
+        // smooth: true, //鏄惁骞虫粦鏇茬嚎鏄剧ず
+        // 			symbol:'circle',  // 榛樿鏄┖蹇冨渾锛堜腑闂存槸鐧借壊鐨勶級锛屾敼鎴愬疄蹇冨渾
+        showAllSymbol: true,
+        symbol: 'emptyCircle',
+        symbolSize: 6,
+        lineStyle: {
+          normal: {
+            color: '#28ffb3' // 绾挎潯棰滆壊
+          },
+          borderColor: '#f0f'
+        },
+        label: {
+          show: true,
+          position: 'top',
+          textStyle: {
+            color: '#fff'
+          }
+        },
+        itemStyle: {
+          normal: {
+            color: '#28ffb3'
+
+          }
+        },
+        tooltip: {
+          show: false
+        },
+        areaStyle: { // 鍖哄煙濉厖鏍峰紡
+          normal: {
+            // 绾挎�ф笎鍙橈紝鍓�4涓弬鏁板垎鍒槸x0,y0,x2,y2(鑼冨洿0~1);鐩稿綋浜庡浘褰㈠寘鍥寸洅涓殑鐧惧垎姣斻�傚鏋滄渶鍚庝竴涓弬鏁版槸鈥榯rue鈥欙紝鍒欒鍥涗釜鍊兼槸缁濆鍍忕礌浣嶇疆銆�
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+              offset: 0,
+              color: 'rgba(0,154,120,1)'
+            },
+            {
+              offset: 1,
+              color: 'rgba(0,0,0, 0)'
+            }
+            ], false),
+            shadowColor: 'rgba(53,142,215, 0.9)', // 闃村奖棰滆壊
+            shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
+          }
+        },
+        // data: [393, 438, 485, 631, 689, 824, 987]
+        data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
+      }
+      //   {
+      //   name: '鏈�鏂版敞鍐岄噺',
+      //   type: 'bar',
+      //   barWidth: 20,
+      //   tooltip: {
+      //     show: false
+      //   },
+      //   label: {
+      //     show: true,
+      //     position: 'top',
+      //     textStyle: {
+      //       color: '#fff',
+      //     }
+      //   },
+      //   itemStyle: {
+      //     normal: {
+      //       // barBorderRadius: 5,
+      //       // color: new echarts.graphic.LinearGradient(
+      //       //     0, 0, 0, 1,
+      //       //     [{
+      //       //             offset: 0,
+      //       //             color: '#14c8d4'
+      //       //         },
+      //       //         {
+      //       //             offset: 1,
+      //       //             color: '#43eec6'
+      //       //         }
+      //       //     ]
+      //       // )
+      //       color: function (params) {
+      //         var colorList = ['#0ec1ff', '#10cdff', '#12daff', '#15ebff', '#17f8ff', '#1cfffb', '#1dfff1'];
+      //         return colorList[params.dataIndex];
+      //       }
+      //     }
+      //   },
+      //   data: [200, 382, 102, 267, 186, 315, 316]
+      // }
+    ]
+  }
+}

--
Gitblit v1.9.3