请教高手!!在线等待! 用vml,svg。下午有人问过了,你查查! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我用applet写过统计图,就是速度稍慢了一点点 看看这个例子吧,应该可以解决你的问题。http://www.cn-java.com/target/news.php?news_id=723 试试调用owc<%@ page contentType="text/html;charset=GBK"%><%@ include file="../Connections/bbgl.jsp" %><%@ include file="../Connections/total.jsp" %><style type="text/css"><!-- A:link {color:"#003399";text-decoration: none;} A:visited {color:"#003399";text-decoration: none;} A:hover {color:"#ff3300";} td {color:"#003399";font-size:12px}--></style><%String ttype="";//声明要画的是曲线图柱图还是饼图if(request.getParameter("ttype")!=null){ttype=request.getParameter("ttype");}else{ ttype="01";}String strdd2=request.getParameter("strdd2");//要提取数据的字段标志String z1=strdd2;strdd2=strdd2.substring(0,strdd2.length()-1);String strdd1=request.getParameter("strdd1"); //客户名称strdd1=TurnCharSetPara(strdd1);String z3=strdd1;String strdd3=request.getParameter("strdd3");//时间strdd3=TurnCharSetPara(strdd3);String z2=strdd3;String a[]=new String[100];String b[]=new String[20];int o=0;int p=0;while(strdd3.indexOf(",")>0){a[o]=strdd3.substring(0,strdd3.indexOf(","));strdd3=strdd3.substring(strdd3.indexOf(",")+1,strdd3.length());o++;}while(strdd1.indexOf(",")>0){b[p]=strdd1.substring(0,strdd1.indexOf(","));strdd1=strdd1.substring(strdd1.indexOf(",")+1,strdd1.length());p++;}String score[][]=new String[o+1][p+1];String title="比较";score[0][0]="__";int column=p+1;String sql1="";if(strdd2.equals("1")){ sql1="select sum(bendi) as G from user_money "; title="本地"+title;}if(strdd2.equals("2")){ sql1="select sum(changhua) as G from user_money ";title="长话"+title;}if(strdd2.equals("3")){sql1="select sum(wangyuan) as G from user_money ";title="网元"+title;}if(strdd2.equals("4")){sql1="select sum(wangjian) as G from user_money ";title="网间"+title;}if(strdd2.equals("5")){sql1="select sum(shuju) as G from user_money ";title="数据费"+title;}if(strdd2.equals("6")){sql1="select sum(xinxi) as G from user_money ";title="信息费"+title;}if(strdd2.equals("7")){sql1="select sum(qita) as G from user_money ";title="其他"+title;}if(strdd2.equals("8")){ sql1="select sum(heji) as G from user_money ";title="合计"+title;}//out.println(sql1);for(int l1=0;l1<p;l1++){score[0][l1+1]=b[l1];for(int l2=0;l2<o;l2++){score[l2+1][0]=a[l2];ResultSet msgRecordset11 = MyConn.executeQuery(sql1+" where rtrim(riqi)='"+a[l2]+"' and rtrim(name)='"+b[l1]+"'");//out.println(sql1+" where rtrim(riqi)='"+a[l2]+"' and rtrim(name)='"+b[l1]+"'");msgRecordset11.next();score[l2+1][l1+1]=msgRecordset11.getString("G");//out.println(score[l1+1][l2+1]);}}int i=0;int j=0;%><html><form name="form1" action="map32.jsp"><div align="center"><object classid="clsid:0002E556-0000-0000-C000-000000000046" id="ChartSpace1"><param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel"><x:ChartSpace><x:OWCVersion>10.0.0.2621 </x:OWCVersion><x:Width>15240</x:Width><x:Height>10160</x:Height><x:Palette><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#000000</x:Entry><x:Entry>#A0E0E0</x:Entry><x:Entry>#802060</x:Entry><x:Entry>#FFFFA0</x:Entry><x:Entry>#8080FF</x:Entry><x:Entry>#600080</x:Entry><x:Entry>#FF8080</x:Entry><x:Entry>#008080</x:Entry><x:Entry>#C0C0FF</x:Entry><x:Entry>#000080</x:Entry><x:Entry>#FF00FF</x:Entry><x:Entry>#80FFFF</x:Entry><x:Entry>#0080FF</x:Entry><x:Entry>#FF8080</x:Entry><x:Entry>#C0FF80</x:Entry><x:Entry>#FFC0FF</x:Entry><x:Entry>#FF80FF</x:Entry></x:Palette><x:DefaultFont>宋体</x:DefaultFont> <x:Chart><x:PlotArea><x:Graph><%if(ttype.equals("02")){ %><x:Type>Line</x:Type><x:SubType>Standard</x:SubType><x:SubType>Marker</x:SubType><%}%><%if(ttype.equals("01")){ %><x:SubType>Clustered</x:SubType><x:Type>Column</x:Type><%}%><%if(ttype.equals("03")){ %> <x:Type>Pie</x:Type><x:SubType>Stacked</x:SubType><%}%> file="../Connections/bbglend.jsp" %> 接上篇<%for(i=1;i<column;i++) {%> <x:Series><x:FormatMap></x:FormatMap><x:Name><%out.print(score[0][i]);%></x:Name><x:Caption><x:DataSourceIndex>-1</x:DataSourceIndex><x:Data>&quot;<%out.print(score[0][i]);%>&quot;</x:Data></x:Caption><x:Index><%out.print(i);%></x:Index><x:Category><x:DataSourceIndex>-1</x:DataSourceIndex><x:Data>{ <%for(j=1;j<score.length;j++)if(j!=score.length-1)out.print("&quot;"+score[j][0]+"&quot;,");elseout.print("&quot;"+score[j][0]+"&quot;");%>}</x:Data></x:Category><x:Value><x:DataSourceIndex>-1</x:DataSourceIndex><x:Data>{ <%for(j=1;j<score.length;j++)if(j!=score.length-1)out.print(score[j][i]+",");elseout.print(score[j][i]);%>}</x:Data></x:Value><%if(ttype.equals("01")||ttype.equals("03")){%><x:Marker><x:Symbol>None</x:Symbol></x:Marker><%}%><x:Explode>0</x:Explode><x:Thickness>10</x:Thickness></x:Series><%}%><%if(ttype.equals("01")||ttype.equals("02")){%><x:Dimension><x:ScaleID>50278424</x:ScaleID><x:Index>Categories</x:Index></x:Dimension><x:Dimension><x:ScaleID>50278628</x:ScaleID><x:Index>Value</x:Index></x:Dimension><x:Overlap><%if(ttype.equals("01")){out.print("0");}if(ttype.equals("02")){out.print("100");} %></x:Overlap><x:GapWidth>150</x:GapWidth><x:FirstSliceAngle>0</x:FirstSliceAngle></x:Graph><x:Axis><x:AxisID>50278832</x:AxisID><x:ScaleID>50278424</x:ScaleID><x:Type>Category</x:Type><x:MajorTick>Outside</x:MajorTick><x:MinorTick>None</x:MinorTick><x:Placement>Bottom</x:Placement><x:GroupingEnum>Auto</x:GroupingEnum></x:Axis><x:Axis><x:AxisID>50279440</x:AxisID><x:ScaleID>50278628</x:ScaleID><x:Type>Value</x:Type><x:MajorGridlines></x:MajorGridlines><x:MajorTick>Outside</x:MajorTick><x:MinorTick>None</x:MinorTick><x:Placement>Left</x:Placement></x:Axis><%}%><%if(ttype.equals("03")){%><x:VaryColors/><x:Dimension><x:ScaleID>113329172</x:ScaleID><x:Index>Value</x:Index></x:Dimension><x:HoleSize>0</x:HoleSize><x:FirstSliceAngle>17</x:FirstSliceAngle></x:Graph><%}%> </x:PlotArea></x:Chart><x:Title><x:Border><x:ColorIndex>None</x:ColorIndex></x:Border><x:Caption><x:DataSourceIndex>-1</x:DataSourceIndex><% out.print("<x:Data>&quot;"+title+"&quot;</x:Data>");%></x:Caption></x:Title><x:Legend><x:Placement>Right</x:Placement></x:Legend><x:Scaling><x:ScaleID>50278424</x:ScaleID></x:Scaling><x:Scaling><x:ScaleID>50278628</x:ScaleID></x:Scaling></x:ChartSpace></xml>"><param name="ScreenUpdating" value="-1"><param name="EnableEvents" value="-1"><table width='100%' cellpadding='0' cellspacing='0' border='0' height='8'> <tr><td bgColor='#336699' height='25' width='10%'> </td><td bgColor='#666666'width='85%'><font face='宋体' color='white' size='4'><b> 缺少 Microsoft Office Web Components</b></font></td></tr><tr><td bgColor='#cccccc' width='15'> </td><td bgColor='#cccccc' width='500px'><br><font face='宋体' size='2'>此网页要求 Microsoft Office Web Components。<p align='center'> <a href='owc10.exe'>单击此处安装 MMicrosoft Office Web Components。</a>.</p></font><p><font face='宋体' size='2'>此网页同时要求 Microsoft Internet Explorer 4.01((SP-1)或更高版本。</p><p align='center'><a href='http://www.microsoft.com/windows/ie/default.htm'> 单击此处安装最新的 Internet Explorer</a>.</font><br> </td></tr></table></object></div> <div align="center"><a href="map32.jsp?ttype=02&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">曲线图</a> <a href="map32.jsp?ttype=03&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">饼图 </a> <a href="map32.jsp?ttype=01&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">柱图 </a></div></form><%@ include 接上篇file="../Connections/bbglend.jsp" %> struts2用标签从session取值问题 jsp问题 新手求助!!!! JPA继承关系,查子类得到的实体里没有父类的最新数据 最后10分了,向大家请教个问题,谢谢了! 如何处理jsp页面中的乱码(表单输入输出) out.println方法可以用在bean class 中吗?我用了后一直报错! JDK安装到一半,安装不下去了.救命啊 请教:关于JSP页面中显示乱面的问题 Calendar 的 set() 下午时间相差十二小时 Tomcat4.1.12下的servlet默认路径是什么? 选中select 列表中的一项能否自动提交 关于showModalDialog方法生成的窗口问题
就是速度稍慢了一点点
http://www.cn-java.com/target/news.php?news_id=723
<%@ page contentType="text/html;charset=GBK"%>
<%@ include file="../Connections/bbgl.jsp" %>
<%@ include file="../Connections/total.jsp" %>
<style type="text/css">
<!--
A:link {color:"#003399";text-decoration: none;}
A:visited {color:"#003399";text-decoration: none;}
A:hover {color:"#ff3300";}
td {color:"#003399";font-size:12px}
-->
</style>
<%
String ttype="";//声明要画的是曲线图柱图还是饼图
if(request.getParameter("ttype")!=null)
{ttype=request.getParameter("ttype");}
else{ ttype="01";}
String strdd2=request.getParameter("strdd2");//要提取数据的字段标志
String z1=strdd2;
strdd2=strdd2.substring(0,strdd2.length()-1);String strdd1=request.getParameter("strdd1"); //客户名称
strdd1=TurnCharSetPara(strdd1);
String z3=strdd1;String strdd3=request.getParameter("strdd3");//时间
strdd3=TurnCharSetPara(strdd3);
String z2=strdd3;String a[]=new String[100];
String b[]=new String[20];
int o=0;
int p=0;while(strdd3.indexOf(",")>0)
{
a[o]=strdd3.substring(0,strdd3.indexOf(","));
strdd3=strdd3.substring(strdd3.indexOf(",")+1,strdd3.length());
o++;
}while(strdd1.indexOf(",")>0)
{
b[p]=strdd1.substring(0,strdd1.indexOf(","));
strdd1=strdd1.substring(strdd1.indexOf(",")+1,strdd1.length());
p++;
}
String score[][]=new String[o+1][p+1];
String title="比较";
score[0][0]="__";
int column=p+1;
String sql1="";
if(strdd2.equals("1")){ sql1="select sum(bendi) as G from user_money "; title="本地"+title;}
if(strdd2.equals("2")){ sql1="select sum(changhua) as G from user_money ";title="长话"+title;}
if(strdd2.equals("3")){sql1="select sum(wangyuan) as G from user_money ";title="网元"+title;}
if(strdd2.equals("4")){sql1="select sum(wangjian) as G from user_money ";title="网间"+title;}
if(strdd2.equals("5")){sql1="select sum(shuju) as G from user_money ";title="数据费"+title;}
if(strdd2.equals("6")){sql1="select sum(xinxi) as G from user_money ";title="信息费"+title;}
if(strdd2.equals("7")){sql1="select sum(qita) as G from user_money ";title="其他"+title;}
if(strdd2.equals("8")){ sql1="select sum(heji) as G from user_money ";title="合计"+title;}
//out.println(sql1);
for(int l1=0;l1<p;l1++)
{score[0][l1+1]=b[l1];for(int l2=0;l2<o;l2++)
{score[l2+1][0]=a[l2];
ResultSet msgRecordset11 = MyConn.executeQuery(sql1+" where rtrim(riqi)='"+a[l2]+"' and rtrim(name)='"+b[l1]+"'");
//out.println(sql1+" where rtrim(riqi)='"+a[l2]+"' and rtrim(name)='"+b[l1]+"'");
msgRecordset11.next();
score[l2+1][l1+1]=msgRecordset11.getString("G");
//out.println(score[l1+1][l2+1]);
}}
int i=0;
int j=0;
%>
<html>
<form name="form1" action="map32.jsp">
<div align="center">
<object classid="clsid:0002E556-0000-0000-C000-000000000046" id="ChartSpace1">
<param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
<x:ChartSpace>
<x:OWCVersion>10.0.0.2621 </x:OWCVersion>
<x:Width>15240</x:Width>
<x:Height>10160</x:Height>
<x:Palette>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#000000</x:Entry>
<x:Entry>#A0E0E0</x:Entry>
<x:Entry>#802060</x:Entry>
<x:Entry>#FFFFA0</x:Entry>
<x:Entry>#8080FF</x:Entry>
<x:Entry>#600080</x:Entry>
<x:Entry>#FF8080</x:Entry>
<x:Entry>#008080</x:Entry>
<x:Entry>#C0C0FF</x:Entry>
<x:Entry>#000080</x:Entry>
<x:Entry>#FF00FF</x:Entry>
<x:Entry>#80FFFF</x:Entry>
<x:Entry>#0080FF</x:Entry>
<x:Entry>#FF8080</x:Entry>
<x:Entry>#C0FF80</x:Entry>
<x:Entry>#FFC0FF</x:Entry>
<x:Entry>#FF80FF</x:Entry>
</x:Palette>
<x:DefaultFont>宋体</x:DefaultFont>
<x:Chart>
<x:PlotArea>
<x:Graph>
<%
if(ttype.equals("02")){ %>
<x:Type>Line</x:Type>
<x:SubType>Standard</x:SubType>
<x:SubType>Marker</x:SubType>
<%}%>
<%
if(ttype.equals("01")){ %>
<x:SubType>Clustered</x:SubType>
<x:Type>Column</x:Type>
<%}%>
<%
if(ttype.equals("03")){ %>
<x:Type>Pie</x:Type>
<x:SubType>Stacked</x:SubType>
<%}%> file="../Connections/bbglend.jsp" %>
<%
for(i=1;i<column;i++)
{
%>
<x:Series>
<x:FormatMap>
</x:FormatMap>
<x:Name>
<%
out.print(score[0][i]);%></x:Name>
<x:Caption>
<x:DataSourceIndex>-1</x:DataSourceIndex>
<x:Data>&quot;
<%
out.print(score[0][i]);%>&quot;</x:Data>
</x:Caption>
<x:Index>
<%
out.print(i);%></x:Index>
<x:Category>
<x:DataSourceIndex>-1</x:DataSourceIndex>
<x:Data>
{ <%
for(j=1;j<score.length;j++)
if(j!=score.length-1)
out.print("&quot;"+score[j][0]+"&quot;,");
else
out.print("&quot;"+score[j][0]+"&quot;");
%>}</x:Data>
</x:Category>
<x:Value>
<x:DataSourceIndex>-1</x:DataSourceIndex>
<x:Data>
{ <%
for(j=1;j<score.length;j++)
if(j!=score.length-1)
out.print(score[j][i]+",");
else
out.print(score[j][i]);
%>}</x:Data>
</x:Value>
<%
if(ttype.equals("01")||ttype.equals("03")){%>
<x:Marker>
<x:Symbol>None</x:Symbol>
</x:Marker>
<%}%>
<x:Explode>0</x:Explode>
<x:Thickness>10</x:Thickness>
</x:Series>
<%
}
%>
<%
if(ttype.equals("01")||ttype.equals("02"))
{%>
<x:Dimension>
<x:ScaleID>50278424</x:ScaleID>
<x:Index>Categories</x:Index>
</x:Dimension>
<x:Dimension>
<x:ScaleID>50278628</x:ScaleID>
<x:Index>Value</x:Index>
</x:Dimension>
<x:Overlap>
<%
if(ttype.equals("01"))
{out.print("0");}
if(ttype.equals("02"))
{out.print("100");}
%></x:Overlap>
<x:GapWidth>150</x:GapWidth>
<x:FirstSliceAngle>0</x:FirstSliceAngle>
</x:Graph>
<x:Axis>
<x:AxisID>50278832</x:AxisID>
<x:ScaleID>50278424</x:ScaleID>
<x:Type>Category</x:Type>
<x:MajorTick>Outside</x:MajorTick>
<x:MinorTick>None</x:MinorTick>
<x:Placement>Bottom</x:Placement>
<x:GroupingEnum>Auto</x:GroupingEnum>
</x:Axis>
<x:Axis>
<x:AxisID>50279440</x:AxisID>
<x:ScaleID>50278628</x:ScaleID>
<x:Type>Value</x:Type>
<x:MajorGridlines>
</x:MajorGridlines>
<x:MajorTick>Outside</x:MajorTick>
<x:MinorTick>None</x:MinorTick>
<x:Placement>Left</x:Placement>
</x:Axis>
<%}%>
<%
if(ttype.equals("03")){%>
<x:VaryColors/>
<x:Dimension>
<x:ScaleID>113329172</x:ScaleID>
<x:Index>Value</x:Index>
</x:Dimension>
<x:HoleSize>0</x:HoleSize>
<x:FirstSliceAngle>17</x:FirstSliceAngle>
</x:Graph>
<%}%>
</x:PlotArea>
</x:Chart>
<x:Title>
<x:Border>
<x:ColorIndex>None</x:ColorIndex>
</x:Border>
<x:Caption>
<x:DataSourceIndex>-1</x:DataSourceIndex>
<%
out.print("<x:Data>&quot;"+title+"&quot;</x:Data>");%>
</x:Caption>
</x:Title>
<x:Legend>
<x:Placement>Right</x:Placement>
</x:Legend>
<x:Scaling>
<x:ScaleID>50278424</x:ScaleID>
</x:Scaling>
<x:Scaling>
<x:ScaleID>50278628</x:ScaleID>
</x:Scaling>
</x:ChartSpace>
</xml>">
<param name="ScreenUpdating" value="-1">
<param name="EnableEvents" value="-1">
<table width='100%' cellpadding='0' cellspacing='0' border='0' height='8'>
<tr>
<td bgColor='#336699' height='25' width='10%'> </td>
<td bgColor='#666666'width='85%'><font face='宋体' color='white' size='4'><b>
缺少 Microsoft Office Web Components</b></font></td>
</tr>
<tr>
<td bgColor='#cccccc' width='15'> </td>
<td bgColor='#cccccc' width='500px'><br>
<font face='宋体' size='2'>此网页要求 Microsoft Office Web Components。
<p align='center'> <a href='owc10.exe'>单击此处安装 MMicrosoft
Office Web Components。</a>.</p>
</font>
<p><font face='宋体' size='2'>此网页同时要求 Microsoft Internet Explorer 4.01((SP-1)或更高版本。</p>
<p align='center'><a href='http://www.microsoft.com/windows/ie/default.htm'>
单击此处安装最新的 Internet Explorer</a>.</font><br>
</td>
</tr>
</table>
</object>
</div>
<div align="center"><a href="map32.jsp?ttype=02&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">曲线图</a> <a href="map32.jsp?ttype=03&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">饼图 </a> <a href="map32.jsp?ttype=01&strdd3=<%=z2%>&strdd1=<%=z3%>&strdd2=<%=z1%>">柱图 </a></div>
</form>
<%@ include
file="../Connections/bbglend.jsp" %>