zoukankan      html  css  js  c++  java
  • 今天 了解了一下 但是看不到解析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);
           
        }
        


     

  • 相关阅读:
    WEB学习-CSS行高、字体,链接的美化以及背景
    WEB学习-CSS中Margin塌陷
    Java反射02 : Class对象获取的三种方式和通过反射实例化对象的两种方式
    Java反射01 : 概念、入门示例、用途及注意事项
    对于写Java的博文
    C++ 运算符优先级列表
    android笔记--Intent和IntentFilter详解
    C语言、指针(一)
    switch...case...语句分析(大表跟小表何时产生)
    SourceInsight教程
  • 原文地址:https://www.cnblogs.com/haihang/p/2804884.html
Copyright © 2011-2022 走看看