看到此链接http://www.asp.net/web-pages/tutorials/data/7-displaying-data-in-a-chart并观看饼图后,我希望能够在我的MVC4页面中创建相同的图表。
当我使用饼图时,绘制了二维饼图。我怎样才能获得3D图表?
这是视图的代码:
@{
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();
}
干杯, 海梅
答案 0 :(得分:2)
使用Vanilla3D主题:
@{
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();
}
祝你好运。