perf(ui): 移除监控动效并精简原生图表绘制

This commit is contained in:
2026-11-07 14:39:27 +08:00
parent 10c73c6026
commit 80706fa52e
54 changed files with 264 additions and 778 deletions
+4 -3
View File
@@ -41,7 +41,9 @@ struct PanelTrendChart: View {
@State private var hoverPoint: CGPoint?
private var inputFrame: PanelCurveFrame {
PanelCurveFrame(dates: dates, series: [first, second, third, fourth],
var series = [first, second, third, fourth]
while series.last?.isEmpty == true { series.removeLast() }
return PanelCurveFrame(dates: dates, series: series,
intervals: intervals.count == dates.count ? intervals : Array(repeating: expectedInterval, count: dates.count),
boundaryDates: boundaryDates)
}
@@ -98,9 +100,8 @@ struct PanelTrendChart: View {
if !fourth.isEmpty { tooltipRow(fourthLabel, values: fourth, tint: fourthColor, index: index) }
}
.font(.system(size: 10)).padding(8)
.background { TooltipMaterialBackground() }
.background { TooltipBackground() }
.overlay(RoundedRectangle(cornerRadius: 7).strokeBorder(.primary.opacity(0.2)))
.shadow(color: .black.opacity(0.2), radius: 5, y: 2)
}
var body: some View {