This commit is contained in:
tanglong 2025-07-18 10:54:27 +08:00
parent cf2db0d0ab
commit 61ee630898

View File

@ -15,7 +15,11 @@ namespace YD_AllHeartRates.Api.Services.Impl
public static ChartDataDto BuildHeartRateTrend(List<HeartRateData> data)
{
if (data == null || data.Count == 0)
return new ChartDataDto();
return new ChartDataDto()
{
AxisX = new List<string>() { "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00" },
AxisY = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
// 按小时分组计算平均值(四舍五入)
var hourlyAvg = data