[英]Label the JQplot pie chart
我正在使用JQplot饼图。 我需要标签出现在图表之外。 我怎么能做到这一点?
如果您的意思是数据标签,那么您需要将dataLabelPositionFactor
设置为大于1.0
适当值,并且您已完成。
要做到这一点,你需要指定放置属性:
legend: {
show:true; placement: "outsideGrid"
}
示例:
$.jqplot('YOUR_DIV_ID', [['LABEL_1',2],['LABEL_2',232],['LABEL_3',22], {
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
}
},
//Make legend visibile, outside the chart
legend: {
show:true, placement: "outsideGrid"
}
}
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.