Highchart 甜甜圈图不是圆形的

Highchart Donut chart not circular

我正在使用 Highchart 创建圆角圆环图。不幸的是,该图表不是完全圆形的。

var data2 = [
    {
        "data": [
            {
                "name": "Positve",
                "y": 50,
                "color": "#2CA02C",
                "sliced": true
            },
            {
                "name": "Negative",
                "y": 25,
                "color": "#B23333",
                "sliced": true
            },
            {
                "name": "Neutral",
                "y": 25,
                "color": "#E5CF73",
                "sliced": true
            }
        ]
    }
]
    window.mychart = Highcharts.chart('container', {
        chart: {
            type: 'pie',
          plotShadow: false,
        },
      credits: {
          enabled: false
      },
        plotOptions: {
            pie: {
                innerSize: '100%',
              borderWidth: 10,
              borderColor: null,
              slicedOffset: 6,
              dataLabels: {
                  connectorWidth: 0,
                  enabled: false
              }
            }
        },
      title: {
            verticalAlign: 'middle',
            floating: true,
            text: ''
      },
      legend: {
      },
        series: data2,
    });

这是它的 jsfiddle link: JsFiddle

只能切片一个点,所以使用没有切片的数据属性或将slicedOffset设置为0。

"data": [{
    "name": "Positve",
    "y": 50,
    "color": "#2CA02C"
  },
  {
    "name": "Negative",
    "y": 25,
    "color": "#B23333"
  },
  {
    "name": "Neutral",
    "y": 25,
    "color": "#E5CF73"
  }
]

现场演示: http://jsfiddle.net/BlackLabel/1usgc4a6/

API参考:

https://api.highcharts.com/highcharts/series.pie.data.sliced

https://api.highcharts.com/highcharts/series.pie.slicedOffset