ソースを参照

饼图去掉图例/图标y轴该实线,部分文字修改

tianyabing 2 年 前
コミット
25a7b39eb0
25 ファイル変更95 行追加34 行削除
  1. 2 2
      src/components/dashboard/more/carbonOverviewChart.vue
  2. 6 3
      src/components/dashboard/portrait/cold/coldTrendChart.vue
  3. 4 4
      src/components/dashboard/portrait/hot/hotTrendChart.vue
  4. 3 3
      src/components/dashboard/portrait/water/waterUseChart.vue
  5. 1 1
      src/components/doubleCarbon/PV/charts/carbonPvEmissionChart.vue
  6. 1 1
      src/components/doubleCarbon/PV/charts/carbonPvQuotaChart.vue
  7. 1 1
      src/components/doubleCarbon/PV/doubleCarbonPv.vue
  8. 1 1
      src/components/doubleCarbon/car/charts/carbonCarEmissionChart.vue
  9. 1 1
      src/components/doubleCarbon/car/charts/carbonCarQuotaChart.vue
  10. 2 2
      src/components/doubleCarbon/car/doubleCarbonCar.vue
  11. 1 1
      src/components/doubleCarbon/overview/charts/carbonEmissionChart.vue
  12. 1 1
      src/components/doubleCarbon/overview/charts/carbonOverviewPercent.vue
  13. 1 1
      src/components/doubleCarbon/overview/charts/carbonQuotaChart.vue
  14. 4 4
      src/components/doubleCarbon/overview/doubleCarbonOverview.vue
  15. 1 1
      src/components/doubleCarbon/print/charts/carbonPrintEmissionChart.vue
  16. 1 1
      src/components/doubleCarbon/print/charts/carbonPrintQuotaChart.vue
  17. 2 2
      src/components/doubleCarbon/print/doubleCarbonPrint.vue
  18. 12 0
      src/components/life/parking/components/lifeParkConsumeChart.vue
  19. 12 0
      src/components/life/parking/components/lifeParkUnNormalChart.vue
  20. 1 1
      src/components/life/parking/lifeParking.vue
  21. 12 0
      src/components/life/restaurant/components/LifeRestPayChart.vue
  22. 12 0
      src/components/life/restaurant/components/LifeRestProfitChart.vue
  23. 1 1
      src/components/life/restaurant/lifeRestaurant.vue
  24. 1 1
      src/components/security/person/securityPerson.vue
  25. 11 1
      src/utils/dataUtil.js

+ 2 - 2
src/components/dashboard/more/carbonOverviewChart.vue

@@ -27,10 +27,10 @@ export default {
         },
         yAxis: [
           {
-            name:"碳配额(tCO2e)",
+            name:"碳配额(tCOe)",
             type: 'value',
             nameTextStyle: {
-              padding: [10, 0, 10, -20]
+              padding: [10, 0, 10, 20]
             },
           },
         ],

+ 6 - 3
src/components/dashboard/portrait/cold/coldTrendChart.vue

