ソースを参照

feat: (dashborad) 最大数

gemercheung 2 年 前
コミット
988d47e8d1

+ 1 - 1
src/views/dashboard/analysis/components/VisitAnalysis.vue

@@ -111,7 +111,7 @@
         [],
       );
       console.log('viewStatics-data', bulletChatAmountsData.value);
-      const maxNumber = Math.max(...bulletChatAmountsData.value);
+      const maxNumber = Math.max(...bulletChatAmountsData.value.concat(userAmountData.value));
       const pow = Math.pow(10, maxNumber.toString().length - 1);
       maxSize.value = maxNumber > 10 ? Math.floor(maxNumber / 10) * 10 + pow * 2 : 10;
       console.log('maxSize', maxSize.value);

+ 1 - 1
src/views/dashboard/analysis/components/VisitAnalysisBar.vue

@@ -83,7 +83,7 @@
         [],
       );
 
-      const maxNumber = Math.max(...viewStaticsData.value);
+      const maxNumber = Math.max(...viewStaticsData.value.concat(shareStaticsData.value));
       const pow = Math.pow(10, maxNumber.toString().length - 1);
       maxSize.value = maxNumber > 10 ? Math.floor(maxNumber / 10) * 10 + pow * 2 : 10;
       console.log('maxSize', maxSize.value);