【Echarts】echarts双圆环实现,外圆环做背景色

【Echarts】echarts双圆环实现,外圆环做背景色_第1张图片

  let seriesData1 = [
                        { value: 12, name: '连续降雨14天' },
                        { value: 34, name: '夏连续降雨14天' },
                        { value: 23, name: '秋连续降雨14天' },
                        { value: 12, name: '1冬连续降雨14天' },
                        { value: 12, name: '2冬连续降雨14天' },
                        { value: 12, name: '3冬连续降雨14天' },
                        { value: 12, name: '4冬连续降雨14天' }
                    ];
                    this.gwhjDayChart = {
                        tooltip: {
                            trigger: 'item',
                            backgroundColor: '#fff',
                            textStyle: {
                                color: '#666',
                                fontSize: 14,
                                lineHeight: 16
                            },
                            confine: true,
                            formatter:
                                '{a} 
{b} : {c} ({d}%)' }, series: [ { name: name || '', type: 'pie', silent: true, label: { normal: { show: false } }, radius: ['0%', '80%'], // 半径 center: ['50%', '48%'], // 位置 color: new (echarts as any).graphic.RadialGradient( 0.5, 0.5, 0.9, [ { offset: 0, color: '#fff' }, { offset: 1, color: 'rgba(18,137,223,0.5)' } ] ), data: seriesData1.length > 0 ? [{ value: 0, name: '闭环' }] : [] }, { name: name || '', type: 'pie', radius: ['30%', '50%'], // 半径 center: ['50%', '48%'], // 位置 label: { normal: { formatter: '{b}' } }, color: AccidentEportraitAnalysisComponent.colors, data: seriesData1, itemStyle: { emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] };

你可能感兴趣的:(前端)