获取日志消息:饼图的直径太小,无法渲染。
然后,似乎当我在我得到的页面内悬停或单击时: Uncaught TypeError: Cannot read property '0' of undefined
<link href="/Content/jqPlot/jquery.jqplot.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery.jqplot.js" type="text/javascript"></script>
<script src="/Scripts/jqplot.pieRenderer.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
//GetWeeklyProjectSummary();
Test();
});
function Test() {
var data = [["987 Project",74],["ABC Project",68],["XYZ project",26]];
var plot1 = jQuery.jqplot('weeklyProjectSummary', [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
}
},
legend: { show: true, location: 'e' }
}
);
}
</script>
这是它进入的div:
<div id="weeklyProjectSummary"></div>
这是我在页面上得到的:
如果您需要更多详细信息,请告诉我。