简体   繁体   English

ASP.NET的图表控件

[英]Chart controls for ASP.NET

I am looking people's opinion and experience on using chart controls within an ASP.NET application (web forms or MVC) primarily but also in any kind of project. 我正在寻找人们在ASP.NET应用程序(Web表单或MVC)中使用图表控件的观点和经验,主要是在任何类型的项目中。

I am currently doing my research and I have a pretty big list of controls to evaluate. 我目前正在进行研究,我有一个非常大的控件列表来评估。 My list includes (in no particular order): 我的清单包括(没有特别的顺序):

ASP.NET controls: ASP.NET控件:

Flash controls: Flash控件:

Javascript: 使用Javascript:

(If I missed some that worth to be compared against the above please let me know.) (如果我错过了一些值得与上述比较的话请告诉我。)

What I am looking is opinions on using any of the above so I can form my own and help others do the same, based on what I read here. 我正在寻找的是使用上述任何一种的意见,所以我可以根据我在这里阅读的内容,形成自己的并帮助其他人做同样的事情。

I do not care which one is better. 我不在乎哪一个更好。 What I care for is why someone likes one of the above and what do these controls offer as a distinct advantage. 我关心的是为什么有人喜欢上述之一,这些控件提供了什么作为一个明显的优势。 I am interested in developer's opinion and I would like to find out which things are difficult doing with any of the above controls and which things are easy to achieve. 我对开发人员的意见感兴趣,我想知道哪些事情很难用上面的任何控件做,哪些事情很容易实现。 AJAX compatibility (build in to the controls but also manual), ASP.NET compatibility, input capabilities, data binding options, performance, how much code does one need to write in order to create a chart, are some of the things that I would want to read about. AJAX兼容性(内置于控件但手动),ASP.NET兼容性,输入功能,数据绑定选项,性能,创建图表需要编写多少代码,这些都是我要做的事情。想读一读。

I have already done my research on StackOverflow for relevant questions but there is nothing on the level of detail that I would want to read in order to make a responsible decision. 我已经对StackOverflow进行了相关问题的研究,但是为了做出负责任的决定,我想要阅读的细节水平没有任何内容。

我使用了Microsoft Chart控件,作为标记答案,在这里ASP.NET的图表

SimpleChart is a straight forward and easy to use component. SimpleChart是一个简单易用的组件。 I've used Fusion Charts and would also recommend it for simplicity and well presented graphs. 我已经使用了Fusion Charts,并且还推荐它用于简单和精美的图表。

I worked a little bit with Google charts and the .Net Chart Control ( formerly Dundas Chart 5.5 ). 我使用谷歌图表和.Net Chart Control( 以前的Dundas Chart 5.5 )进行了一些工作。 I do not have an opinion about the other products you listed. 我对您列出的其他产品没有意见。

At the time (a year ago) there was no functioning .Net wrapper framework for Google Charts (at least I did not find one), and while the Google Charts Api is relatively simple, it is also very limited. 当时(一年前),谷歌图表没有正常运行的.Net包装框架(至少我找不到),虽然Google Charts Api相对简单,但也非常有限。 I found the resulting code that composes the chart request to be inherently ugly and not very maintainable (not necessarily the fault of the API, I know - but it would have required a much larger investment to do it better). 我发现构成图表请求的结果代码本质上是丑陋的并且不是很易于维护(不一定是API的错误,我知道 - 但它需要更大的投资来做得更好)。 Here are some of the resulting charts . 以下是一些结果图表 For instance, I was unable to find a way to align the grid with the tick marks. 例如,我无法找到一种方法将网格与刻度线对齐。 The 30mph line on the third chart seems to be randomly placed. 第三张图表上的30英里/小时线似乎是随机放置的。 If you need fine-grained control, Google Charts is not your choice. 如果您需要细粒度控制,Google Charts不是您的选择。

The .Net Chart Control on the other hand gives you a lot of control. 另一方面,.Net Chart Control为您提供了很多控制。 I worked on a prototype earlier this year and the goal was to create charts that matched the ones from a print publication put together by a design firm. 我在今年早些时候制作了一个原型,目标是创建与设计公司拼凑的印刷出版物相匹配的图表。 At first I thought it would require compromises, but the Chart Control turned out to be capable of the job. 起初我认为这需要妥协,但Chart Control结果证明能胜任这项工作。 Here is the result (click the 2nd tab). 结果如下 (单击第二个选项卡)。 I found the ability to use a range chart in this way, and have control over the placement of the labels for the vertical lines at special values pretty unique for a free tool. 我发现能够以这种方式使用范围图表,并且可以控制垂直线条的标签位置,这些特殊值对于免费工具来说是非常独特的。 Also, Alex Gorev who runs the MSDN forum turned out to be very helpful when I ran into an issue (even though he could not ultimately solve it). 此外,运行MSDN论坛的Alex Gorev在遇到问题时证明是非常有用 (即使他最终无法解决)。

Not a control, but another option for producing charts and publish them to the web, is SSRS. SSRS不是控制,而是生成图表并将其发布到网络的另一种选择。 I have used the web service interface to publish a report that contains a chart . 我使用Web服务接口发布包含图表的报表 This could be a better option for very large sets. 对于非常大的集合,这可能是更好的选择。

