如何使用MVC4图助手获得3D饼图? [英] How to get 3D Pie Chart using MVC4 Chart Helper?
本文介绍了如何使用MVC4图助手获得3D饼图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
看到这个链接 HTTP: //www.asp.net/web-pages/tutorials/data/7-displaying-data-in-a-chart 并观看饼图,我希望能够在我的MVC4建立在同一个图表页。
after seeing this link http://www.asp.net/web-pages/tutorials/data/7-displaying-data-in-a-chart and watch the Pie Chart, I want to be able to create the same chart in my MVC4 page.
当我用饼图,二维饼图绘制。我怎样才能得到3D图?
When I use Pie chart, the 2D pie chart is drawn. How can I get that 3D chart?
这是视图的code:
@{
var grafico = new Chart(width: 200, height: 200, theme: ChartTheme.Vanilla)
.AddTitle("Cantidad de Servicios por Día")
.AddSeries(
chartType: "Pie",
name: "CantidadServiciosPorDia",
xValue: @ViewData["X"] as string[],
yValues: @ViewData["Y"] as string[])
.Write();
}
干杯,
海梅
Cheers, Jaime
推荐答案
使用Vanilla3D主题:
Use Vanilla3D theme:
@{
var grafico = new Chart(width: 200, height: 200, theme: ChartTheme.Vanilla3D)
.AddTitle("Cantidad de Servicios por Día")
.AddSeries(
chartType: "Pie",
name: "CantidadServiciosPorDia",
xValue: @ViewData["X"] as string[],
yValues: @ViewData["Y"] as string[])
.Write();
}
祝你好运。
这篇关于如何使用MVC4图助手获得3D饼图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文