v1.1.6: Add high/low prices to chart stats row

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
vgearen
2026-03-19 14:07:27 +08:00
co-authored by Claude Opus 4.6
parent 729b03eb6e
commit 2683521067
2 changed files with 10 additions and 5 deletions
+6 -1
View File
@@ -214,11 +214,16 @@ struct StockChartView: View {
// 今开:分时第一个点的价格;昨收:API 返回的 preclose
private var statsRow: some View {
HStack(spacing: 0) {
let prices = points.map(\.price)
return HStack(spacing: 0) {
statItem(label: "昨收", value: fmt(preClose))
Spacer()
statItem(label: "今开", value: fmt(points.first?.price ?? 0))
Spacer()
statItem(label: "最高", value: fmt(prices.max() ?? 0))
Spacer()
statItem(label: "最低", value: fmt(prices.min() ?? 0))
Spacer()
statItem(label: "现价", value: fmt(quote?.price ?? 0))
}
.padding(.horizontal, 12)