0
我想显示一个jqplot饼图,即时能够显示它与静态数据,但我想显示动态数据从数据库..为此,我连接到我的数据库,并将数据绑定到列表,现在如何我可以从我的视角打电话给我吗?将动态数据传递给mvc3中的jqplot饼图?
$(document).ready(function(){
var data = [
['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14],
['Out of home', 16],['Commuting', 7], ['Orientation', 9]
];
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
}
},
legend: { show:true, location: 'e' }
}
);
});
,现在我的要求是,以显示从数据库中相同的数据和我在控制器绑定这个数据到列表,现在我怎么能调用列表,从我的观点?