|
@@ -70,7 +70,7 @@ func GetChartSectionCombineData(chartInfo *chart_info.ChartInfo, mappingList []*
|
|
|
}
|
|
|
seriesItem.EdbInfoList[index].EdbName = edbMappingInfo.EdbName
|
|
|
seriesItem.EdbInfoList[index].EdbNameEn = edbMappingInfo.EdbNameEn
|
|
|
- seriesItem.EdbInfoList[index].EdbInfoType = edbMappingInfo.EdbInfoType
|
|
|
+ seriesItem.EdbInfoList[index].EdbInfoType = edbMappingInfo.EdbInfoCategoryType
|
|
|
seriesItem.EdbInfoList[index].Unit = edbMappingInfo.Unit
|
|
|
seriesItem.EdbInfoList[index].UnitEn = edbMappingInfo.UnitEn
|
|
|
if index == 0 {
|
|
@@ -578,15 +578,21 @@ func SortChartSeriesDataSet(baseName string, baseDataList []float64, baseSeriesN
|
|
|
|
|
|
}
|
|
|
length := len(indices)
|
|
|
- // 根据Group1的数据进行排序,asc决定是升序还是降序
|
|
|
+ baseDataSortList := make([]chart_info.ChartSectionSeriesValSort, length)
|
|
|
+ for i, value := range baseDataList {
|
|
|
+ if i < length {
|
|
|
+ baseDataSortList[i] = chart_info.ChartSectionSeriesValSort{Index: i, Value: value}
|
|
|
+ }
|
|
|
+ }
|
|
|
if asc == 1 {
|
|
|
- sort.Slice(indices, func(i, j int) bool {
|
|
|
- return baseDataList[i] < baseDataList[j]
|
|
|
- })
|
|
|
+ // 使用sort.Sort进行排序
|
|
|
+ sort.Sort(chart_info.ChartSectionSeriesValSortAsc(baseDataSortList))
|
|
|
} else {
|
|
|
- sort.Slice(indices, func(i, j int) bool {
|
|
|
- return baseDataList[i] > baseDataList[j]
|
|
|
- })
|
|
|
+ sort.Sort(chart_info.ChartSectionSeriesValSortDesc(baseDataSortList))
|
|
|
+ }
|
|
|
+
|
|
|
+ for k, v := range baseDataSortList {
|
|
|
+ indices[k] = v.Index
|
|
|
}
|
|
|
|
|
|
for i := range newIndices {
|