最终预览图:
[img]http://dl.iteye.com/upload/attachment/0067/2259/bcbf0956-8a6e-3ac8-90b6-638dfbc93168.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0067/2259/bcbf0956-8a6e-3ac8-90b6-638dfbc93168.jpg[/img]
private HashMap<String, String> ht3TypeTotal;
ht3TypeTotal = Thread3TypeTotal.ht3TypeTotal;
<%@ page
language="java"
import="java.util.*"
pageEncoding="UTF-8"
%>
<%@ taglib
uri="http://java.sun.com/jsp/jstl/fmt"
prefix="fmt"
%>
<%@ taglib
uri="http://java.sun.com/jsp/jstl/core"
prefix="c"
%>
<div class="cl"></div>
<div class="ht_20"></div>
<div class="demo4_t"></div>
<div class="demo4_c">
<div class="progresslt fl">
<fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${(ht3TypeTotal['twitterP']+ht3TypeTotal['protalP']+ht3TypeTotal['bbsP'])/(ht3TypeTotal['twitterP']+ht3TypeTotal['protalP']+ht3TypeTotal['bbsP']+ht3TypeTotal['twitterN']+ht3TypeTotal['protalN']+ht3TypeTotal['bbsN'])}"
/>
</div>
<div class="progressrt fl">
<ul>
<li class="progressrtlt">
微博
</li>
<li class="progressrtrt">
<c:choose>
<c:when
test="${ht3TypeTotal['twitterP'] + ht3TypeTotal['twitterN'] <= 0}"
>
<span
style="width: 100%;"
class="bar3 fr"
></span>
</c:when>
<c:otherwise>
<span
style="width: ${ht3TypeTotal['twitterP']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN'])*100}%;"
class="bar1lt fl"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['twitterP']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN']) >= 0.5 ? ht3TypeTotal['twitterP']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN']) : ''}"
/> </span>
<span
style="width: ${ht3TypeTotal['twitterN']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN'])*100}%;"
class="bar2 fr"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['twitterN']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN']) >= 0.5 ? ht3TypeTotal['twitterN']/(ht3TypeTotal['twitterP']+ht3TypeTotal['twitterN']) : ''}"
/> </span>
</c:otherwise>
</c:choose>
</li>
<li class="progressrtlt">
门户
</li>
<li class="progressrtrt">
<c:choose>
<c:when
test="${ht3TypeTotal['protalP'] + ht3TypeTotal['protalN'] <= 0}"
>
<span
style="width: 100%;"
class="bar3 fr"
></span>
</c:when>
<c:otherwise>
<span
style="width: ${ht3TypeTotal['protalP']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN'])*100}%;"
class="bar1lt fl"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['protalP']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN']) >= 0.5 ? ht3TypeTotal['protalP']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN']) : ''}"
/> </span>
<span
style="width: ${ht3TypeTotal['protalN']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN'])*100}%;"
class="bar2 fr"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['protalN']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN']) >= 0.5 ? ht3TypeTotal['protalN']/(ht3TypeTotal['protalP']+ht3TypeTotal['protalN']) : ''}"
/> </span>
</c:otherwise>
</c:choose>
</li>
<li class="progressrtlt">
BBS
</li>
<li class="progressrtrt">
<c:choose>
<c:when test="${ht3TypeTotal['bbsP'] + ht3TypeTotal['bbsN'] <= 0}">
<span
style="width: 100%;"
class="bar3 fr"
></span>
</c:when>
<c:otherwise>
<span
style="width: ${ht3TypeTotal['bbsP']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN'])*100}%;"
class="bar1lt fl"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['bbsP']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN']) >= 0.5 ? ht3TypeTotal['bbsP']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN']) : ''}"
/> </span>
<span
style="width: ${ht3TypeTotal['bbsN']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN'])*100}%;"
class="bar2 fr"
><fmt:formatNumber
type="percent"
maxIntegerDigits="3"
value="${ht3TypeTotal['bbsN']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN']) >= 0.5 ? ht3TypeTotal['bbsN']/(ht3TypeTotal['bbsP']+ht3TypeTotal['bbsN']) : ''}"
/> </span>
</c:otherwise>
</c:choose>
</li>
</ul>
</div>
<div class="cl"></div>
</div>
<div class="demo4_b"></div>
<div class="ht_20"></div>