我正在嘗試使用jQplot創建圖表。它運作良好,但我想有一個像http://www.jqplot.com/tests/pie-donut-charts.php的傳奇。但是我的傳奇並不像jqplot網站那樣工作。下面顯示的輸出圖片。有人注意到我想念的是什麼?在這裏,我附上代碼JQuery jqplot傳說不好顯示
$('#tes').live('pageshow', function() {
var data = [
['A', 12],['B', 9], ['C', 14],
['D', 16],['E', 7]];
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,
dataLabels: 'value'
}
},
legend: { show:true, location: 'e' }
}
);
});