Sfoglia il codice sorgente

fix: 统计分析百分位个数算法

hsun 1 anno fa
parent
commit
4b011d919d
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      services/data/cross_variety/chart.go

+ 4 - 4
services/data/cross_variety/chart.go

@@ -343,10 +343,10 @@ func GetChartData(chartInfoId int, config request.ChartConfigReq) (edbList []*da
 					}
 					if !date.Before(earliestDate) && !date.After(endDate) {
 						bigN += 1
-					}
-					dateVal := decimal.NewFromFloat(dataList[i].Value)
-					if dateVal.LessThanOrEqual(lastVal) {
-						tinyN += 1
+						dateVal := decimal.NewFromFloat(dataList[i].Value)
+						if dateVal.LessThanOrEqual(lastVal) {
+							tinyN += 1
+						}
 					}
 				}
 				// N=1时说明计算无效