ECharts:饼图右对齐

Bop*_*psi 1 javascript echarts

我在我的应用程序中使用嵌套饼图 - 配置是 -

{
  options: {
    grid: {
        left: '300px'
    },
    legend: {
        orient: 'vertical',
        x: 'left',
        data: ['Autobots','Deceptiocons']
    },
    series: [
        {
            name: 'Audit',
            type: 'pie',
            radius: [30%, '50%'],
            label: {
                normal: {
                    position: 'center',
                    color: '#fff'
                }
            },
            data: [{ value: 500, name: 'Autobots'},{ value: 500, name: 'Decepticons'}]
        }
    ]
  }
}
Run Code Online (Sandbox Code Playgroud)

我正在使用 grid ,但图表仍然显示在中心。

ele*_*tin 7

可以在网格中绘制折线图、条形图、散点图(气泡图)

对于饼图,请使用饼图的中心位置:https ://echarts.apache.org/en/option.html#series-pie.center

center: ['20%', '50%']
Run Code Online (Sandbox Code Playgroud)