fix(monitors): 修复短暂隐藏重开后的趋势误断层
This commit is contained in:
@@ -31,6 +31,15 @@ import QuartzCore
|
||||
precondition(redPixels(bitmap(plot), from: 0.4, to: 0.6) == 0, "Missing values must leave a real gap")
|
||||
plot.configure(input([nil,nil,nil,nil]))
|
||||
precondition(redPixels(bitmap(plot)) == 0)
|
||||
let changedDates = [0.0, 2, 8, 10].map { Date(timeIntervalSinceReferenceDate: $0) }
|
||||
plot.configure(.init(frame: .init(dates: changedDates, series: [[0.8,0.8,0.8,0.8]],
|
||||
intervals: [2,30,2,2], boundaryDates: []), colors: [.red], scales: [1], maximumGap: 5))
|
||||
precondition(redPixels(bitmap(plot), from: 0.4, to: 0.6) > 10,
|
||||
"Reopening before the first background deadline must keep the curve connected")
|
||||
plot.configure(.init(frame: .init(dates: [changedDates[0], changedDates[2]], series: [[0.8,0.8]],
|
||||
intervals: [2,30], boundaryDates: []), colors: [.red], scales: [1], maximumGap: 5))
|
||||
precondition(redPixels(bitmap(plot), from: 0.4, to: 0.6) == 0,
|
||||
"A later slow cadence must not reconnect an earlier missed sample")
|
||||
var hovered = continuous; hovered.hoveredIndex = 1
|
||||
plot.configure(hovered)
|
||||
precondition(redPixels(bitmap(plot)) > 0)
|
||||
|
||||
Reference in New Issue
Block a user