【发布时间】:2013-12-12 10:06:09
【问题描述】:
我正在尝试使用 jQplot 创建图表。它工作得很好,但我想要一个像 http://www.jqplot.com/tests/pie-donut-charts.php 这样的传奇。但我的传说不像在 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' }
}
);
});
【问题讨论】:
标签: javascript jquery jquery-mobile jquery-plugins