• corethink功能模块探索开发(十八)前台页面插入jit前端数据可视化库


    效果图:

    1.静态文件放入View目录中

    在View目录下新建Public目录,在Public目录下新建js、css目录。

    把jit的资源放入对应目录中

    2.在html中引入jit

    Application/Equip/View/Index/index.html

    <extend name="$_home_public_layout"/>
    <block name="style">
        <!-- CSS Files -->
        <link type="text/css" href="Application/Equip/View/Public/css/base.css" rel="stylesheet" />
        <link type="text/css" href="Application/Equip/View/Public/css/Treemap.css" rel="stylesheet" />
    </block>
    
    
    <block name="script">
    
    
        <!--[if IE]><script language="javascript" type="text/javascript" src="bzunc/Application/Equip/View//Public/js/excanvas.js"></script><![endif]-->
    
        <!-- JIT Library File -->
        <script language="javascript" type="text/javascript" src="/bzunc/Application/Equip/View/Public/js/jit.js"></script>
    
        <!-- Example File -->
        <script language="javascript" type="text/javascript" src="/bzunc/Application/Equip/View/Public/js/example1.js"></script>
        <script language="javascript" type="text/javascript">
           $(window).load(function(){
               init();
           });
        </script>
    </block>
    
    <block name="main">
    
        <div id="container">
    
            <div id="left-container">
    
                <div class="text">
                    <h4>
                        Animated Squarified, SliceAndDice and Strip TreeMaps
                    </h4>
    
                    In this example a static JSON tree is loaded into a Squarified Treemap.<br /><br />
                    <b>Left click</b> to set a node as root for the visualization.<br /><br />
                    <b>Right click</b> to set the parent node as root for the visualization.<br /><br />
                    You can <b>choose a different tiling algorithm</b> below:
    
    
                </div>
    
                <div id="id-list">
                    <table>
                        <tr>
                            <td>
                                <label for="r-sq">Squarified </label>
                            </td>
                            <td>
                                <input type="radio" id="r-sq" name="layout" checked="checked" value="left" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="r-st">Strip </label>
                            </td>
                            <td>
                                <input type="radio" id="r-st" name="layout" value="top" />
                            </td>
                        <tr>
                            <td>
                                <label for="r-sd">SliceAndDice </label>
                            </td>
                            <td>
                                <input type="radio" id="r-sd" name="layout" value="bottom" />
                            </td>
                        </tr>
                    </table>
                </div>
    
                <a id="back" href="#" class="theme button white">Go to Parent</a>
    
    
                <div style="text-align:center;"><a href="example1.js">See the Example Code</a></div>
            </div>
    
            <div id="center-container">
                <div id="infovis"></div>
            </div>
    
            <div id="right-container">
    
                <div id="inner-details"></div>
    
            </div>
    
            <div id="log"></div>
        </div>
    </block>
    

      完成了。
    此处静态文件的路径填写并没有处理的很好。

  • 相关阅读:
    打开项目遇到Unknown Android Packaging Problem问题
    C# 水波效果
    Adding controls to ToolStrip in C#
    C# 水波效果
    【转】U盘启动奶瓶破解无线WPA加密
    如何破解ROS路由器禁用路由PPPOE拨号?
    打开项目遇到Unknown Android Packaging Problem问题
    各版本.NET委托的写法回顾
    Oracle起动库时1102报错处置
    Windows环境中Kill失落Oracle线程
  • 原文地址:https://www.cnblogs.com/mracale/p/8086247.html
Copyright © 2020-2023  润新知