简体   繁体   中英

how to create bar chart and pie chart in asp.net 2.0 using c#?

如何创建asp.net 2.0饼图和条形图

You can try beautiful and attractive Silverlight Bar and Pie Chart from Visifire . Visifire is the best choice if you really want to concentrate on looks, clarity while creating presentation or report. Also Visifire works with all versions of asp.net.

Visifire Bar Chart Gallery: http://visifire.com/silverlight_bar_charts_gallery.php
Visifire Column Chart Gallery: http://visifire.com/silverlight_2d_column_charts_gallery.php
Visifire Pie Chart Gallery: http://visifire.com/silverlight_pie_doughnut_charts_gallery.php

在此输入图像描述

MS 图表控制

If you don't have to build complex and interactive charts you could try Google Chart, it's super easy...

example:

<img src="https://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World" />

produce:

替代文字

http://code.google.com/apis/chart/

You could write your own Generic Handler (.ashx) that generates an Image of your Bar Chart/Pie Chart as a Bitmap using System.Drawing and saves it to the Response.OutputStream if a) you really want to make life hard for yourself or b) really need to customise the output in detail

Much better to use one of the Controls recommended by the other guys

ZedGraph ?
Examples:

替代文字 替代文字

I recomend fusion charts. This API make things very easy to implement.

http://liberofusioncharts.codeplex.com/ 在此输入图像描述

regards

There is no question about it the clear #1 choice for me has been to use the MS Chart controls that have builds for both the .NET 2.0 and 4.0 Frameworks. Actually the controls were originally aquired from Dundas by Microsoft so the similarities exist, but the MS Chart controls are free!! They exist in the System.Web.DataVisualization namespace.

I have been using them for about 3 years now, and the extensive documentation and samples make creating the charts a BREEZE in ASP.NET. Take a look at the links below to get started:

Samples Environment for Microsoft Chart Controls (downloadable code helps a lot!):
http://archive.msdn.microsoft.com/mschart

Getting Started (Chart Controls):
http://msdn.microsoft.com/en-us/library/dd456753.aspx

In addition to Microsoft Charting you can also get good components from

  1. Dundas
  2. DevExpress
  3. DotNetCharting

对于与MS Chart Control不同的方法或其他组件将用于使用Microsoft Report Viewer控件并以此方式设计报表(本地或通过报表服务)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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