简体   繁体   English

如何实现highcharts中饼图切片的边框?

[英]how to achieve the border of pie chart slices in highcharts?

Is it possible to build a similar donut chart as shown in the picture?是否可以建立一个类似的甜甜圈图,如图所示? especially the border尤其是边境在此处输入图像描述

You can mark all of your data points as sliced , set innerSize and borderColor .您可以将所有数据点标记为sliced ,设置innerSizeborderColor For example:例如:

  series: [{
    type: 'pie',
    innerSize: '30%',
    borderWidth: 1,
    borderColor: 'rgba(0,0,0,0.5)',
    data: [{
      y: 23934,
      sliced: true
    }, {
      y: 22503,
      sliced: true
    }, ...]
  }]

Live demo: http://jsfiddle.net/BlackLabel/zpr4hygu/现场演示: http://jsfiddle.net/BlackLabel/zpr4hygu/

API Reference: https://api.highcharts.com/highcharts/series.pie API 参考: https://api.highcharts.com/highcharts/series.pie

Rotating data labels thread: Rotating dataLabels in a Highcharts pie chart旋转数据标签线程: Rotating dataLabels in a Highcharts 饼图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM