package com.example.components;

import java.util.List;
import java.util.Map;

public class PieChart extends ApexChart {

    public PieChart() {
        super("pie");
    }

    public void setData(List<Double> values, List<String> labels) {
        Map<String, Object> options = Map.of(
                "chart", Map.of("type", "pie", "height", "100%"),
                "series", values,
                "labels", labels
        );

        sendOptions(options);
    }
}
