Browse Source

客流图表颜色

bls-dan 2 years ago
parent
commit
bd6d9d0337
1 changed files with 62 additions and 30 deletions
  1. 62 30
      src/pages/views/home/components/PassengerFlow.vue

+ 62 - 30
src/pages/views/home/components/PassengerFlow.vue

@@ -153,7 +153,7 @@ const leftContent = ref({
             type: 'pie', // 图表类型为饼图
             type: 'pie', // 图表类型为饼图
             radius: [ '55%', '75%' ], // 控制内外圆环的半径,30%代表内圆,60%代表外圆
             radius: [ '55%', '75%' ], // 控制内外圆环的半径,30%代表内圆,60%代表外圆
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
-            showEmptyCircle: true, // 是否在无数据的候显示一个占位圆
+            showEmptyCircle: true, // 是否在无数据的候显示一个占位圆
             label: {
             label: {
               show: true,
               show: true,
               formatter: '{d}%',
               formatter: '{d}%',
@@ -256,16 +256,16 @@ const leftContent = ref({
               normal: {
               normal: {
                 color: new graphic.LinearGradient(
                 color: new graphic.LinearGradient(
                   0,
                   0,
-                  1,
                   0,
                   0,
                   0,
                   0,
+                  1,
                   [ {
                   [ {
                     offset: 0,
                     offset: 0,
-                    color: 'rgba(96, 132, 255, 0)'// 0% 处的颜色
+                    color: '#00fdff'// 0% 处的颜色
                   },
                   },
                   {
                   {
                     offset: 1,
                     offset: 1,
-                    color: 'rgba(96, 132, 255, 1)' // 100% 处的颜色
+                    color: '#00aaff08' // 100% 处的颜色
                   }
                   }
                   ],
                   ],
                   false
                   false
@@ -741,8 +741,8 @@ const rightContent = ref({
         normal: {
         normal: {
           // color: '#4293FD',
           // color: '#4293FD',
           lineStyle: {
           lineStyle: {
-            // color: '#4293FD',
-            width: 2
+            // color: '#FFD35D',
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -751,11 +751,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(19, 95, 172, 0)'
+              color: '#FFD35D66'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(112, 154, 195, 0.4)'
+              color: '#189066'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -772,7 +776,7 @@ const rightContent = ref({
           // color: '#23D0C4',
           // color: '#23D0C4',
           lineStyle: {
           lineStyle: {
             // color: '#23D0C4',
             // color: '#23D0C4',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -781,11 +785,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(50, 216, 205, 0)'
+              color: '#6A5BF066'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(35, 208, 196, 0.4)'
+              color: '#1890ff66'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -874,7 +882,7 @@ const rightContent = ref({
           // color: '#4293FD',
           // color: '#4293FD',
           lineStyle: {
           lineStyle: {
             // color: '#4293FD',
             // color: '#4293FD',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -883,11 +891,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(19, 95, 172, 0)'
+              color: '#FFD35D66'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(112, 154, 195, 0.4)'
+              color: '#189066'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -904,7 +916,7 @@ const rightContent = ref({
           // color: '#23D0C4',
           // color: '#23D0C4',
           lineStyle: {
           lineStyle: {
             // color: '#23D0C4',
             // color: '#23D0C4',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -913,11 +925,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(50, 216, 205, 0)'
+              color: '#6A5BF066'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(35, 208, 196, 0.4)'
+              color: '#1890ff66'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -934,7 +950,7 @@ const rightContent = ref({
           // color: '#23D0C4',
           // color: '#23D0C4',
           lineStyle: {
           lineStyle: {
             // color: '#23D0C4',
             // color: '#23D0C4',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -943,11 +959,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(50, 216, 205, 0)'
+              color: '#2ECC7166'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(35, 208, 196, 0.4)'
+              color: '#1890ff66'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -991,7 +1011,7 @@ const rightContent = ref({
       axisTick: {
       axisTick: {
         show: false
         show: false
       },
       },
-      data: [ '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时' ]
+      data: [ '1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日' ]
     } ],
     } ],
     yAxis: [ {
     yAxis: [ {
       name: '人数/人',
       name: '人数/人',
@@ -1036,7 +1056,7 @@ const rightContent = ref({
           // color: '#4293FD',
           // color: '#4293FD',
           lineStyle: {
           lineStyle: {
             // color: '#4293FD',
             // color: '#4293FD',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -1045,11 +1065,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(19, 95, 172, 0)'
+              color: '#FFD35D66'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(112, 154, 195, 0.4)'
+              color: '#189066'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -1066,7 +1090,7 @@ const rightContent = ref({
           // color: '#23D0C4',
           // color: '#23D0C4',
           lineStyle: {
           lineStyle: {
             // color: '#23D0C4',
             // color: '#23D0C4',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -1075,11 +1099,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(50, 216, 205, 0)'
+              color: '#6A5BF066'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(35, 208, 196, 0.4)'
+              color: '#1890ff66'
             }
             }
           ], false)
           ], false)
         }
         }
@@ -1096,7 +1124,7 @@ const rightContent = ref({
           // color: '#23D0C4',
           // color: '#23D0C4',
           lineStyle: {
           lineStyle: {
             // color: '#23D0C4',
             // color: '#23D0C4',
-            width: 2
+            width: 1
           }
           }
         }
         }
       },
       },
@@ -1105,11 +1133,15 @@ const rightContent = ref({
           color: new graphic.LinearGradient(0, 0, 0, 1, [
           color: new graphic.LinearGradient(0, 0, 0, 1, [
             {
             {
               offset: 0,
               offset: 0,
-              color: 'rgba(50, 216, 205, 0)'
+              color: '#2ECC7166'
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f366'
             },
             },
             {
             {
               offset: 1,
               offset: 1,
-              color: 'rgba(35, 208, 196, 0.4)'
+              color: '#1890ff66'
             }
             }
           ], false)
           ], false)
         }
         }