export default function getData() {
    let params = [{
            value: 29.07,
            name: '蔬菜'
        },
        {
            value: 26.16,
            name: '肉类'
        },
        {
            value: 23.26,
            name: '熟食'
        },
        {
            value: 11.34,
            name: '海鲜'
        },
        {
            value: 10.17,
            name: '其他'
        }
    ]
    return {
        color: ['rgba(255,188,59,1)', 'rgba(26,217,149,1)', 'rgba(19,123,249,1)', 'rgba(253,118,52,1)', 'rgba(59,220,255,1)'],
        tooltip: {
            trigger: 'item',
            // formatter: '{b}: {c} ({d}%)'
        },
        legend: {
            orient: 'vertical',
            right: 10,
            top: 20,
            itemGap: 20,
            formatter: function(param) {
                return param + '    ' + params.find(val => val.name === param).value + '%';
            },
            tooltip: {
                show: true
            },
            textStyle: {
                color: "#FFF"
            },
        },
        series: [{
            type: 'pie',
            radius: ['60%', '90%'],
            center: ['30%', '50%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                position: 'center',
                color: "#FFF",
            },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '20',
                    // fontWeight: 'bold'
                }
            },
            labelLine: {
                show: false
            },
            data: params,
            roundCap: 1 //可选项为1和2，不填则采用原有拼接方式
        }]
    };
}