eChart将图表对齐

问题描述 投票:0回答:1

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

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'}]
        }
    ]
}

我正在使用网格,但图表仍显示在中心。

pie-chart echarts
1个回答
0
投票

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

对于饼图,请使用饼图中心位置:http://echarts.baidu.com/option.html#series-pie.center

center: ['20%', '50%']
© www.soinside.com 2019 - 2024. All rights reserved.