引用的jar包jfreechart-1.0.9.jar和jcommon-1.0.12.jar
我的JSP页面,现在的图标很难看,帮我修饰一下。我找了很多文档,但还是弄不好。谢谢了
<%@ page language="java" pageEncoding="GBK" contentType="text/html;charset=GBK"%>
<%@ page import="org.jfree.data.general.DefaultPieDataset,org.jfree.chart.ChartFactory
,org.jfree.chart.JFreeChart,org.jfree.chart.servlet.*,java.util.*,org.jfree.chart.plot.*,org.jfree.chart.demo.*
,org.jfree.chart.axis.NumberAxis,org.jfree.chart.labels.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'duiTouChart.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body> <%
System.out.println("11111111:"+request.getAttribute("saleCount"));
DefaultPieDataset dpd = new DefaultPieDataset();
int saleCount=Integer.parseInt(""+request.getAttribute("saleCount"));
int nosaleCount=Integer.parseInt(""+request.getAttribute("noSaleCount"));
dpd.setValue("使用堆头", saleCount);
dpd.setValue("空闲堆头", nosaleCount);
JFreeChart chart = ChartFactory.createPieChart("负责区域推头使用情况",dpd, true, false, false);
PiePlot pie = (PiePlot)chart.getPlot();
String fileName = ServletUtilities.saveChartAsPNG(chart,300,200,session);
pie.setBackgroundAlpha(0.2f);
pie.setForegroundAlpha(0.40f);
String url = request.getContextPath() + "/servlet/DisplayChart?filename=" + fileName; %>
<img src="<%= url %>" width="300" height="200">
</body>
</html>
我的JSP页面,现在的图标很难看,帮我修饰一下。我找了很多文档,但还是弄不好。谢谢了
<%@ page language="java" pageEncoding="GBK" contentType="text/html;charset=GBK"%>
<%@ page import="org.jfree.data.general.DefaultPieDataset,org.jfree.chart.ChartFactory
,org.jfree.chart.JFreeChart,org.jfree.chart.servlet.*,java.util.*,org.jfree.chart.plot.*,org.jfree.chart.demo.*
,org.jfree.chart.axis.NumberAxis,org.jfree.chart.labels.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'duiTouChart.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body> <%
System.out.println("11111111:"+request.getAttribute("saleCount"));
DefaultPieDataset dpd = new DefaultPieDataset();
int saleCount=Integer.parseInt(""+request.getAttribute("saleCount"));
int nosaleCount=Integer.parseInt(""+request.getAttribute("noSaleCount"));
dpd.setValue("使用堆头", saleCount);
dpd.setValue("空闲堆头", nosaleCount);
JFreeChart chart = ChartFactory.createPieChart("负责区域推头使用情况",dpd, true, false, false);
PiePlot pie = (PiePlot)chart.getPlot();
String fileName = ServletUtilities.saveChartAsPNG(chart,300,200,session);
pie.setBackgroundAlpha(0.2f);
pie.setForegroundAlpha(0.40f);
String url = request.getContextPath() + "/servlet/DisplayChart?filename=" + fileName; %>
<img src="<%= url %>" width="300" height="200">
</body>
</html>
楼主【shenghy36】截止到2008-07-29 11:50:29的历史汇总数据(不包括此帖):
发帖的总数量:13 发帖的总分数:190 每贴平均分数:14
回帖的总数量:11 得分贴总数量:3 回帖的得分率:27%
结贴的总数量:12 结贴的总分数:170
无满意结贴数:2 无满意结贴分:2
未结的帖子数:1 未结的总分数:20
结贴的百分比:92.31 % 结分的百分比:89.47 %
无满意结贴率:16.67 % 无满意结分率:1.18 %
值得尊敬