|
| 1 | +Submodule LoopKit 7b6be31..c55cd98: |
| 2 | +diff --git a/LoopKit/LoopKitUI/Charts/COBChart.swift b/LoopKit/LoopKitUI/Charts/COBChart.swift |
| 3 | +index 2bbae1e..6cbdbde 100644 |
| 4 | +--- a/LoopKit/LoopKitUI/Charts/COBChart.swift |
| 5 | ++++ b/LoopKit/LoopKitUI/Charts/COBChart.swift |
| 6 | +@@ -63,6 +63,10 @@ public extension COBChart { |
| 7 | + // Grid lines |
| 8 | + let gridLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: guideLinesLayerSettings, axisValuesX: Array(xAxisValues.dropFirst().dropLast()), axisValuesY: yAxisValues) |
| 9 | + |
| 10 | ++ let currentTimeValue = ChartAxisValueDate(date: Date(), formatter: { _ in "" }) |
| 11 | ++ let currentTimeSettings = ChartGuideLinesLayerSettings(linesColor: colors.carbTint, linesWidth: 1.0) |
| 12 | ++ let currentTimeLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: currentTimeSettings, axisValuesX: [currentTimeValue], axisValuesY: []) |
| 13 | ++ |
| 14 | + if gestureRecognizer != nil { |
| 15 | + cobChartCache = ChartPointsTouchHighlightLayerViewCache( |
| 16 | + xAxisLayer: xAxisLayer, |
| 17 | +@@ -76,6 +80,7 @@ public extension COBChart { |
| 18 | + |
| 19 | + let layers: [ChartLayer?] = [ |
| 20 | + gridLayer, |
| 21 | ++ currentTimeLayer, |
| 22 | + xAxisLayer, |
| 23 | + yAxisLayer, |
| 24 | + cobChartCache?.highlightLayer, |
| 25 | +diff --git a/LoopKit/LoopKitUI/Charts/DoseChart.swift b/LoopKit/LoopKitUI/Charts/DoseChart.swift |
| 26 | +index ad30019..1988794 100644 |
| 27 | +--- a/LoopKit/LoopKitUI/Charts/DoseChart.swift |
| 28 | ++++ b/LoopKit/LoopKitUI/Charts/DoseChart.swift |
| 29 | +@@ -106,6 +106,10 @@ public extension DoseChart { |
| 30 | + // Grid lines |
| 31 | + let gridLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: guideLinesLayerSettings, axisValuesX: Array(xAxisValues.dropFirst().dropLast()), axisValuesY: yAxisValues) |
| 32 | + |
| 33 | ++ let currentTimeValue = ChartAxisValueDate(date: Date(), formatter: { _ in "" }) |
| 34 | ++ let currentTimeSettings = ChartGuideLinesLayerSettings(linesColor: colors.carbTint, linesWidth: 1.0) |
| 35 | ++ let currentTimeLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: currentTimeSettings, axisValuesX: [currentTimeValue], axisValuesY: []) |
| 36 | ++ |
| 37 | + // 0-line |
| 38 | + let dummyZeroChartPoint = ChartPoint(x: ChartAxisValueDouble(0), y: ChartAxisValueDouble(0)) |
| 39 | + let zeroGuidelineLayer = ChartPointsViewsLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, chartPoints: [dummyZeroChartPoint], viewGenerator: {(chartPointModel, layer, chart) -> UIView? in |
| 40 | +@@ -130,6 +134,7 @@ public extension DoseChart { |
| 41 | + |
| 42 | + let layers: [ChartLayer?] = [ |
| 43 | + gridLayer, |
| 44 | ++ currentTimeLayer, |
| 45 | + xAxisLayer, |
| 46 | + yAxisLayer, |
| 47 | + zeroGuidelineLayer, |
| 48 | +diff --git a/LoopKit/LoopKitUI/Charts/IOBChart.swift b/LoopKit/LoopKitUI/Charts/IOBChart.swift |
| 49 | +index 54d0921..5850f73 100644 |
| 50 | +--- a/LoopKit/LoopKitUI/Charts/IOBChart.swift |
| 51 | ++++ b/LoopKit/LoopKitUI/Charts/IOBChart.swift |
| 52 | +@@ -66,6 +66,10 @@ public extension IOBChart { |
| 53 | + // Grid lines |
| 54 | + let gridLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: guideLinesLayerSettings, axisValuesX: Array(xAxisValues.dropFirst().dropLast()), axisValuesY: yAxisValues) |
| 55 | + |
| 56 | ++ let currentTimeValue = ChartAxisValueDate(date: Date(), formatter: { _ in "" }) |
| 57 | ++ let currentTimeSettings = ChartGuideLinesLayerSettings(linesColor: colors.carbTint, linesWidth: 1.0) |
| 58 | ++ let currentTimeLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: currentTimeSettings, axisValuesX: [currentTimeValue], axisValuesY: []) |
| 59 | ++ |
| 60 | + // 0-line |
| 61 | + let dummyZeroChartPoint = ChartPoint(x: ChartAxisValueDouble(0), y: ChartAxisValueDouble(0)) |
| 62 | + let zeroGuidelineLayer = ChartPointsViewsLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, chartPoints: [dummyZeroChartPoint], viewGenerator: {(chartPointModel, layer, chart) -> UIView? in |
| 63 | +@@ -90,6 +94,7 @@ public extension IOBChart { |
| 64 | + |
| 65 | + let layers: [ChartLayer?] = [ |
| 66 | + gridLayer, |
| 67 | ++ currentTimeLayer, |
| 68 | + xAxisLayer, |
| 69 | + yAxisLayer, |
| 70 | + zeroGuidelineLayer, |
| 71 | +diff --git a/LoopKit/LoopKitUI/Charts/PredictedGlucoseChart.swift b/LoopKit/LoopKitUI/Charts/PredictedGlucoseChart.swift |
| 72 | +index bd786fe..ce593b7 100644 |
| 73 | +--- a/LoopKit/LoopKitUI/Charts/PredictedGlucoseChart.swift |
| 74 | ++++ b/LoopKit/LoopKitUI/Charts/PredictedGlucoseChart.swift |
| 75 | +@@ -170,6 +170,10 @@ extension PredictedGlucoseChart { |
| 76 | + // Grid lines |
| 77 | + let gridLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: guideLinesLayerSettings, axisValuesX: Array(xAxisValues.dropFirst().dropLast()), axisValuesY: yAxisValues) |
| 78 | + |
| 79 | ++ let currentTimeValue = ChartAxisValueDate(date: Date(), formatter: { _ in "" }) |
| 80 | ++ let currentTimeSettings = ChartGuideLinesLayerSettings(linesColor: colors.carbTint, linesWidth: 1.0) |
| 81 | ++ let currentTimeLayer = ChartGuideLinesForValuesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, settings: currentTimeSettings, axisValuesX: [currentTimeValue], axisValuesY: []) |
| 82 | ++ |
| 83 | + let circles = ChartPointsScatterCirclesLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, chartPoints: glucosePoints, displayDelay: 0, itemSize: CGSize(width: 4, height: 4), itemFillColor: colors.glucoseTint, optimized: true) |
| 84 | + |
| 85 | + var alternatePrediction: ChartLayer? |
| 86 | +@@ -208,6 +212,7 @@ extension PredictedGlucoseChart { |
| 87 | + |
| 88 | + let layers: [ChartLayer?] = [ |
| 89 | + gridLayer, |
| 90 | ++ currentTimeLayer, |
| 91 | + targetsLayer, |
| 92 | + xAxisLayer, |
| 93 | + yAxisLayer, |
0 commit comments