echarts饼图详解

本文介绍了一个使用ECharts库展示2018年投标情况的图表配置代码,包括标题、图例、饼图系列等元素的设置,通过不同的颜色区分中标、落标、未开标和评标中的状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

var getOption1 = function(chartType) {
    var chartOption1 = {
        calculable: false,
        title: {
            text: '2018年投标情况概览',
            x: 'center',
            textStyle: {
                "color": "#8ECBFF"
            },
        },
        legend: {
            top: 25,
            data: ['中标', '落标', '未开标', '评标中'],
            textStyle: { //图例文字的样式
                color: '#8ECBFF',
                fontSize: 13
            }
        },
        series: [{
            type: 'pie',
            radius: '65%',
            center: ['50%', '63%'],
            label: { //饼图图形上的文本标签
                normal: {
                    show: true,
                    textStyle: {
                        fontWeight: 700,
                        fontSize: 13 //文字的字体大小
                    },
                    formatter: '{b}:{c}: ({d}%)',
                }
            },
            data: [{
                value: 10,
                name: '中标',
                itemStyle: {
                    normal: {
                        color: '#F4AA61'
                    }
                }
            }, {
                value: 32,
                name: '落标',
                itemStyle: {
                    normal: {
                        color: '#4EC7B8'
                    }
                }
            }, {
                value: 10,
                name: '未开标',
                itemStyle: {
                    normal: {
                        color: '#90C9F6'
                    }
                }
            }, {
                value: 1,
                name: '评标中',
                itemStyle: {
                    normal: {
                        color: '#CACACB'
                    }
                }
            }]
        }]
    }
    return chartOption1;
};
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值