[FEATURE] Customn Theme
CI / build-and-test (pull_request) Successful in 10m26s

This commit is contained in:
Pit Friedrich
2026-07-07 19:55:42 +02:00
parent 5ed6937c88
commit d947833214
9 changed files with 528 additions and 12 deletions
@@ -3,16 +3,22 @@ package com.example.views;
import com.example.components.BarChart;
import com.example.components.LineChart;
import com.example.components.PieChart;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.notification.Notification;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;
import java.util.List;
@Route("")
@PageTitle("Dashboard")
public class DashboardView extends VerticalLayout {
public DashboardView() {
addClassName("dialect-content");
LineChart lineChart = new LineChart();
lineChart.setWidthFull();
lineChart.setHeight("400px");
@@ -45,6 +51,20 @@ public class DashboardView extends VerticalLayout {
Notification.show("Slice %d".formatted(e.getDataPointIndex()));
});
add(lineChart, barChart, pieChart);
add(card("Umsatz-Entwicklung", lineChart),
card("Umsatz nach Monat", barChart),
card("Umsatz nach Region", pieChart));
}
private Component card(String title, Component chart) {
H3 heading = new H3(title);
heading.addClassName("dialect-card__title");
VerticalLayout card = new VerticalLayout(heading, chart);
card.addClassName("dialect-card");
card.setWidthFull();
card.setPadding(false);
card.setSpacing(false);
return card;
}
}