const heatmapColorDomain = (spec, context)=>{
    const { advancedVSeed } = context;
    const indicators = spec.indicators;
    if (!indicators || !indicators.length || indicators.every((ind)=>ind.chartSpec.color?.type !== 'linear')) return spec;
    const { datasetReshapeInfo } = advancedVSeed;
    const max = Math.max(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMax));
    const min = Math.min(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMin));
    indicators.forEach((ind)=>{
        if (ind.chartSpec.color?.type === 'linear') ind.chartSpec.color.domain = [
            min,
            max
        ];
    });
    return spec;
};
export { heatmapColorDomain };

//# sourceMappingURL=heatmapColorDomain.js.map