kendo ui 的 pie charts怎么动态获取数据库的内容生成饼图,柱状图和折线图,求大神指教。
实在是搞不定那个饼图 T~T
实在是搞不定那个饼图 T~T
</div>
<script>
function createChartPie() {
$("#chart_pie").kendoChart({
title: {
text: ""
},
legend: {
position: "bottom"
},
dataSource:{
transport:{
read:{
url:"@Html.Raw(Url.Action("action", "controller"))",
dataType: "json",
type: "POST"
}
},
},
series: [{
type: "pie",
field: "TotalQuantity",
categoryField: "ProductName",
explodeField: "explode"
}],
seriesColors: ["#42a7ff", "#666666", "#999999", "#cccccc"],
tooltip: {
visible: true,
template: "${ category } - ${ value }%"
}
});
}
$(document).bind("kendo:skinChange", createChartPie);
</script>