import { DimAxisType } from "../../../../../dataReshape/constant.js";
const adjustXField = (spec)=>{
    const result = {
        ...spec
    };
    const chartTypes = (spec.series ?? []).map((s)=>s.type);
    if (chartTypes.length > 1 && chartTypes.filter((type)=>'bar' === type).length > 1) result.series.forEach((s)=>{
        if ('bar' === s.type && !Array.isArray(s.xField)) s.xField = [
            s.xField,
            DimAxisType
        ];
    });
    return result;
};
export { adjustXField };

//# sourceMappingURL=adjustXField.js.map