前台界面
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
底层的东西都给封装了#region 程序集 FusionCharts.dll, v2.0.50727// D:\char2\Bin\FusionCharts.dll#endregionusing System;namespace InfoSoftGlobal{ public class FusionCharts { public FusionCharts(); public static string EncodeDataURL(string dataURL, bool noCacheStr); public static string RenderChart(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS); public static string RenderChart(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool transparent); public static string RenderChart(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool transparent, string bgColor, string scaleMode, string language); public static string RenderChartHTML(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode); public static string RenderChartHTML(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS); public static string RenderChartHTML(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool transparent); public static string RenderChartHTML(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool transparent, string bgColor, string scaleMode, string language); }}
下面试一下饼图
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Text;using InfoSoftGlobal;public partial class _Default : System.Web.UI.Page{ public string xmlstr = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { data(); } } public void data() { StringBuilder a =new StringBuilder(); a.Append(""); a.Append(" "); string c = a.ToString(); xmlstr = FusionCharts.RenderChart("/FusionCharts/Pie3D.swf", "", a.ToString(), "FactorySum5", "600", "480", false, false, true); }"); a.Append(" "); a.Append(" "); a.Append(" "); a.Append(" "); a.Append("