Files
chart-app/src/main/java/com/example/components/AxisChart.java
T
Pit Friedrich d947833214
CI / build-and-test (pull_request) Successful in 10m26s
[FEATURE] Customn Theme
2026-07-07 19:55:42 +02:00

24 lines
698 B
Java

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 = DialectTheme.baseOptions(getChartType());
options.put("series", List.of(Map.of("name", seriesName, "data", values)));
options.put("xaxis", Map.of(
"categories", categories,
"axisBorder", Map.of("show", false),
"axisTicks", Map.of("show", false)
));
sendOptions(options);
}
}