|
@@ -68,6 +68,7 @@ type CoordinatePoint struct {
|
|
|
YDate string
|
|
|
DateType int `description:"日期类型:1-最新日期;2-N天前;3-固定日期"`
|
|
|
DaysAgo int `description:"N天前的N值"`
|
|
|
+ ShowTips int `description:"是否显示标注:0-否;1-是"`
|
|
|
}
|
|
|
|
|
|
// GetChartData
|
|
@@ -165,10 +166,12 @@ func GetChartData(chartInfoId int, config request.ChartConfigReq) (edbList []*da
|
|
|
dateMap := make(map[string]string)
|
|
|
dateTypeMap := make(map[int]int) // 日期配置key对应的日期类型
|
|
|
daysAgoMap := make(map[int]int) // 日期配置key对应的N天前的N值
|
|
|
+ showTipsMap := make(map[int]int) // 日期配置key对应点是否显示标注
|
|
|
|
|
|
for dateIndex, dateConfig := range config.DateConfigList {
|
|
|
dateTypeMap[dateIndex] = dateConfig.DateType
|
|
|
daysAgoMap[dateIndex] = dateConfig.Num
|
|
|
+ showTipsMap[dateIndex] = dateConfig.ShowTips
|
|
|
for _, edbInfoMapping := range mappingList {
|
|
|
// 数据会是正序的
|
|
|
dataList, ok := edbDataListMap[edbInfoMapping.EdbInfoId]
|
|
@@ -423,6 +426,7 @@ func GetChartData(chartInfoId int, config request.ChartConfigReq) (edbList []*da
|
|
|
YDate: dateMap[key2],
|
|
|
DateType: dateTypeMap[dateIndex], // 日期类型
|
|
|
DaysAgo: daysAgoMap[dateIndex], // N天前的N值
|
|
|
+ ShowTips: showTipsMap[dateIndex], // 是否显示标注
|
|
|
})
|
|
|
}
|
|
|
|