Some time ago, bar charts and pie charts were used in the development of the project. Since there are no good controls on VS, I searched online and found that the rating of the chart control is quite high. Let me talk about the installation steps first. You must install it first. . .NET Framework 3.5SP1, corresponding to VS2008 installs MSChart_VisualStudioAddOn.exe, and VS2010 installs MSChart.exe. After installation, open the VS software. You can see the chart control in the data control library. You can drag it over and use it.
Mainly accept the meaning of some attributes, so as not to learn it again and waste time
Front desk:
EnableViewState =" True " HEIGHT =" 303px " WIDTH =" 1015PX " ImageStorageMode =" UseImageLocation " >
. "Center" docking = "left" name = "Legend1" title = "legend" >
The
Series>
< ChartAreas>
Save the produced images to the server.
Backend:
Dataset DT = CStatsReportV3.CommitCountyByStaffid(dtDKFFRQ, n type, ACTID, gdzxdept, real estate objDB);
chrCount.DataSource = DT;
OstaffnameListByActid(dtDKFFRQ, ACTID, n type, gdzxdept, Real estate objDB); //Bind data source
use using using ‐ off The foreach(Cdc_staff objstaff at arrdc_staff)
chrCount.Series.Add(objstaff.m_nStaffid.ToString());
chrCount.Series[objstaff.m_nStaffid.ToString()] = Legend "Legend1".
ChrCount.Series[objstaff.m_nStaffid.ToString()] LegendText = objstaff.m_szStaffname.
. chrCount.Series [objstaff.m_nStaffid.ToString()] //The axis is the user
chrCount.ChartAreas ["ChartArea1"] = AxisY.Title"Number of pens (unit: pen)"; //Ÿ axis unit
chrCount.ChartAreas ["ChartArea1"] = AxisY.TitleAlignment StringAlignment.Far; //Set the Ÿ axis title The name of the location is far away
chrCount.ChartAreas ["ChartArea1"] AxisX.Interval = 1.
. //txtDateEnd.Text = ToString() of chrCount.Series.LongCount();
// String file = using Server.Mappath(@"~/TMPFILES/2.jpeg"); , ChartImageFormat.Jpeg);
use using using using out out of ’s' ’s ’ ’s through through through through through through ’s ’ through ’’‐ ‐‐‐‐‐‐‐‐‐‐ together to .Enabled = FALSE;
http://fancility.taobao.com This is a store run by my wife. Let’s go shopping when you have time