| | |
| | | top: '5%', |
| | | left: '7%', |
| | | right: '3%', |
| | | bottom: '5%', |
| | | bottom: '7%', |
| | | // containLabel: true |
| | | }, |
| | | legend: { |
| | |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgba(43,48,52, 0.4)', |
| | | margin: 20 |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | |
| | | top: '5%', |
| | | left: '7%', |
| | | right: '2%', |
| | | bottom: '5%', |
| | | bottom: '7%', |
| | | // containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgba(43,48,52, 0.4)', |
| | | margin: 20 |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | |
| | | series: series |
| | | }; |
| | | chart.setOption(option); |
| | | }, |
| | | drawPie:function(chart,params){ |
| | | let option = { |
| | | color: params.color, |
| | | backgroundColor: '#fff', |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b} : {c} ({d}%)' |
| | | }, |
| | | title: { |
| | | text: params.percentage, |
| | | textStyle: { |
| | | color: '#4379EE', |
| | | fontSize: 14, |
| | | align: 'center', |
| | | fontWeight: 'normal' |
| | | }, |
| | | x: 'center', |
| | | y: 'center', |
| | | }, |
| | | grid: { |
| | | top:20, |
| | | bottom: 20, |
| | | left: 0, |
| | | right: 0 |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | }, |
| | | series: [ |
| | | // 主要展示层的 |
| | | { |
| | | radius: ['55%', '90%'], |
| | | center: ['50%', '50%'], |
| | | type: 'pie', |
| | | label: { |
| | | show:false |
| | | }, |
| | | name: params.title, |
| | | data: params.data, |
| | | }, |
| | | // 边框的设置 |
| | | { |
| | | radius: ['55%', '65%'], |
| | | center: ['50%', '50%'], |
| | | type: 'pie', |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | }, |
| | | emphasis: { |
| | | show: false |
| | | } |
| | | }, |
| | | labelLine: { |
| | | normal: { |
| | | show: false |
| | | }, |
| | | emphasis: { |
| | | show: false |
| | | } |
| | | }, |
| | | animation: false, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | data: [{ |
| | | value: 1, |
| | | itemStyle: { |
| | | color: "rgba(250,250,250,0.3)", |
| | | }, |
| | | }], |
| | | } |
| | | ] |
| | | }; |
| | | chart.setOption(option); |
| | | } |
| | | } |
| | | |