微软图表,MVC 3和剃刀 [英] Microsoft Charting, MVC 3 and Razor

查看:148
本文介绍了微软图表,MVC 3和剃刀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相关<一个href=\"http://stackoverflow.com/questions/319835/new-asp-net-charting-controls-will-they-work-with-mvc-eventually#320891\">This话题我不知道是否有人已经使微软图表库天冬氨酸MVC 3和剃刀工作。

Related to This topic I wonder if anyone has made the Microsoft Charting library working with Asp MVC 3 and Razor.

我知道推出了新的图表帮助,但由于这是非常有限的,是不是一个真正的选择。

I know about the new chart helper introduced, but since that is very limited that is not really an option.

要创建一个返回的图像也很容易做到,但操作方法,因为所有的交互性打破了(甚至只是简单的工具提示条形图中横杠),这种方法有一些限制。

To create an action method that returns an image is also easy enough, but since all interactivity breaks down (even just simple tooltips for the bars in a bar chart) this method has several limitations.

这个例子是可能最有用的文章中,我已经找到,但我仍然无法得到一个简单的图表甚至工作虽然它只是在一个操作方法渲染图像时使用。此外,我已经下了.NET 4的做工精细的样品,但很明显,那些的arent MVC样本。

This example is probably the most helpful article I have found, but I still cant get a single easy chart working even though it does work when rendering the image only in an action method. Also I have got the samples working fine under .net 4, but obviously those arent MVC samples.

SO - 有没有人得到了微软的图表完全在ASP中的MVC 3剃须刀工作,并可以发布一个链接到一个完整的解决方案

SO - has anyone got Microsoft charting working fully in Asp MVC 3 with Razor and could post a link to a complete solution?

推荐答案

如果是刀尖和钻取你正在寻找那么这里是一个样本。我试着和工作对我来说是魅力。您需要将图像映射已经与你的形象联系到具有互动性。

If it is tool tip and drill down you are looking for then here is a sample. I tried and worked as a charm for me. You need to have ImageMap linked with your image to have interactivity.

<一个href=\"http://geekswithblogs.net/DougLampe/archive/2011/01/23/charts-in-asp.net-mvc-2-with-drill-down.aspx\">MVC具有交互图表

这篇关于微软图表,MVC 3和剃刀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