|
@@ -1503,7 +1503,35 @@ func (this *ChartInfoController) PreviewChartInfoDetail() {
|
|
|
}
|
|
|
}
|
|
|
} else if markerLines[i].Calculation == 3 {
|
|
|
- // 区间分位
|
|
|
+ // 区间个数分位
|
|
|
+ markerLineValue := 0.0
|
|
|
+ for _, v := range edbList {
|
|
|
+ if v.IsAxis == 1 {
|
|
|
+ if chartInfo.ChartType == 2 && markerLines[i].EdbType == 0 {
|
|
|
+ //季节性图结构体不一样
|
|
|
+ dataList := make([]float64,0)
|
|
|
+ quarterDataList := v.DataList.(data_manage.QuarterDataList)
|
|
|
+ for _, quarterData := range quarterDataList[len(quarterDataList) - 1:] {
|
|
|
+ for _, vv := range quarterData.DataList {
|
|
|
+ dataList = append(dataList, vv.Value)
|
|
|
+ }
|
|
|
+
|
|
|
+ markerLineValue = data.PercentileAlgorithm(float64(markerLines[i].CalculationValue), dataList)
|
|
|
+ markerLines[i].Value = fmt.Sprintf("%.2f", markerLineValue)
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ dataList := v.DataList.([]*data_manage.EdbDataList)
|
|
|
+ floatList := make([]float64,0)
|
|
|
+ for _, dataItem := range dataList {
|
|
|
+ floatList = append(floatList, dataItem.Value)
|
|
|
+ }
|
|
|
+
|
|
|
+ markerLineValue = data.PercentileAlgorithm(float64(markerLines[i].CalculationValue), dataList)
|
|
|
+ markerLines[i].Value = fmt.Sprintf("%.2f", markerLineValue)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|