0
我正在使用mvc3创建jQuery
移动应用程序。在此我创建了jqPlot
饼图。在mvc3中填充jqplot饼图的所有片段
它不会显示饼图所有切片的颜色,即 即即使在图表中有四个切片时,它有时也会显示一个切片的颜色,对于其他三个切片,它显示白色背景而不是其定义切片背景颜色。
我希望它每次显示具有纯色填充的完整图表。
jqPlot
饼图的图像:
http://i.stack.imgur.com/qH4o9.png
我使用这个代码:
jQuery(document).ready(function ($) {
var data = [
['Correct Answers', @Correct_Answer], ['Incorrect Answers', @Incorrect_Answer], ['Skipped Answers', @Skipped_Answer],
['Unseen Answers', @Unseen_Answer]
];
var plot1 = $.jqplot('score_chart', [data],
{
seriesColors: ["#83abc0", "#64d6f4", "#3399ff", "#03597a"],
highlightColors: ["#ADC7D5", "#99E3F6", "#78BAFE", "#568FA6"],
seriesDefaults: {
// Make this a pie chart.
fill: true,
renderer: $.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
padding: 5,
fill: true,
fillAndStroke: true,
showDataLabels: true
}
},
legend: { show: true, location: legendlocation },
});
});
谁能帮助我解决这个问题?
你可以请建立一个http://jsfiddle.net这会提出你的问题?这是你的经验是不寻常的。 – Boro