web and print charts

回眸只為那壹抹淺笑 提交于 2020-01-25 11:31:14

问题


We have a requirement to display charts in an ASP.NET MVC app but the people using the app will need to be able to print the charts to paper and also save them as an image for use in presentations.

They need to be high quality for the print/present versions and it seems to me that the web based charting tools are just that - optimised for web.

The co i work for have historically used fusion charts but getting the quality out of that has eluded them.

If we have to build a whole separate "out of process" chart builder that emails the higher quality images to the user that is fine - they have the budget if it's needed. I'd really rather not keep chart code in more than one place though.

Has anyone solved this in .NET land?


回答1:


I can't relate to the .NET part, but I don't see the relevancy of it to the presentation and visualization needs. If you are developing MVC, you can let your View to be independent of your Model and Control parts.

I think that you can use HTML5/JavaScript presentation frameworks for it for both your desktop/browser and your print/presentation needs.

You can use a presentation framework that is based on SVG, which you can scale to any resolution. A very good visualization framework is D3 (for example, http://mbostock.github.com/d3/ex/bullet.html).

You can then use PhantomJS http://www.phantomjs.org/ for headless rendering of these charts, for printing and embedding in presentation as images.



来源:https://stackoverflow.com/questions/9033342/web-and-print-charts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!