jQuery
mvc3 を使用してモバイル アプリを作成しています。これで、jqPlot
円グラフを作成しました。
円グラフのすべてのスライスに色が表示されるわけではありません。つまり、チャートに 4 つのスライスがある場合でも 1 つのスライスに色が表示され、他の 3 つのスライスには定義されたスライスの背景色ではなく白い背景が表示されることがあります。
単色で塗りつぶされた完全なチャートを毎回表示したい。
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 },
});
});
誰でもこの問題で私を助けることができますか?