仪表盘

描述:当前是关于Echarts图表中的 饼图 示例。
 
            option = {
    backgroundColor: '#111',
    title: {
        text: 'percent',
        x: '49%',
        y: '50%',
        textAlign: 'center',
        top: '75%',
        textStyle: {
            fontWeight: 'normal',
            fontFamily: 'Microsoft YaHei',
            color: '#FFF',
            fontSize: 30
        }
    },
    series: [{
            name: '',
            type: 'pie',
            radius: ['65%', '80%'],
            startAngle: 225,
            hoverAnimation: false,
            legendHoverLink: false,
            color: [{
                    type: 'linear',
                    x: 1,
                    y: 0,
                    x2: 0,
                    y2: 0,
                    colorStops: [{
                            offset: 0,
                            color: '#2DBD59'
                        },
                        {
                            offset: 1,
                            color: '#2DBD59'
                        }
                    ]
                },
                'transparent'
            ],
            z: 10,
            labelLine: {
                normal: {
                    show: false
                }
            },
            data: [{
                    value: 51,
                    label: {
                        normal: {
                            formatter: '68%',
                            position: 'center',
                            show: true,
                            textStyle: {
                                fontSize: '50',
                                fontWeight: 'normal',
                                color: '#fff'
                            }
                        }
                    },
                    name: ''
                },
                {
                    value: 49
                }
            ]
        },
        {
            name: '',
            type: 'pie',
            radius: ['65%', '80%'],
            silent: true,
            startAngle: 225,
            labelLine: {
                normal: {
                    show: false
                }
            },
            z: 5,
            data: [{
                    value: 75,
                    itemStyle: {
                        color: '#EBEDEF'
                    }
                },
                {
                    value: 25,
                    itemStyle: {
                        color: 'transparent'
                    }
                }
            ]
        }
    ]
}