0
OK,這應該是比較簡單的:添加圖例,以圓環圖 - jqPlot
- 我加入了圓環圖,它不工作
- 然而, '傳奇'(如
Head (+)
以及相應的顏色)不顯示。
代碼:
$(document).ready(function(){
var s1 = [['Head (+)',<?php echo $headScore; ?>], ['Head (-)',<?php echo 6-$headScore; ?>]];
var s2 = [['Body (+)',<?php echo $totalScore-$headScore; ?>], ['Body (-)',<?php echo 7-$totalScore+$headScore; ?>]];
var plot3 = $.jqplot('linkchart', [s1,s2], {
title:"Score Profile",
seriesDefaults: {
// make this a donut chart.
renderer:$.jqplot.DonutRenderer,
rendererOptions:{
// Donut's can be cut into slices like pies.
sliceMargin: 3,
// Pies and donuts can start at any arbitrary angle.
startAngle: -90,
showDataLabels: false
},
legend: { show:true, location: 'e' }
}
});
});
我在做什麼錯?
OMG!阿尼希,非常感謝!這真是一個非常愚蠢的人,但是......我實在無法真正發現自己! :-) –