问题描述
http://blog.csdn.net/21aspnet/archive/2007/03/27/1543320.aspx按这个列子做出来了可是生成的图片是分成两截的实在不会改谁有更好更方便的方法最好
解决方案
解决方案二:
沙发...
解决方案三:
我以前自己写的一个例子,你可以参考下,没出现图片2节的问题http://www.cnblogs.com/xh831213/archive/2006/05/16/401461.html
解决方案四:
up--
解决方案五:
参考资料:http://blog.sina.com.cn/bigmoneyhunter
解决方案六:
很早以前写的了.是用/t分开的..希望能帮到你.*我的ArrayList里放的是所有的以/t分开的数据.cat[0]->11/t/22/t/33/t...cat[1]->4/t/5/t6/t...cat[..]///<summary>///生成图片///</summary>///<paramname="sName">图例</param>///<paramname="cat">(x)分类</param>///<paramname="value">(y)值</param>publicvoidBuildPic(ArrayListsName,ArrayListcat,ArrayListvalue){Microsoft.Office.Interop.Owc11.ChartSpaceobjChart=newMicrosoft.Office.Interop.Owc11.ChartSpaceClass();Microsoft.Office.Interop.Owc11.ChChartobj=objChart.Charts.Add(0);obj.Type=Microsoft.Office.Interop.Owc11.ChartChartTypeEnum.chChartTypeLine;//obj.Type=Microsoft.Office.Interop.Owc11.ChartChartTypeEnum.chChartTypeSmoothLine;//指定图表是否需要图例obj.HasLegend=true;//给定标题obj.HasTitle=true;obj.Title.Caption="总报表图表";//给定x,y轴的图示说明obj.Axes[0].HasTitle=true;obj.Axes[0].Title.Caption="时间";obj.Axes[1].HasTitle=true;obj.Axes[1].Title.Caption="Y:值";for(inti=0;i<cat.Count;i++){//添加一个seriesobj.SeriesCollection.Add(i);//给定series的名字obj.SeriesCollection[i].SetData(Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimSeriesNames,+(int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral,sName[i].ToString());//给定分类(x轴)obj.SeriesCollection[i].SetData(Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimCategories,+(int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral,cat[i].ToString());//给定值obj.SeriesCollection[i].SetData(Microsoft.Office.Interop.Owc11.ChartDimensionsEnum.chDimValues,(int)Microsoft.Office.Interop.Owc11.ChartSpecialDataSourcesEnum.chDataLiteral,value[i].ToString());}//strCategory="";//strvalue="";//输出成GIF文件.stringstrAbsolutePath=(Server.MapPath("."))+"\"+Session.SessionID+".gif";objChart.ExportPicture(strAbsolutePath,"GIF",600,350);FileStreamfile=File.OpenRead(strAbsolutePath);byte[]content=newbyte[file.Length];file.Read(content,0,content.Length);file.Close();Response.BinaryWrite(content);File.Delete(strAbsolutePath);}