"景先生毕设|www.jxszl.com

C# ChartArea类代码示例

2023-12-29 17:43编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中ChartArea类的典型用法代码示例。如果您正苦于以下问题:C#ChartArea类的具体用法?C#ChartArea怎么用?C#ChartArea使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Details publicActionResultDetails(intwidth=500,intheight=500) { varchart=newChart{Height=height,Width=width}; varchartArea=newChartArea("Area1") { AxisX={Interval=1}, Area3DStyle={Enable3D=true}, BackColor=Color.Transparent }; chart.ChartAreas.Add(chartArea); chart.BackColor=Color.Transparent; varseriescountAll=newSeries("项目统计"); varcountAll= _iProjectInfoStateService.GetAll() .Select(a=>new{Key=a.ProjectInfoStateName,Count=a.ProjectInfos.Count(b=>!b.Deleted)}); seriescountAll.ChartArea="Area1"; seriescountAll.IsVisibleInLegend=true; seriescountAll.IsValueShownAsLabel=true; seriescountAll.Label="#VALX#VALY"; seriescountAll.Points.DataBind(countAll,"Key","Count",""); seriescountAll.ChartType=SeriesChartType.Funnel; chart.Series.Add(seriescountAll); varimageStream=newMemoryStream(); chart.SaveImage(imageStream,ChartImageFormat.Png); imageStream.Position=0; returnnewFileStreamResult(imageStream,"image/png"); }
原文链接:http://www.jxszl.com/biancheng/C/556730.html