fix(ui): 修正风扇转轴与速率图并精简进程表
This commit is contained in:
@@ -129,10 +129,41 @@ import QuartzCore
|
||||
plot.configure(stack)
|
||||
precondition(redPixels(bitmap(plot), from: 0.4, to: 0.6) == 0,
|
||||
"Every stack band must respect the same real sampling break")
|
||||
// Rate panels use a common zero axis, not a percent scale at the card top.
|
||||
var rates = NativePanelCurve.Input(frame: .init(dates: dates,
|
||||
series: [Array(repeating: 0.8, count: 4), Array(repeating: 0.4, count: 4)],
|
||||
intervals: [2,2,2,2], boundaryDates: []), colors: [.red,.blue], scales: [1], maximumGap: 5,
|
||||
filledSeriesCount: 2, projection: .split(upwardSeries: 0))
|
||||
plot.configure(rates)
|
||||
@MainActor func areaBox(_ index: Int) -> CGRect {
|
||||
(plot.curves.sublayers![index].sublayers![0] as! CAShapeLayer).path!.boundingBoxOfPath
|
||||
}
|
||||
precondition(abs(areaBox(0).minY - 21.6) < 1e-9 && abs(areaBox(0).maxY - 36) < 1e-9)
|
||||
precondition(abs(areaBox(1).minY - 36) < 1e-9 && abs(areaBox(1).maxY - 43.2) < 1e-9)
|
||||
precondition(!plot.baseline.isHidden && abs(plot.baseline.path!.boundingBoxOfPath.midY - 36) < 1e-9)
|
||||
precondition(redPixels(bitmap(plot)) > 10)
|
||||
let rateBuilds = plot.pathBuildCount
|
||||
rates.hoveredIndex = 1; plot.configure(rates)
|
||||
precondition(abs((plot.layer!.sublayers!.last as! CAShapeLayer).path!.boundingBoxOfPath.midY - 43.2) < 1e-9)
|
||||
precondition(plot.pathBuildCount == rateBuilds)
|
||||
rates.projection = .split(upwardSeries: 1); plot.configure(rates)
|
||||
precondition(abs(areaBox(0).maxY - 50.4) < 1e-9 && abs(areaBox(1).minY - 28.8) < 1e-9,
|
||||
"Network download must go down and upload up without negating raw rates")
|
||||
precondition(plot.pathBuildCount == rateBuilds + 1)
|
||||
rates = .init(frame: .init(dates: dates,
|
||||
series: [Array(repeating: 0.8, count: 4), Array(repeating: 0.4, count: 4)],
|
||||
intervals: [2,2,2,2], boundaryDates: [dates[2]]), colors: [.red,.blue], scales: [1], maximumGap: 5,
|
||||
filledSeriesCount: 2, projection: .split(upwardSeries: 0))
|
||||
plot.configure(rates)
|
||||
precondition(redPixels(bitmap(plot), from: 0.4, to: 0.6) == 0)
|
||||
for series in 0...1 {
|
||||
precondition(PanelCurveProjection.split(upwardSeries: 0).y(value: 0, scale: 10, series: series, height: 176) == 105.6)
|
||||
}
|
||||
precondition(abs(PanelCurveProjection.split(upwardSeries: 0).y(value: 10, scale: 10, series: 0, height: 176) - 52.8) < 1e-9)
|
||||
assertStatic(plot.layer!)
|
||||
plot.removeFromSuperview()
|
||||
window.orderOut(nil); window.close()
|
||||
print("PASS: stacked component pixels and cumulative hover, static background lines/area pixels, no single-point fill, hidden-series isolation, immediate stable updates, no animation/material/gradient layers, real gaps, hover cache, palette growth, appearance, full history and unmount")
|
||||
print("PASS: bidirectional rate areas/zero axis/direction/hover/gaps, stacked component pixels and cumulative hover, static background lines/area pixels, no single-point fill, hidden-series isolation, immediate stable updates, no animation/material/gradient layers, real gaps, hover cache, palette growth, appearance, full history and unmount")
|
||||
fflush(stdout); NSApp.terminate(nil)
|
||||
}
|
||||
NSApp.run()
|
||||
|
||||
Reference in New Issue
Block a user