From 61ee6308981dc93a76579d630d5c96658769888c Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Fri, 18 Jul 2025 10:54:27 +0800 Subject: [PATCH] D --- YD_AllHeartRates.Api/Services/Impl/HeartRateReportHelper.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportHelper.cs b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportHelper.cs index 39cc409..c186424 100644 --- a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportHelper.cs +++ b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportHelper.cs @@ -15,7 +15,11 @@ namespace YD_AllHeartRates.Api.Services.Impl public static ChartDataDto BuildHeartRateTrend(List data) { if (data == null || data.Count == 0) - return new ChartDataDto(); + return new ChartDataDto() + { + AxisX = new List() { "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00" }, + AxisY = new List() { 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; // 按小时分组计算平均值(四舍五入) var hourlyAvg = data