Highcharts为长数据添加省略号

在下面的链接中,左侧和右侧数据显示不正确,我想在中心调整饼图并为可见数据添加省略号。

jsfiddle url:

http://jsfiddle.net/f0bqnba3

图片 :

在此处输入图像描述

码:

$(function () { Highcharts.chart('container', { chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Browser market shares January, 2015 to May, 2015' }, tooltip: { pointFormat: '{series.name}: {point.percentage:.1f}%' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '{point.name}: {point.percentage:.1f} %', style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' } } } }, series: [{ name: 'Brands', colorByPoint: true, data: [{ name: 'National Institute of Information Technology and science laboratory', y: 56.33 }, { name: 'Chrome', y: 24.03, sliced: true, selected: true }, { name: 'Firefox', y: 10.38 }, { name: 'Safari', y: 4.77 }, { name: 'Opera', y: 0.91 }, { name: 'National Institute of Proprietary or Undetectable', y: 0.2 }] }] }); }); 

在绘图选项中设置标签的宽度

 plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { style: { width: '100px' }, enabled: true, color: '#000000', maxStaggerLines:1, connectorColor: '#000000', format: '{point.name}: {point.percentage:.1f} %' }, } }, 

你的叉子小提琴