【问题标题】:ECharts: align pie chart to the rightECharts:饼图向右对齐
【发布时间】:2019-03-29 11:00:53
【问题描述】:

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

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

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

【问题讨论】:

    标签: javascript echarts


    【解决方案1】:

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

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

    center: ['20%', '50%']
    

    【讨论】:

      猜你喜欢
      • 2017-12-14
      • 2018-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-08
      • 2018-07-13
      相关资源
      最近更新 更多