mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-12 22:11:08 +01:00
Fix size of elo graphs
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
package org.kickerelo.kickerelo.views;
|
||||
|
||||
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
||||
import com.github.appreciated.apexcharts.ApexCharts;
|
||||
import com.vaadin.flow.component.Unit;
|
||||
import com.vaadin.flow.component.html.H2;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.Route;
|
||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@Route("graph1vs1")
|
||||
public class Graph1vs1View extends VerticalLayout {
|
||||
|
||||
ApexChartsBuilder chart1vs1;
|
||||
ApexCharts chart1vs1;
|
||||
public Graph1vs1View(KickerEloService service) {
|
||||
setSizeFull();
|
||||
H2 subheading = new H2("1 vs 1 Elo");
|
||||
chart1vs1 = new Chart1vs1(service.getSpielerEntities());
|
||||
add(subheading, chart1vs1.build());
|
||||
chart1vs1 = new Chart1vs1(service.getSpielerEntities()).build();
|
||||
chart1vs1.setWidth(100, Unit.PERCENTAGE);
|
||||
chart1vs1.setHeight(100, Unit.PERCENTAGE);
|
||||
|
||||
add(subheading, chart1vs1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.kickerelo.kickerelo.views;
|
||||
|
||||
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
||||
import com.github.appreciated.apexcharts.ApexCharts;
|
||||
import com.vaadin.flow.component.Unit;
|
||||
import com.vaadin.flow.component.html.H2;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.Route;
|
||||
@@ -8,10 +9,14 @@ import org.kickerelo.kickerelo.service.KickerEloService;
|
||||
|
||||
@Route("graph2vs2")
|
||||
public class Graph2vs2View extends VerticalLayout {
|
||||
ApexChartsBuilder chart2vs2;
|
||||
ApexCharts chart2vs2;
|
||||
public Graph2vs2View(KickerEloService service) {
|
||||
setSizeFull();
|
||||
H2 subheading = new H2("2 vs 2 Elo");
|
||||
chart2vs2 = new Chart2vs2(service.getSpielerEntities());
|
||||
add(subheading, chart2vs2.build());
|
||||
chart2vs2 = new Chart2vs2(service.getSpielerEntities()).build();
|
||||
chart2vs2.setWidth(100, Unit.PERCENTAGE);
|
||||
chart2vs2.setHeight(100, Unit.PERCENTAGE);
|
||||
|
||||
add(subheading, chart2vs2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user