Owc的使用---自己封装好的类可以实现14种分析图
来源:互联网 发布:淘宝店铺转让在哪里 编辑:程序博客网 时间:2024/06/10 00:51
一、图形类型列表
chChartTypeColumnClustered----------垂直柱状统计图
chChartTypeColumn3D-----------------3D垂直柱状统计图
chChartTypeBarClustered---------------水平柱状统计图
chChartTypeBar3D--------------------- 3D水平柱状统计图
chChartTypeArea----------------------- 区域统计图
chChartTypeArea3D--------------------3D区域统计图
chChartTypeDoughnut------------------ 中空饼图
chChartTypeLineStacked--------------- 折线统计图
chChartTypeLine3D---------------------3D折线统计图
chChartTypeLineMarkers--------------- 折线带点统计图
chChartTypePie------------------------- 饼图
chChartTypePie3D----------------------3D饼图
chChartTypeRadarSmoothLine----------网状统计图
chChartTypeSmoothLine----------------弧线统计图
二、dll下载
下载地址: OWCWebChart.rar
三、使用方法
1、 在引用中引用dll
2、 using OWCWebChart;
3、 使用:
WebChart wc = new WebChart();
string name;
name = wc.show(type,this,datatable,"AAAA题目AAAAA","类别","数量","销售图");
this.Image1.ImageUrl=@"images/"+name;
说明:type-------即图形类型,直接给英文字符串
this-------即本页面
datatable—中包含两列,第1列为类别,第2列为数量.例如1列为年,2列为销售额
接下来的4个字符串参数分别是:大标题,类别,数量,和小标题
name-------是图片名称;
images------是Web应用程序下与本页面(this)同层的文件夹
4、 具体示例代码:
webconfig文件
<appSettings>
<add key="Connstring" value="Data Source=(local);User ID=sa;Password=sa;Initial Catalog=pubs" />
</appSettings>
web页面:加入一个Image,将下列代码放在Page_Load中, 在引用中引用dll
加入namespace
using OWCWebChart;
using System.IO;
using System.Configuration;
using System.Data.SqlClient;
代码:
string sql = "SELECT " +"Year(sa.ord_date) As [Year], " +"SUM(sa.qty) As [Qty] " +"FROM " +"sales sa " +"inner join stores st on(sa.stor_id = st.stor_id) " +"GROUP BY " +"Year(sa.ord_date) " + "ORDER BY " + "[Year]";
string conn = ConfigurationSettings.AppSettings.Get("Connstring");
SqlDataAdapter da = new SqlDataAdapter(sql,conn);
DataSet ds = new DataSet();
da.Fill(ds,"chartData");
WebChart wc = new WebChart();
name = wc.show("chChartTypeColumnClustered",this,ds.Tables[0],"AAAAAAAA题目AAAAAAAA","类别","数量","销售图");
this.Image1.ImageUrl=@"images/"+name;
5、 效果图
6、 注意:本dll仅能在Web项目中使用.本dll封装的是owc10
- Owc的使用---自己封装好的类可以实现14种分析图
- Owc的使用---自己封装好的类可以实现14种分析图
- 目前我的OWC可以实现的效果
- 用OWC做统计图总结(做的一个封装类)
- 使用技术实现OWC对的展示(二)
- 使用技术实现OWC对的展示(一)
- 封装好的Android广告栏,效果较好功能强大,可以很方便地直接使用
- OWC在展现时的翻译实现
- 图片封装下载器--自己的代码库--可以直接使用
- 自己写的封装好的简单的AJAX--javascript
- OWC(Office Web Component)的使用
- 使用owc开发报表的示例
- OWC绘图控件研究(值得一读的好文章)
- 自己封装的工具类,使用原生SwipeRefreshLayout+RecycleView实现下拉刷新和加载更多
- 封装好的一个的Toast工具类(可以直接调用)
- 封装好的缓存类
- 封装好的分页类
- 封装好的分页类
- hibernate映射总结详解: 按外键映射一对一关联关系
- Proxy(代理)
- Ajax - 基础教程第八章例子学习三
- 使用管道的方式导入导出数据
- Factory(工厂)
- Owc的使用---自己封装好的类可以实现14种分析图
- hook编程
- Observer(观察者)
- 分区函数partition by 与 分组函数group by 得区别
- Adapter(适配器)
- using DTP to connect to MySQL
- 完成端口GetQueuedCompletionStatus返回值的问题
- Windows常见基本进程八:wuauclt
- 创建Oracle存储过程