2014 update: The comments above are for a previous (obsolete) generation of Google's chart API. 2014年更新:以上评论适用于之前(过时)的Google图表API。 The new API probably addresses many of the limitations, so you should check it out. 新API可能解决了许多限制,因此您应该检查它。

so far the best charts I have used is FusionCharts. 到目前为止,我使用的最佳图表是FusionCharts。 it can be used with any programming language, as it provides a good documentation. 它可以与任何编程语言一起使用,因为它提供了良好的文档。 the free version is good enough. 免费版本足够好。

I have done a lot of .Net projects that required graphing and would recommend a solution outside of .Net. 我做了很多需要绘图的.Net项目,并建议在.Net之外的解决方案。 The reason why I go outside of .Net is because I expose my datasets by JSON (usually) and like to move the processing to the client. 我之所以离开.Net是因为我通过JSON(通常)公开我的数据集,并喜欢将处理移动到客户端。 Altogether this saves me burgeoning my servers with graphically intensive tasks. 总而言之,这可以节省我使用图形密集型任务来增强服务器的能力。

I have mainly used Javascript API's and I would recommend Protovis because the charts are beautiful (but not always compatible with IE) and can be manipulated in realtime on the client with new AJAX fed datasets. 我主要使用Javascript API,我会推荐Protovis因为图表很漂亮(但并不总是与IE兼容),并且可以使用新的AJAX馈送数据集在客户端上实时操作。

Another of note is Google Chart and Visualisations. 另一个值得注意的是Google Chart和Visualisations。

Echoing everyone else - it all depends what you need to do with it. 与其他人相呼应 - 这一切都取决于你需要做什么。

We looked at a number of chart controls for a recent project and it's amazing how many of them have really basic limitations. 我们查看了最近项目的一些图表控件,令人惊讶的是,其中有很多都有真正的基本限制。 As an example, we needed to specifically set the size and position of the plot area - you'd think that would be easy but the dundas and the microsoft charting api can't do it. 举个例子,我们需要专门设置绘图区域的大小和位置 - 你认为这很容易,但是dundas和microsoft charting api无法做到这一点。 We also had a lot of problems getting charts to format datetime scales sensibly. 我们还有很多问题让图表能够合理地格式化日期时间尺度。

In the end we went for dotnetCharting. 最后我们去了dotnetCharting。 The website makes it look pretty rubbish, but we've found it to be extremely good, if a little quirky in places. 该网站使它看起来很垃圾,但我们发现它非常好,如果有点古怪的地方。 I'd thoroughly recommend it to anyone. 我完全推荐给任何人。 It's got some reasonably slick AJAXy stuff, but to be honest you can (and we did) custom write most of that stuff yourself anyway. 它有一些相当光滑的AJAXy东西,但说实话,你可以(而且我们确实)自定义自己编写大部分内容。 There are more important things to consider when choosing the tool imho. 选择工具imho时需要考虑更重要的事情。

Make a list of specific things you think you'll need and then find a control that does them. 列出您认为需要的特定事物,然后找到执行它们的控件。 Don't make any assumptions, as a lot of the tools have pretty elementary problems (as above). 不要做任何假设,因为很多工具都有相当基本的问题(如上所述)。

I did not use a lot of charting tools, but make sure it will work with MVC if you are planning to use this framework. 我没有使用很多图表工具,但如果你打算使用这个框架,请确保它可以与MVC一起使用。 I have some issues with the DevExpress Grid and MVC. 我在DevExpress Grid和MVC上遇到了一些问题。

I haven't used a cross-section of these controls, but of the ones I have used, I prefer the Infragistics WebChart. 我没有使用这些控件的横截面,但是我使用的那些,我更喜欢Infragistics WebChart。

In my opinion, the designer is easy to use and there is a ton of flexability. 在我看来,设计师易于使用,并且有很多灵活性。

My second choice would be the Google Chart API . 我的第二选择是Google Chart API

I've used the DevExpress XtraChart in ASP.NET, and it was great. 我在ASP.NET中使用过DevExpress XtraChart,它很棒。 I've used Google Chart API successfully in a rails project, but as it is hosted, generating the points and labels would be easy on any platform. 我在rails项目中成功使用了Google Chart API,但由于它是托管的,因此在任何平台上生成点和标签都很容易。

I am using ChartDirector in my projects. 我在我的项目中使用ChartDirector The thing that I like the most about this component is very complex examples. 我最喜欢这个组件的东西是非常复杂的例子。 I have been able to implement their financial chart example with almost no alterations saving enormous amount of time in the process. 我已经能够实现他们的金融图表示例,几乎没有任何改动,节省了大量的时间。

i has used microsoft charts control in one of my project. 我在我的一个项目中使用了microsoft图表控件。 it provided me things that i needed. 它为我提供了我需要的东西。

Tutorial on Charts Control: http://parasdoshi1989.wordpress.com/2010/10/03/how-to-include-charts-in-visual-studio-2008-express-edition-using-microsoft-chart-control/ 图表控制教程: http//parasdoshi1989.wordpress.com/2010/10/03/how-to-include-charts-in-visual-studio-2008-express-edition-using-microsoft-chart-control/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM