图形化报表

常用的图形报表组件

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();
            }
        }

  

转载于:https://www.cnblogs.com/shuaif/p/3485614.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值