import { jsx as _jsx } from "react/jsx-runtime";
import { VegaChart } from '../vegachartv2/VegaChartV2.component';
/**
 * @deprecated Use Barchart v2 instead
 * @example import { Barchart } from '@scality/core-ui/dist/next';

 */
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 };
