刘洋 1 năm trước cách đây
mục cha
commit
5efd53bdf6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/utils/chart.js

+ 1 - 1
src/utils/chart.js

@@ -497,7 +497,7 @@ export const createPercentBarOption = (
           let prevTotal = newData[i].reduce((num, v) => {
             return v + num;
           }, 0);
-          newData[i].push(100 - prevTotal);
+          newData[i].push(100 - prevTotal < 0 ? 0 : 100 - prevTotal);
         }
       }
     }