|
|
@@ -199,6 +199,10 @@ extension MainViewController {
|
|
|
ul.lineColor = NSUIColor.systemYellow.withAlphaComponent(0.5)
|
|
|
BGChart.rightAxis.addLimitLine(ul)
|
|
|
|
|
|
+ // Add Now Line
|
|
|
+ createNowLine()
|
|
|
+ startGraphNowTimer()
|
|
|
+
|
|
|
// Setup the main graph overall details
|
|
|
BGChart.xAxis.valueFormatter = ChartXValueFormatter()
|
|
|
BGChart.xAxis.granularity = 1800
|
|
|
@@ -230,6 +234,15 @@ extension MainViewController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ func createNowLine() {
|
|
|
+ BGChart.xAxis.removeAllLimitLines()
|
|
|
+ let ul = ChartLimitLine()
|
|
|
+ ul.limit = Double(dateTimeUtils.getNowTimeIntervalUTC())
|
|
|
+ ul.lineColor = NSUIColor.systemGray.withAlphaComponent(0.5)
|
|
|
+ ul.lineWidth = 1
|
|
|
+ BGChart.xAxis.addLimitLine(ul)
|
|
|
+ }
|
|
|
+
|
|
|
func updateBGGraphSettings() {
|
|
|
let dataIndex = 0
|
|
|
let dataIndexPrediction = 1
|