在一个页面显示多个iChart报表_html/css_WEB-ITnose

php中文网
发布: 2016-06-24 11:59:51
原创
1580人浏览过

<%@ page language="java" pageEncoding="UTF-8"         contentType="text/html;charset=utf-8" isELIgnored="false"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%><html>    <head>        <title>Project Report</title>        <c:set var="baseUrl" value="${pageContext.request.contextPath}"/>        <%--<link rel="stylesheet" href="../resources/css/bootstrap.min.css"/>        <link rel="stylesheet" href="../resources/css/bootstrap-theme.min.css"/>--%>        <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->        <script type="text/javascript" src="../resources/js/jquery/jquery-1.9.0.js"></script>        <script type="text/javascript" src="../resources/js/ichart.1.2.min.js"></script>        <script type="text/javascript" src="../resources/js/randomcolor.js"></script>        <script type="text/javascript">            $(function(){                var defaultId = "${defaultSelected}";                $("select option").each(function(){                    if($(this).val()==defaultId){                        $(this).attr("selected","selected");                    }                });                //alert(defaultId);                <c:forEach var="bntm" items="${buildNameTaskMap}">                    <c:forEach var="bntmv" items="${bntm.value}">                        var data = [                            {                                value:[${bntmv.value[0]}],                                color:'#47AAB3'                            },                            {                                value:[${bntmv.value[1]}],                                color:'#ECAD55'                            }                        ];                        var chart = new iChart.BarStacked2D({                            render : 'canvasDiv${bntm.key}${bntmv.key}',                            data: data,                            width : 400,                            height : 45,                            bar_height:25,                            shadow_blur : 2,                            shadow_offsetx : 1,                            shadow_offsety : 0,                            border:0,                            showpercent:true,                            decimalsnum:0,                            coordinate:{                                scale:[{                                    position:'bottom',                                    scale_enable : false,                                    start_scale:0,                                    end_scale:${bntmv.value[2]},                                    listeners:{                                        parseText:function(t,x,y){                                            return {text:+t}                                        }                                    }                                }],                                width:600,                                height:40                            }                        });                        chart.draw();                    </c:forEach>                </c:forEach>            });        </script>    </head>    <body>        <div class="ui-page-head">            <h2>                Build Report                   <a href="${baseUrl}/report/showReport.shtml"><img  src="../resources/images/goback.png" alt="在一个页面显示多个iChart报表_html/css_WEB-ITnose" ></a>            </h2>        </div>        <form action="${baseUrl}/report/buildReport.shtml">            <span>Select a project:</span>            <select name="selectedProId">                <c:forEach items="${projectNameId}" var="pni">                    <option value="${pni.value}">${pni.key}</option>                </c:forEach>            </select>            <button type="submit" id="submit">search</button>        </form><br/>        <c:if test="${null ne buildNameTaskMap}">            <table class="ui-table">                <tr>                    <th>Build Name</th>                    <th>Task Name</th>                    <th>Success Times</th>                    <th>Failure Times</th>                    <th>Total Times</th>                    <th>Output Report</th>                </tr>                <c:forEach var="bntm" items="${buildNameTaskMap}">                    <%--Build Name--%>                    <tr>                        <td rowspan="${bntm.value.size()+1}">                                ${bntm.key}                        </td>                    </tr>                    <c:forEach var="bntmv" items="${bntm.value}">                        <tr>                            <%--Task Name--%>                            <td>${bntmv.key}</td>                            <td>${bntmv.value[0]}</td>                            <td>${bntmv.value[1]}</td>                            <td>${bntmv.value[2]}</td>                            <td><div id="canvasDiv${bntm.key}${bntmv.key}"></div></td>                            <%--用一个for循环将所有的id都包括,在JS中传参。--%>                        </tr>                    </c:forEach>                </c:forEach>            </table>        </c:if>        <c:if test="${null eq buildNameTaskMap}">            No Output.        </c:if>    </body></html>
登录后复制


 

AI帮个忙
AI帮个忙

多功能AI小工具,帮你快速生成周报、日报、邮、简历等

AI帮个忙 55
查看详情 AI帮个忙
HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号