Browse Source

update 修改

linweizeng 2 years ago
parent
commit
093529cd48
1 changed files with 16 additions and 4 deletions
  1. 16 4
      src/views/scientificPayoffs/js/index.js

+ 16 - 4
src/views/scientificPayoffs/js/index.js

@@ -173,9 +173,10 @@ export default {
             list.push(item.NAME_)
             let o = {
                 name: item.NAME_,
-                value: item.count
+                value: item.count != 0 ? item.count : ''
             }
             listData.push(o)
+            console.log(listData)
         })
         let config = {
             xAxis: list,
@@ -231,10 +232,10 @@ export const barData = {
     },
     yAxis: {
         type: 'value',
-        // minInterval: '1',
-        max: 50,
+        minInterval: '1',
+        // max: 50,
         min: 0,
-        splitNumber: 10,
+        // splitNumber: 10,
         name: '数量(个)',
         nameTextStyle: {
             color: '#fff',
@@ -269,6 +270,17 @@ export const barData = {
                     { offset: 1, color: "#83bff6" },
                 ])
             }
+        },
+        label: {
+            show: true,
+            position: 'top',
+            textStyle: {
+                color: '#fff',
+                fontSize: 14
+            },
+            formatter (params) {
+                return params.value ? params.value : ''
+            }
         }
     }],
     tooltip: {