• 今天 了解了一下 但是看不到解析xml的底层代码 也没什么东西


    前台界面
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script type="text/javascript" src="FusionCharts/FusionCharts.js">
        
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <tr>
                <td>
                    <%=xmlstr%>
                </td>
            </tr>
        </div>
        </form>
    </body>
    </html>
    
    
    
    
    
    
    
    
    底层的东西都给封装了
    #region 程序集 FusionCharts.dll, v2.0.50727
    // D:\char2\Bin\FusionCharts.dll
    #endregion
    
    using 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("<chart caption='生命周期'   pieSliceDepth='30' baseFontSize='12'  formatNumberScale='0' bgAlpha='100'  numberSuffix=''>");
            a.Append("<set label='儿童' value='6' />");
            a.Append("<set label='老年' value='686' />");
            a.Append("<set label='青年' value='2318' />");
            a.Append("<set label='少年' value='0' />");
            a.Append("<set label='中年' value='7433' />");
            a.Append("</chart>");
            string c = a.ToString();
    
           xmlstr = FusionCharts.RenderChart("/FusionCharts/Pie3D.swf", "", a.ToString(), "FactorySum5", "600", "480", false, false, true);
           
        }
        


     

  • 相关阅读:
    TypeError: Object of type 'type' is not JSON serializable解决方法
    Python Logging
    Mysql 主从赋值
    (转)Mysql 创建用户 查看权限 授权
    mysql you need (at least one of) the SYSTEM_USER privilege(s) for this operation
    java 多线程 六、线程状态
    java 多线程 五、线程组
    java 多线程 四、线程通信
    java Runtime类 Time类
    java 设计模式 ---- 饿汉 , 懒汉
  • 原文地址:https://www.cnblogs.com/haihang/p/2804884.html
Copyright © 2020-2023  润新知