dataLabelPositionFactor控制标签在切片上的位置。增加将标签滑向馅饼边缘,减少将向标签中心滑动。
dataLabelPositionFactor:1.2,
默认dataLabelThreshold值是3,因此值< = 3不显示,因此使其向0
dataLabelThreshold:0
$(document).ready(function(){
var data = [
['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14],
['Out of home', 16],['Commuting', 7], ['Orientation', 9]
];
var plot1 = jQuery.jqplot ('chart1', [data],
{
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true,
//dataLabelPositionFactor controls position of label on slice. Increasing will slide label toward edge of pie, decreasing will slide label toward center of pie.
dataLabelPositionFactor : 1.2,
// default dataLabelThreshold value is 3, hence values <=3 are not displayed hence make it to 0
dataLabelThreshold : 0
}
},
legend: { show:true, location: 'e' }
}
);
});
我不明白你的问题?你需要什么?该jsfiddle作为您的形象? –
@ Nouphal.M如何在图表外的jqplot中显示标签?这是我的问题。 –
喜欢你的第二个图标? –