鍍金池/ 問答/HTML/ echart 餅圖 上下padding怎麼去掉,用了grid沒有效果

echart 餅圖 上下padding怎麼去掉,用了grid沒有效果

圖片描述


  this.EChart.setOption({
        tooltip: {
            trigger: 'none',
            formatter: ': {c} (xhh5jzz%)'
        },
        backgroundColor:'#ffffff',
        title: [{
                text: '',
                left: '49%',
                top: '48%',
                textAlign: 'center',
                textBaseline: 'middle',
                textStyle: {
                    color: '#000',
                    fontWeight: 'bold',
                    fontSize: 23
                }
            }, {
                text: '',
                left: '49%',
                top: '55%',
                textAlign: 'center',
                textBaseline: 'middle',
                textStyle: {
                    color: '#000',
                    fontWeight: 'normal',
                    fontSize: 12
                }
            }],
        series: [{
             hoverAnimation: false, //設(shè)置餅圖默認的展開樣式
            radius: ['55%', '75%'],
             name: 'pie',
             type: 'pie',
             center:['50%', '50%'],
             selectedMode: false,
             selectedOffset: 0, //選中是扇區(qū)偏移量
             clockwise: true,
             startAngle: 90,
             label: {
                 normal: {
                     show: false
                 }
             },
             labelLine: {
                 normal: {
                     show: false
                 }
             },
              itemStyle: {
                normal: {
                    borderWidth: 0,
                    borderColor: '#ffffff',
                },
                emphasis: {
                    borderWidth: 0,
                    shadowBlur: 5,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.2)'
                }
            },
             data: []
         }],
    
    grid: {
        top:0,
        bottom:0,
        // show: true
    }
  });
回答
編輯回答
拽很帥

radius改成100%即可。。

2018年5月7日 19:20