perf(ui): 移除监控动效并精简原生图表绘制
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user