feat:更新运动健康模块
This commit is contained in:
@@ -78,12 +78,15 @@ const updateChart = () => {
|
||||
const sortedRecordList = weightRecordList.sort((a, b) => a.weight - b.weight)
|
||||
|
||||
weightDailyChart.setOption(lineChartOptions('日期', weightXAxis, '体重(千克)', weightYAxis))
|
||||
weightDailyChart.setOption({
|
||||
yAxis: {
|
||||
min: Math.floor(sortedRecordList[0].weight),
|
||||
max: Math.ceil(sortedRecordList[sortedRecordList.length - 1].weight)
|
||||
}
|
||||
})
|
||||
|
||||
if (sortedRecordList.length > 0) {
|
||||
weightDailyChart.setOption({
|
||||
yAxis: {
|
||||
min: Math.floor(sortedRecordList[0].weight),
|
||||
max: Math.ceil(sortedRecordList[sortedRecordList.length - 1].weight)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 睡眠时长统计图
|
||||
const sleepRecordList = healthStore.healthRecordList
|
||||
|
||||
Reference in New Issue
Block a user