<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>


<s:if test="reportData!=null">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line" style="margin:15px 0;">
        <tr>
            <td id="chartBody" style="text-align:center;">
                <s:if test="reportData!=null && ( (!reportData.multi && reportData.singleDataList.size()>0) 
                                ||  (reportData.multi && reportData.multiData.datasetList.sieze()>0) ) "> 
                    loading...
                </s:if>
                <s:else>
                    <div style="padding:20px;">
                        对不起！没有找到您要统计的数据。
                    </div>
                </s:else>
            </td>
        </tr>
    </table>
</s:if>


    <s:if test="reportData!=null && reportData.multi && reportData.multiData.datasetList.size()>0">  
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_line" style="margin:10px 0;">
              <tr class="list_title">
                <td width="20%">${param.kindName}</td>
                <s:iterator value="reportData.multiData.datasetList">
                <td><s:property value="name"/></td>
                </s:iterator>
              </tr>
              
              <s:iterator value="reportData.multiData.categories" status="st">
				  <s:set name="row_cls" value=""/><s:if test="#st.Even"><s:set name="row_cls" value="%{'row_a'}"/></s:if>
				  <tr class="list_data <s:property value='#row_cls'/> center">
						<td><s:property/></td>
						<s:iterator value="reportData.multiData.datasetList">
						<td><s:property value='values[#st.index]'/> <s:property value='reportData.unit'/></td>
						</s:iterator>
				  </tr>
              </s:iterator>
			  
			  <s:if test="reportData.total">
			  <tr class="list_title">
                <td width="20%">合 计</td>
                <s:iterator value="reportData.multiData.dataTotal"> 
                <td><s:property/> <s:property value='reportData.unit'/></td>
                </s:iterator>
              </tr>
			  </s:if>
        </table>        
    	<div id="chartData" style="display:none;"> 
            <graph baseFontSize="14" hovercapbg='DEDEBE' hovercapborder='889E6D' 
                    rotateNames='0' divLineColor='CCCCCC' divLineAlpha='80' 
                    numberSuffix="<s:property value='reportData.unit'/>"
                    decimalPrecision="<s:property value='reportData.decimalPrecision'/>" 
                    showAlternateHGridColor='1' AlternateHGridAlpha='30' AlternateHGridColor='CCCCCC' 
                    yAxisMaxValue="<s:property value='reportData.maxNum'/>"          
                    numdivlines="<s:property value='reportData.lineNum'/>"  
                    caption="${param.caption}" 
                    subcaption="${param.subcaption}" >
               <categories fontSize='13' fontColor='000000'>
                  <s:iterator value="reportData.multiData.categories">
                    <category name="<s:property/>"/>
                  </s:iterator>
               </categories>
               <s:iterator value="reportData.multiData.datasetList">
                   <dataset seriesname="<s:property value='name'/>" color="<s:property value='color'/>">
                      <s:iterator value="values">
                        <set value="<s:property/>" />
                      </s:iterator>
                   </dataset>
               </s:iterator>
            </graph>        
    	</div>
    </s:if>
    
    <s:if test="reportData!=null  && (!reportData.multi) && reportData.singleDataList.size()>0"> 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_line" style="margin:10px 0;">
              <tr class="list_title">
                <td width="50%">${param.kindName}</td>
                <td width="50%">${param.valueName}</td>
              </tr>
              <s:iterator value="reportData.singleDataList" status="st">
              <s:set name="row_cls" value=""/><s:if test="#st.Even"><s:set name="row_cls" value="%{'row_a'}"/></s:if>
                  <tr class="list_data <s:property value='#row_cls'/> center">
                    <td><s:property value='name'/></td>
                    <td><s:property value='value'/> <s:property value='reportData.unit'/></td>
                  </tr>
              </s:iterator>
			  
			  <s:if test="reportData.total">
			  <tr class="list_title">
                <td width="50%">合 计</td>
                <td width="50%">${reportData.singleDataTotal} <s:property value='reportData.unit'/></td>
              </tr>
			  </s:if>
        </table>
    	<div id="chartData" style="display:none;">
            <graph showNames="1" baseFontSize="14" pieSliceDepth="20" 
                numberSuffix="<s:property value='reportData.unit'/>"
                decimalPrecision="<s:property value='reportData.decimalPrecision'/>" 
                yAxisMaxValue="<s:property value='reportData.maxNum'/>"          
                numdivlines="<s:property value='reportData.lineNum'/>"            
                caption="${param.caption}" 
                subcaption="${param.subcaption}" >
                <s:iterator value="reportData.singleDataList">
                    <set name="<s:property value='name'/>" value="<s:property value='value'/>" 
                    	color="<s:property value='color'/>" />
                </s:iterator>
            </graph> 
    	</div>
	</s:if>