import { jsx as _jsx } from "react/jsx-runtime";
import { VegaChart } from '../vegachart/VegaChart.component';
function AreaChart({ id, data, xAxis, yAxis, color, height = 300, width = 1000, areas = [], ...rest }) {
    const lines = yAxis.map((y) => ({
        mark: {
            type: 'line',
        },
        encoding: {
            y,
        },
    }));
    const spec = {
        data: {
            values: data,
        },
        encoding: {
            x: xAxis,
            color,
        },
        layer: [...lines, ...areas],
        height,
        width,
        ...rest,
    };
    return _jsx(VegaChart, { className: "sc-areachart", id: id, spec: spec });
}
export { AreaChart };
