<%@ page language="java" contentType="text/html;charset=gbk"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>柱状图显示页面</title>
</head>
<body>
<div align="center">
<h3>Color Bar Chart (horizontal)</h3>
<table width="60%">
<c:forEach var="col" items="${weekWeather}">
<tr>
<td align="right" width="20%">${col.item }(${col.percent }%)</td>
<td align="left" width="80%">
<table width="100%" height="20">
<tr>
<td width="${col.percent }%" bgcolor="#003366"></td>
<td width="${100-col.percent }%"></td>
</tr>
</table>
</c:forEach>
</table>
<hr>
<h3>Color BAr Chart (vertical)</h3>
<table width="300" height="500">
<tr>
<c:forEach var="row" items="${weekWeather }">
<td>
<table width="100%" height="100%">
<tr>
<td height="${100-row.percent }%"></td>
</tr>
<tr>
<td height="${row.percent }%" bgcolor="#006633"></td>
</tr>
<tr>
<td align="center">${row.item }(${row.percent }%)</td>
</tr>
</table>
</td>
</c:forEach>
</tr>
</table>
</div>
</body>
</html>
posted on 2007-08-27 10:41
Ke 阅读(958)
评论(0) 编辑 收藏 所属分类:
struts