import { FoldXMeasureId } from "../../../../../dataReshape/index.js";
const pivotTitle = (spec, context)=>{
    const result = {
        ...spec
    };
    const { advancedVSeed } = context;
    const { config, chartType } = advancedVSeed;
    const themConfig = config?.[chartType]?.pivotGrid ?? {};
    const columns = result.columns?.filter((c)=>c.dimensionKey !== FoldXMeasureId);
    if (columns && columns.length > 0) result.title = {
        text: columns.map((entry)=>entry.title).join('/'),
        align: 'center',
        orient: 'top',
        padding: [
            2,
            0,
            0,
            0
        ],
        textStyle: {
            fontSize: themConfig.titleFontSize ?? 12,
            fill: themConfig.titleFontColor ?? '#000',
            fontWeight: themConfig.titleFontWeight ?? 'bold'
        }
    };
    return result;
};
export { pivotTitle };

//# sourceMappingURL=pivotTitle.js.map