tanyanfei 6 months ago
parent
commit
d1ab264b85
2 changed files with 17 additions and 4 deletions
  1. 9 2
      src/components/PatBleedCount.vue
  2. 8 2
      src/components/PatGjBleedCount.vue

+ 9 - 2
src/components/PatBleedCount.vue

@@ -119,7 +119,10 @@
                         barWidth:30,
                         barWidth:30,
                         label:{
                         label:{
                           show:true,
                           show:true,
-                          position:'inside'
+                          position:'inside',
+                          formatter: function (value, index) {//隐藏 0
+                            return value.data?value.data:'';
+                          },
                         }
                         }
                       },
                       },
                       {
                       {
@@ -132,7 +135,11 @@
                         stack: '1',
                         stack: '1',
                         label:{
                         label:{
                           show:true,
                           show:true,
-                          position:'inside'
+                          position:'inside',
+                          formatter: function (value, index) {//隐藏 0
+                          // console.log(value)
+                            return value.data?value.data:'';
+                          },
                         }
                         }
                       }
                       }
                     ]
                     ]

+ 8 - 2
src/components/PatGjBleedCount.vue

@@ -129,7 +129,10 @@
                         stack: '1',
                         stack: '1',
                         label:{
                         label:{
                           show:true,
                           show:true,
-                          position:'inside'
+                          position:'inside',
+                          formatter: function (value, index) {//隐藏 0
+                            return value.data?value.data:'';
+                          },
                         }
                         }
                       },
                       },
                       {
                       {
@@ -142,7 +145,10 @@
                         stack: '1',
                         stack: '1',
                         label:{
                         label:{
                           show:true,
                           show:true,
-                          position:'inside'
+                          position:'inside',
+                          formatter: function (value, index) {//隐藏 0
+                            return value.data?value.data:'';
+                          },
                         }
                         }
                       }
                       }
                     ]
                     ]