import { isLinearColor } from "../color/colorAdapter.js";
const initDualAxis = (options)=>(spec, context)=>{
        const result = {
            ...spec
        };
        const { advancedVSeed, vseed } = context;
        const { datasetReshapeInfo } = advancedVSeed;
        const { unfoldInfo, id } = datasetReshapeInfo[0];
        result.id = `${id}-${options.axisType}-${options.chartType}`;
        result.type = 'line' === options.chartType ? 'line' : 'bar';
        result.direction = 'vertical';
        result.xField = unfoldInfo.encodingX;
        result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
        result.yField = options.foldInfo.measureValue;
        result.animation = true;
        return result;
    };
export { initDualAxis };

//# sourceMappingURL=dualAxis.js.map