const initSunburst = (spec, context)=>{
    const result = {
        ...spec
    };
    const { advancedVSeed } = context;
    const { datasetReshapeInfo, encoding } = advancedVSeed;
    const { foldInfo } = datasetReshapeInfo[0];
    result.type = 'sunburst';
    result.categoryField = 'name';
    result.valueField = foldInfo.measureValue;
    result.outerRadius = 1;
    result.innerRadius = 0;
    result.gap = 0;
    result.offsetX = 0;
    result.offsetY = 0;
    result.padding = 0;
    result.labelAutoVisible = {
        enable: true,
        circumference: 5
    };
    result.sunburst = {
        visible: true,
        style: {
            fillOpacity: (datum)=>{
                if (encoding.hierarchy?.length === 1) return 1;
                return datum.isLeaf ? 0.4 : 0.8;
            }
        }
    };
    result.animationEnter = {
        easing: 'cubicInOut'
    };
    result.animationExit = {
        easing: 'cubicInOut'
    };
    result.animationUpdate = {
        easing: 'cubicInOut'
    };
    return result;
};
export { initSunburst };

//# sourceMappingURL=sunburst.js.map