import { jsx as _jsx } from "react/jsx-runtime";
import { VegaChart } from '../vegachartv2/VegaChartV2.component';
function BarChart({ id, data, xAxis, yAxis, color, height = 200, barConfig, }) {
    const spec = {
        mark: {
            type: 'bar',
            ...barConfig,
        },
        width: 'container',
        height,
        data: {
            values: data,
        },
        encoding: {
            x: xAxis,
            y: yAxis,
            color,
        },
    };
    return (_jsx(VegaChart, { id: id, spec: spec }, `barchart-${id}-${data.length}`));
}
export { BarChart };
