Different types of charts

This commit is contained in:
Pit Friedrich
2026-07-06 07:33:15 +02:00
parent 9ffba461fe
commit af79286cb0
9 changed files with 136 additions and 44 deletions
@@ -0,0 +1,21 @@
package com.example.components;
import java.util.List;
import java.util.Map;
public abstract class AxisChart extends ApexChart {
protected AxisChart(String chartType) {
super(chartType);
}
public void setData(String seriesName, List<Double> values, List<String> categories) {
Map<String, Object> options = Map.of(
"chart", Map.of("type", getChartType(), "height", "100%"),
"series", List.of(Map.of("name", seriesName, "data", values)),
"xaxis", Map.of("categories", categories)
);
sendOptions(options);
}
}