BioHeartRateGauge
An animated gauge widget that displays the current heart rate in BPM. Designed for dashboard views and live monitoring screens.
import BioUI
BioHeartRateGauge(store: store)
Usage
struct DashboardView: View {
@ObservedObject var store: BioLiveStore
var body: some View {
HStack {
BioHeartRateGauge(store: store)
.frame(width: 150, height: 150)
VStack(alignment: .leading) {
Text("Live Heart Rate")
.font(.headline)
Text("Data from all connected devices")
.font(.caption)
.foregroundStyle(.secondary)
}
}
}
}
Multi-Device Fusion
When multiple heart rate sources are connected (e.g., a ring and an HRM chest strap), BioLiveStore computes a fused BPM using the median of all active sources. BioHeartRateGauge displays this fused value automatically.