zoukankan      html  css  js  c++  java
  • 图形化报表

    常用的图形报表组件

    Highcharts : 纯javascript编写的   支持所有主浏览器,支持图片缩放显示,开源

    水晶报表:  商务智能(BI)软件实现了与绝大对数流行开发工具的集成和接口

    JqChart: 由html5和jquery 编写 支持手持设备,具备实时绘制功能

    MSChart: vs 自带 

    XtraReports: 适用于Windows和ASP.NET

     private void showdata()
            {
                string sql = string.Format("select chvCityName,DATEPART(month,dtmMeasure) as 'Month' ,AVG(fltTemperature) as 'AvgTemp' from TblTenmperature where chvCityName='重庆' or chvCityName='北京' group by chvCityName,DATEPART(month,dtmMeasure) order by Month  desc");
                DataSet ds = SqlHelper.ExecuteDataSet(sql, null);
                this.Chart1.Series.Clear();
                this.Chart1.Series.Add("重庆");
                this.Chart1.Series.Add("北京");
                //图表类型
                this.Chart1.Series["重庆"].ChartType = SeriesChartType.Line;
                this.Chart1.Series["北京"].ChartType = SeriesChartType.Line;
                this.Chart1.BackColor = Color.Azure;
                //边框
                this.Chart1.BorderlineColor = Color.Green;
                this.Chart1.BorderlineWidth = 5;
                this.Chart1.BorderlineDashStyle = ChartDashStyle.Solid;
                this.Chart1.Titles.Add("中国城市月平均气温走势图");
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    DataPoint point=new DataPoint (Convert.ToDouble(item["Month"]),Convert.ToDouble(item["AvgTemp"]));
                    point.AxisLabel = string.Format("{0}月",item["Month"]);
                    point.Label = string.Format("{0}°", item["AvgTemp"]);
                    point.LabelToolTip = string.Format("{0}月平均气温:{1}摄氏度", item["Month"], item["AvgTemp"]);
                    this.Chart1.Series[item["chvCityName"].ToString()].Points.Add(point);
                   // this.Chart1.Legends.Add(item["AvgTemp"].ToString());
                 //  point.LegendText=item["AvgTemp"].ToString();
                }
            }
    

      

  • 相关阅读:
    18_异常机制和File类
    20个简洁的 JS 代码片段
    在 Python 中实现延迟调用
    停止 Goroutine 有几种方法?
    图解Python中深浅copy
    Python 自制简单实用的日志装饰器
    Go 里的错误得这样写才优雅~
    推荐8个炫酷的 Python 装饰器!
    两个 Django 插件( django_extensions,django_toolbar)
    一文看懂Python系列之装饰器(decorator)
  • 原文地址:https://www.cnblogs.com/shuaif/p/3485614.html
Copyright © 2011-2022 走看看