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);
      
  • 相关阅读:
    523 vue组件化高级 插槽slot:slot基本使用,具名插槽,编译作用域,作用域插槽
    522 vue父子组件的访问方式: $children、$refs、$parent
    521 vue子组件向父组件传递数据
    520 vue父组件向子组件传递:props基本用法,props数据验证,props中的驼峰标识
    在 React 组件中使用 Refs 指南
    Flutter 代码开发规范
    Angular ZoneJS 原理
    vue中$refs, $emit, $on, $once, $off的使用
    详解Js加法运算符
    JavaScript 异常
  • 原文地址:https://www.cnblogs.com/JimZhang/p/226048.html
Copyright © 2011-2022 走看看