MYASP-fusionChart报表源代码(包能运行)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using InfoSoftGlobal; using System.Text; using System.Data.SqlClient; using System.Data; namespace MYASP { /// <summary> /// Author:jilongliang /// </summary> public partial class index : System.Web.UI.Page { protected void Page_Load (object sender, EventArgs e) { } /// <summary> /// 直接在控件加载出来 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Literal1_Load (object sender, EventArgs e) { Literal1.Text = FusionCharts.RenderChart("swf/ScrollCombiDY2D.swf", "fusioncharts.xml", "", "fusioncharts1", "500", "500", false, true); } /// <summary> /// 用户输入显示的图形fusioncharts /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click (object sender, EventArgs e) { //Request.Form() //Label1.Text = Request["ponit1"]; StringBuilder xmlData = new StringBuilder(); xmlData.Append("<chart caption='报表' subCaption='报表' showPercentValues='1' pieSliceDepth='30' showBorder='1'>"); xmlData.AppendFormat("<set label='Java' value='{0}' />", txtPoint1.Text); //txtPoint1.Text xmlData.AppendFormat("<set label='asp.net' value='{0}' />", txtPoint2.Text); xmlData.AppendFormat("<set label='C++' value='{0}' />", txtPoint3.Text); xmlData.AppendFormat("<set label='Android' value='{0}' />", txtPoint4.Text); xmlData.Append("</chart>"); Literal1.Text = FusionCharts.RenderChart("swf/Pie3D.swf", "", xmlData.ToString(), "fusioncharts2", "800", "500", false, false); } /// <summary> /// 从数据库读数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Literal2_Load (object sender, EventArgs e) { string query = "select Team ,Points from tb_charts"; StringBuilder xmlData = new StringBuilder(); using(SqlDataReader dr = SQLDBHelper.ExecuteReader(CommandType.Text, query, null)) { //<chart caption='某公司部门报表数据显示' xAxisName='Teams' yAxisName='Points' showValues='0' formatNumberScale='0' showBorder='0'> xmlData.AppendFormat("<chart caption='某公司报表数据显示'>"); while(dr.Read()) { xmlData.AppendFormat("<set label='{0}' value='{1}'/>", dr ["Team"].ToString(), dr ["Points"].ToString()); } xmlData.AppendFormat("</chart>"); Literal2.Text = FusionCharts.RenderChart("swf/Column3D.swf", "", xmlData.ToString(), "testChart", "500", "500", false, true); } } /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void test2_Click (object sender, EventArgs e) { string str1=Request ["ponit1"]; Label1.Text=str1; StringBuilder xmlData = new StringBuilder(); xmlData.Append("<chart caption='报表' subCaption='报表' showPercentValues='1' pieSliceDepth='30' showBorder='1'>"); xmlData.AppendFormat("<set label='Java' value='{0}' />", txtPoint1.Text); //txtPoint1.Text xmlData.AppendFormat("<set label='asp.net' value='{0}' />", txtPoint2.Text); xmlData.AppendFormat("<set label='C++' value='{0}' />", txtPoint3.Text); xmlData.AppendFormat("<set label='Android' value='{0}' />", txtPoint4.Text); xmlData.Append("</chart>"); Literal1.Text = FusionCharts.RenderChart("swf/Pie3D.swf", "", xmlData.ToString(), "fusioncharts2", "800", "500", false, false); } protected void test2_Click1 (object sender, EventArgs e) { } } }
- 1
- 2
- 3
- 4
- 5
- 6
- whistlezl2014-02-11谢谢,官方网站例子在这儿 http://docs.fusioncharts.com/charts/contents/guide-for-web-developers/csnet/CS_BasicExample.html
- SYSTEMUK2013-10-19蛮好用的,不错.
- liqi_wj2014-07-08还可以,只不过自己不会用~
- 肉肉妈妈2012-12-06不错,不错,用得上
- auqfwfgiaw2013-04-21没有数据库,怎么用呢?
- 粉丝: 40
- 资源: 94
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MAE-Masked Autoencoders Are Scalable Vision Learners
- quark(夸克)正版下载
- ssoPlusFrontdsfdsfdsfsadawsdad
- 基于ARM Cortex-M3 内核的 STM32F103C8T6 系统板为载体,实现了的智能点阵屏的设计【课程设计/毕业设计】(源码+论文)
- Hierarchical Consensus Hashing for Cross-Modal Retrieval
- 基于 C++ OpenCV视觉库实现的计算机视觉分析,得到手掌上五根手指的长度与宽度、手掌虎口的角度、手掌的宽度以及手腕的宽度 完成对手掌各个参数的精确测量课程设计(源码+报告)
- 联想7400打印机更换定影组件.jpg
- 基于servlet+jsp+mysql实现的影视管理系统课程设计
- 正点原子RK3568卡片电脑ATOMPI-CA1的ubuntu-22.04.5最小安装包,特别适合运行板级ROS2环境iron
- GUIdemo.zip