zoukankan      html  css  js  c++  java
  • 利用TeeChar生成统计图的使用方法(一、动态生成统计图)

    今天我在工作中利用Teechart生成 成绩分析图,源代码主要片段先发上来。不好意思。没时间整理,大家自己看。我是菜鸟(^ - ^)
         WebChart wc=new WebChart();
          wc.Visible=true;
          Steema.TeeChart.Chart ch2=wc.Chart;
          MemoryStream tmpChart2=new MemoryStream();
          ch2.Header.Text="总分对比";
          ch2.Header.Font.Bold=false;
          ch2.Header.Font.Color=Color.Red;
          ch2.Header.Font.Size=10;
          //控制面板的背景色
          ch2.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(0xFF,0xEE,0xF2);
          ch2.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(0xFE,0xCB,0xD7);
          ch2.Panel.Brush.Gradient.Visible = true;
          ch2.Aspect.View3D = false;
          //外观
          ch2.Aspect.Elevation = 315;
          ch2.Aspect.Orthogonal = false;
          ch2.Aspect.Perspective = 0;
          ch2.Aspect.Rotation = 360;
          ch2.Invalidate();
          //设置线条
           Line AnalyLine2=new Line();
           AnalyLine2.OutLine.Color = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(0)));
           AnalyLine2.ColorEachLine=false;
           AnalyLine2.OutLine.Visible = true;
           AnalyLine2.Pointer.Visible = true;
           AnalyLine2.ColorEach=false;
           AnalyLine2.Brush.Color = System.Drawing.Color.Green;
           for(int x=0;x<4;x++)
            {
            AnalyLine2.Add(x,"第"+Convert.ToString(x+1)+"次");
            }
           ch2.Series.Add(AnalyLine2);
          ch2.Width=300;
          ch2.Height=160;
          ch2.Export.Image.PNG.Save(Server.MapPath(ComFunction.StatImgPath+"ScoreAnalyse"+j.ToString()+".png"));
            tr=new TableRow();
          TableCell tc=new TableCell();
          tc.HorizontalAlign=HorizontalAlign.Center;
          tc.Text="<img src=\""+ComFunction.StatImgPath+"ScoreAnalyse"+j.ToString()+".png\" border=0 width=300 height=160>";
          tr.Cells.Add(tc);
          tbStatImg.Rows.Add(tr);
      
  • 相关阅读:
    黑客防线
    基于onvif的码流转换专利
    8168开发之---1g内存换成512M的内存映射配置
    图像处理之基础---内积、点积
    3s 简介
    嵌入式开发之工具---比开发手册更重要的一个命令 man page
    图像处理之基础---频域分析
    lbp纹理特征
    28.Docker介绍与目录
    09.客户端集成IdentityServer
  • 原文地址:https://www.cnblogs.com/JimZhang/p/226048.html
Copyright © 2011-2022 走看看