Dashboard: quitar títulos duplicados en cards de gráficas (build 81) #33
showsTitle (default true) en HorizontalPerformanceChart, DrawdownChart, VolatilityChartView, PredictionChartView y YearOverYearChartView; el pageContent del Dashboard pasa false porque el header de la card ya nombra la página. La sección Charts no cambia. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L38583J7AYWCVPevkivscj
This commit is contained in:
@@ -3,6 +3,8 @@ import Charts
|
||||
|
||||
struct YearOverYearChartView: View {
|
||||
@ObservedObject var viewModel: ChartsViewModel
|
||||
/// Hidden when the host (e.g. a dashboard card) already shows a title.
|
||||
var showsTitle: Bool = true
|
||||
@State private var selectedMonthIdx: Int?
|
||||
|
||||
private let monthAbbreviations = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
@@ -20,8 +22,10 @@ struct YearOverYearChartView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text(String(localized: "chart_yoy_title"))
|
||||
.font(.headline)
|
||||
if showsTitle {
|
||||
Text(String(localized: "chart_yoy_title"))
|
||||
.font(.headline)
|
||||
}
|
||||
|
||||
if allYears.isEmpty {
|
||||
Text(String(localized: "chart_yoy_empty"))
|
||||
|
||||
Reference in New Issue
Block a user