|
@@ -88,12 +88,8 @@ struct InsulinSensitivityStepView: View {
|
|
|
Text(
|
|
Text(
|
|
|
"\(aboveTarget.description) \(state.units.rawValue) / \(isfValue.description) \(state.units.rawValue)/\(String(localized: "U", comment: "Insulin unit abbreviation")) = \(String(format: "%.1f", Double(insulinNeeded))) \(String(localized: "U", comment: "Insulin unit abbreviation"))"
|
|
"\(aboveTarget.description) \(state.units.rawValue) / \(isfValue.description) \(state.units.rawValue)/\(String(localized: "U", comment: "Insulin unit abbreviation")) = \(String(format: "%.1f", Double(insulinNeeded))) \(String(localized: "U", comment: "Insulin unit abbreviation"))"
|
|
|
)
|
|
)
|
|
|
-// Text(
|
|
|
|
|
-// "\(numberFormatter.string(from: aboveTarget as NSNumber) ?? "--") \(state.units.rawValue) / \(numberFormatter.string(from: isfValue as NSNumber) ?? "--") \(state.units.rawValue)/\(String(localized: "U", comment: "Insulin unit abbreviation")) = \(String(format: "%.1f", Double(insulinNeeded)))" +
|
|
|
|
|
-// " " + String(localized: "U", comment: "Insulin unit abbreviation")
|
|
|
|
|
-// )
|
|
|
|
|
.font(.system(.body, design: .monospaced))
|
|
.font(.system(.body, design: .monospaced))
|
|
|
- .foregroundColor(.red)
|
|
|
|
|
|
|
+ .foregroundColor(.cyan)
|
|
|
.padding()
|
|
.padding()
|
|
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
|
.background(Color.chart.opacity(0.65))
|
|
.background(Color.chart.opacity(0.65))
|
|
@@ -165,8 +161,8 @@ struct InsulinSensitivityStepView: View {
|
|
|
).foregroundStyle(
|
|
).foregroundStyle(
|
|
|
.linearGradient(
|
|
.linearGradient(
|
|
|
colors: [
|
|
colors: [
|
|
|
- Color.red.opacity(0.6),
|
|
|
|
|
- Color.red.opacity(0.1)
|
|
|
|
|
|
|
+ Color.cyan.opacity(0.6),
|
|
|
|
|
+ Color.cyan.opacity(0.1)
|
|
|
],
|
|
],
|
|
|
startPoint: .bottom,
|
|
startPoint: .bottom,
|
|
|
endPoint: .top
|
|
endPoint: .top
|
|
@@ -174,10 +170,10 @@ struct InsulinSensitivityStepView: View {
|
|
|
).alignsMarkStylesWithPlotArea()
|
|
).alignsMarkStylesWithPlotArea()
|
|
|
|
|
|
|
|
LineMark(x: .value("End Date", startDate), y: .value("ISF", displayValue))
|
|
LineMark(x: .value("End Date", startDate), y: .value("ISF", displayValue))
|
|
|
- .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
|
|
|
|
|
|
|
+ .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
|
|
|
|
|
|
|
|
LineMark(x: .value("Start Date", endDate), y: .value("ISF", displayValue))
|
|
LineMark(x: .value("Start Date", endDate), y: .value("ISF", displayValue))
|
|
|
- .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.red)
|
|
|
|
|
|
|
+ .lineStyle(.init(lineWidth: 1)).foregroundStyle(Color.cyan)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.id(refreshUI) // Force chart update
|
|
.id(refreshUI) // Force chart update
|