@@ -7,7 +7,7 @@ export default {
       option: {
         legend: {
           data: [
-            '用冷',
+            '用冷',
             '温度',
           ]
         },
@@ -24,8 +24,11 @@ export default {
         },
         yAxis: [
           {
-            name: '冷量(kWh)',
+            name: '冷量(kWh)',
             type: 'value',
+            nameTextStyle: {
+              padding: [10, 0, 10, 15]
+            },
           },
           {
             name: '温度(℃)',
@@ -53,7 +56,7 @@ export default {
         },
         series: [
           {
-            name: '用冷',
+            name: '用冷',
             data: [],
             type: 'line',
             yAxisIndex:0,

+ 4 - 4
src/components/dashboard/portrait/hot/hotTrendChart.vue

@@ -7,7 +7,7 @@ export default {
       option: {
         legend: {
           data: [
-            '用热',
+            '用热',
             '温度',
           ]
         },
@@ -24,10 +24,10 @@ export default {
         },
         yAxis: [
           {
-            name: '热量(kWh)',
+            name: '热量(kWh)',
             type: 'value',
             nameTextStyle: {
-              padding: [10, 0, 10, 15]
+              padding: [10, 0, 10, 30]
             },
           },
           {
@@ -59,7 +59,7 @@ export default {
         },
         series: [
           {
-            name: '用热',
+            name: '用热',
             data: [],
             type: 'line',
             stack: 'a',

+ 3 - 3
src/components/dashboard/portrait/water/waterUseChart.vue

@@ -8,7 +8,7 @@ export default {
       option: {
         legend: {
           data: [
-            '用水',
+            '用水',
           ]
         },
         grid: {
@@ -24,7 +24,7 @@ export default {
         },
         yAxis: [
           {
-            name: '用水量(m³',
+            name: '用水量(m³)',
             type: 'value',
           },
         ],
@@ -49,7 +49,7 @@ export default {
         },
         series: [
           {
-            name: '用水',
+            name: '用水',
             data: [],
             type: 'line',
             stack: 'x',

+ 1 - 1
src/components/doubleCarbon/PV/charts/carbonPvEmissionChart.vue

@@ -45,7 +45,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO2e)',
+            name: '排放量(tCOe)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 1 - 1
src/components/doubleCarbon/PV/charts/carbonPvQuotaChart.vue

@@ -21,7 +21,7 @@ export default {
         },
         title:[
           {
-            subtext: "单位: tCO2e", //主标题
+            subtext: "单位: tCOe", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
             bottom: "0px",
             subtextStyle: {

+ 1 - 1
src/components/doubleCarbon/PV/doubleCarbonPv.vue

@@ -29,7 +29,7 @@ export default {
       ],
       coreData: [
         {
-          title: "光伏累计减排(tco2e/年内)",
+          title: "光伏累计减排(tCO₂e/年内)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 1 - 1
src/components/doubleCarbon/car/charts/carbonCarEmissionChart.vue

@@ -44,7 +44,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO2e)',
+            name: '排放量(tCOe)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 1 - 1
src/components/doubleCarbon/car/charts/carbonCarQuotaChart.vue

@@ -20,7 +20,7 @@ export default {
         },
         title:[
           {
-            subtext: "单位: tCO2e", //主标题
+            subtext: "单位: tCOe", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
             bottom: "0px",
             subtextStyle: {

+ 2 - 2
src/components/doubleCarbon/car/doubleCarbonCar.vue

@@ -29,7 +29,7 @@ export default {
       ],
       coreData: [
         {
-          title: '车辆累计排放(tco2e)',
+          title: '车辆累计排放(tCO₂e)',
           num: 0,
           historyDesc: '同比',
           historyNum: 0
@@ -47,7 +47,7 @@ export default {
           historyNum: 0
         },
         {
-          title: '车辆平均碳排放(tco2e/辆/天)',
+          title: '车辆平均碳排放(tCO₂e/辆/天)',
           num: 0,
           historyDesc: '同比',
           historyNum: 0

+ 1 - 1
src/components/doubleCarbon/overview/charts/carbonEmissionChart.vue

@@ -43,7 +43,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO2e)',
+            name: '排放量(tCOe)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 1 - 1
src/components/doubleCarbon/overview/charts/carbonOverviewPercent.vue

@@ -19,7 +19,7 @@ export default {
         },
         title:[
           {
-            subtext: "单位: tCO2e", //主标题
+            subtext: "单位: tCOe", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
             bottom: "5px",
             subtextStyle: {

+ 1 - 1
src/components/doubleCarbon/overview/charts/carbonQuotaChart.vue

@@ -21,7 +21,7 @@ export default {
         },
         title:[
           {
-            subtext: "单位: tCO2e", //主标题
+            subtext: "单位: tCOe", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
             bottom: "0px",
             subtextStyle: {

+ 4 - 4
src/components/doubleCarbon/overview/doubleCarbonOverview.vue

@@ -40,25 +40,25 @@ export default {
           historyNum: 0,
         },
         {
-          title: "碳排放总量(tco2e)",
+          title: "碳排放总量(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "单位面积碳排放(tco2e/m²)",
+          title: "单位面积碳排放(tCO₂e/m²)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "人均碳排放(tco2e/人)",
+          title: "人均碳排放(tCO₂e/人)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "光伏减排(tco2e)",
+          title: "光伏减排(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 1 - 1
src/components/doubleCarbon/print/charts/carbonPrintEmissionChart.vue

@@ -45,7 +45,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO2e)',
+            name: '排放量(tCOe)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 1 - 1
src/components/doubleCarbon/print/charts/carbonPrintQuotaChart.vue

@@ -21,7 +21,7 @@ export default {
         },
         title:[
           {
-            subtext: "单位: tCO2e", //主标题
+            subtext: "单位: tCOe", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
             bottom: "0px",
             subtextStyle: {

+ 2 - 2
src/components/doubleCarbon/print/doubleCarbonPrint.vue

@@ -29,13 +29,13 @@ export default {
       ],
       coreData: [
         {
-          title: "文印累计排放(tco2e/)",
+          title: "文印累计排放(tCO₂e/)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "文印人均排放(tco2e/天)",
+          title: "文印人均排放(tCO₂e/天)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 12 - 0
src/components/life/parking/components/lifeParkConsumeChart.vue

@@ -19,6 +19,18 @@ export default {
           left: 'center',
           icon: 'circle'
         },
+        title:[
+          {
+            subtext: "单位: 辆", //主标题
+            right: "1%", //标题的位置 默认是left,其余还有center、right属性
+            bottom: "60px",
+            subtextStyle: {
+              color: "rgb(160,160,160)",
+              fontSize: 14,
+              fontWeight: "normal",
+            },
+          },
+        ],
         series: [
           {
             name: '占用车位情况',

+ 12 - 0
src/components/life/parking/components/lifeParkUnNormalChart.vue

@@ -19,6 +19,18 @@ export default {
           left: 'center',
           icon: 'circle'
         },
+        title:[
+          {
+            subtext: "单位: 次", //主标题
+            right: "1%", //标题的位置 默认是left,其余还有center、right属性
+            bottom: "60px",
+            subtextStyle: {
+              color: "rgb(160,160,160)",
+              fontSize: 14,
+              fontWeight: "normal",
+            },
+          },
+        ],
         series: [
           {
             name: '违停情况',

+ 1 - 1
src/components/life/parking/lifeParking.vue

@@ -40,7 +40,7 @@ export default {
           historyNum: 0,
         },
         {
-          title: "空置车位",
+          title: "空置车位(个)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 12 - 0
src/components/life/restaurant/components/LifeRestPayChart.vue

@@ -17,6 +17,18 @@ export default {
           left: 'center',
           icon: 'circle'
         },
+        title:[
+          {
+            subtext: "单位: 元", //主标题
+            right: "1%", //标题的位置 默认是left,其余还有center、right属性
+            bottom: "0px",
+            subtextStyle: {
+              color: "rgb(160,160,160)",
+              fontSize: 14,
+              fontWeight: "normal",
+            },
+          },
+        ],
         series: [
           {
             name: '金额',

+ 12 - 0
src/components/life/restaurant/components/LifeRestProfitChart.vue

@@ -17,6 +17,18 @@ export default {
           left: 'center',
           icon: 'circle'
         },
+        title:[
+          {
+            subtext: "单位: 元", //主标题
+            right: "1%", //标题的位置 默认是left,其余还有center、right属性
+            bottom: "0px",
+            subtextStyle: {
+              color: "rgb(160,160,160)",
+              fontSize: 14,
+              fontWeight: "normal",
+            },
+          },
+        ],
         series: [
           {
             name: '金额',

+ 1 - 1
src/components/life/restaurant/lifeRestaurant.vue

@@ -43,7 +43,7 @@ export default {
           historyNum: 0,
         },
         {
-          title: "累计就餐人数(人)",
+          title: "累计就餐人数(人)",
           num: 0,
           historyDesc: "环比",
           historyNum: 0,

+ 1 - 1
src/components/security/person/securityPerson.vue

@@ -12,7 +12,7 @@ export default {
       chartShow: false,
       coreData: [
         {
-          title: '当天进入数(个)',
+          title: '当天进入数(个)',
           num: 0,
           historyDesc: '环比',
           historyNum: 0

+ 11 - 1
src/utils/dataUtil.js

@@ -99,7 +99,16 @@ const refreshEchartsData = (instance, option, data) => {
         fontFamily: "Microsoft YaHei, PingFangSC-Regular, serif",
         color: '#757575'
     };
-
+    if (option.yAxis && option.yAxis.length>0) {
+        for (let i = 0; i < option.yAxis.length; i++) {
+            option.yAxis[i]['axisLine']={
+                show: true
+            }
+            option.yAxis[i]['axisTick']={
+                show: true
+            }
+        }
+    }
     instance.setOption(option)
 }
 
@@ -186,6 +195,7 @@ const circleChartConfig = (option) => {
             show: true
         }
     }
+    option.legend.show = false
     option.color = constant.echartsColors;
     Object.assign(option.series[0].labelLine, labelLine)
     return option;