开发者

How to style ASP.Net charts in MVC 3?

开发者 https://www.devze.com 2023-03-11 06:59 出处:网络
There is a basic HTML helper for generating charts in .NET, but it does not allow to specify some basic styling, position of the legend and things like that. Al开发者_如何学JAVAternative is to generat

There is a basic HTML helper for generating charts in .NET, but it does not allow to specify some basic styling, position of the legend and things like that. Al开发者_如何学JAVAternative is to generate chart in a controller using old DataVisualization.Charting namespace, but this is too hacky. I don't understand why MVC 3 does not address this issue? The charts are too basic.

THank you


The correct way is to use XML.

See here

http://weblogs.asp.net/imranbaloch/archive/2011/03/21/chart-helper-in-asp-net-mvc-3-0-with-transparent-background.aspx


Solution is to use MSCharts that were originally written for web forms. Servlets should generate chart images and serve them to calling views. This has been explained in: Charting in ASP.Net MVC 3

0

精彩评论

暂无评论...
验证码 换一张
取 消