Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jfreechartʹÓÃÐĵÃÓëÀý×Ó(jsp)

jsp JFreeChartʹÓÃÐĵÃÓëÀý×Ó
2009-07-01 10:27
Ò»¡¢JFreeChartµÄ½éÉÜÓë»ñÈ¡ JFreeChart¿ª·¢°üÊÇÒ»¸ö¿ªÔ´µÄJavaͼÐοª·¢°ü,Ëü´ÓÖùÐÎͼ£¬±ýÐÎͼ£¬µ½À×´ïͼ£¬À¯ÖòͼµÈµÈÎÞËù²»°ü,¿ÉÒÔÔÚc/s,b/s,ÉõÖÁÊÇʵʱ»·¾³¶¼ÄÜÒ»ÏÔÉíÊÖ¡£
µ±Ç°µÄJFreeChartµÄ×îа汾Ϊjfreechart-1.0.11.zip¡£¿ÉÒÔµ½http://www.jfree.org/jfreechart/index.htmlÕÒµ½
¶þ¡¢JFreeChartµÄ»ù±¾Ê¹ÓÃ
²»ÂÛ´´½¨µÄÊÇʲôͼ£¬JFreeChart¶¼×ñÑ­ÒÔϵÄÕâ¸öʹÓò½Ö裺
1¡¢½¨Á¢Dataset¡£ËùÓеÄÊý¾Ý¶¼´æ·ÅÔÚDatasetÖеġ£(´´½¨Ò»¸öÊý¾ÝÔ´£¨dataset£©À´°üº¬½«ÒªÔÚͼÐÎÖÐÏÔʾµÄÊý¾Ý)
2¡¢½¨Á¢JFreeChart¡£½«datasetÖеÄÊý¾Ýµ¼Èëµ½JFreeChartÖС£(´´½¨Ò»¸ö JFreeChart ¶ÔÏóÀ´´ú±íÒªÏÔʾµÄͼÐÎ )
3¡¢ÉèÖÃJFreeChartµÄÏÔʾÊôÐÔ¡£ÕâÒ»²½¿ÉÒÔÊ¡ÂÔ£¬Ê¹ÓÃĬÈϵÄJFreeChartÏÔʾÊôÐÔ¡£
3¡¢äÖȾͼ±í¡£¼´Éú³ÉͼƬ¡£
4¡¢Ò³ÃæͼƬÏÔʾ¡£
ÖØÒªµÄÀàºÍ½Ó¿Ú£º
org.jfree.data.general.Dataset ËùÓÐÊý¾ÝÔ´À඼ҪʵÏֵĽӿÚ
org.jfree.chart.ChartFactory ÓÉËüÀ´²úÉú JFreeChart ¶ÔÏó
org.jfree.chart.JFreeChart ËùÓжÔͼÐεĵ÷Õû¶¼ÊÇͨ¹ýËüàÞ£¡£¡
org.jfree.chart.plot.Plot ͨ¹ýJFreeChart ¶ÔÏó»ñµÃËü£¬È»ºóÔÙͨ¹ýËü¶ÔͼÐÎÍⲿ²¿·Ö£¨Àý£º×ø±êÖᣩµ÷Õû
×¢Ò⣺ËüÓкܶà×ÓÀ࣬һ°ã¶¼ÏÂÉæ¼°µ½ËüµÄ×ÓÀ࣡
org.jfree.chart.renderer.AbstractRenderer ͨ¹ýJFreeChart ¶ÔÏó»ñµÃËü£¬È»ºóÔÙͨ¹ýËü¶ÔͼÐÎÄÚ²¿²¿·Ö(Àý£ºÕÛÏßµÄÀàÐÍ£©µ÷Õû¡£Í¬Ñù£¬Õë¶Ô²»Í¬ÀàÐ͵ı¨±íͼ£¬ËüÓÐ×Ų»Í¬µÄ×ÓÀàʵÏÖ£¡ÔÚÏÂÃæÎÒÃǼò³ÆËüΪ Renderer
Èý¡¢JFreeChartʹÓõľßÌåÀý×Ó
ÔÚwebÓ¦ÓÃÖеÄÀý×Ó
package com.lzk.bean;
import java.awt.Color;
import java.awt.Font;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpSession;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.entity.StandardEntityCollection;
import org.jfree.chart.labels.StandardXYToolTipGenerator;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.


Ïà¹ØÎĵµ£º

Jsp±à³Ì

 JAVA×ÛºÏÃæÊÔÌ⣺ҳÃæµÄץȡ¡¢½âÎö¡¢±£´æÊý¾Ý¿âºÍÉú³ÉHTMLµÄÒ³Ãæչʾ ÊÕ²Ø
´ÎÀý×Ó¿ÉÒÔÓÃÀ´Ñ§Ï°ÍøÂç±à³Ì£¬ÕýÔò±í´ïʽµÄʹÓ㬷ºÐÍ£¬Êý¾Ý¿âµÄ»ù±¾²Ù×÷µÈJAVA֪ʶ
ÎÊÌâÈçÏ£ºÀ´Ô´ÓÚÂÛ̳
http://topic.csdn.net/u/20090616/13/59aa4e2d-3752-45df-9c1b-c65c46c3e4d7.html
дһ¸öjspÒ³Ã棬·ÃÎÊʱÏÔʾ´ÓÏÂÃæµÄÒ³ÃæÌ ......

SSH ÏîÄ¿ÖУ¬action»ñÈ¡jspÒ³Ãæ´«¹ýÀ´µÄselectÖµ

ÏîÄ¿¿ò¼ÜS2SH,jspÒ³ÃæÈçÏ£¬selectÁбíÉèΪmultiple¡£ÎªÁËÄÜÔÚactionÀïÈ¡µ½Ç°Ì¨½çÃæselectÁбíµÄ¶àÑ¡Öµ£¬Ï¹¸ãÁËÁ½Ì죬½ñÌìÖÕÓڳɹ¦¡£Æäʵºǫ́actionȡǰ̨jspÒ³ÃæµÄÖµºÜ¼òµ¥£¬·Ï»°²»¶à˵£¬ÏÈÌù´úÂ룺
<body>
<form action="sendMsg.action?senderId=${users.id }&username=${users.username}" m ......

Jsp»ù±¾Óï·¨

ÍøÂçÈí¼þ¿ª·¢ÖÐ×î³£ÓõÄÁ½ÖÖ¼ÆËãģʽ£¬Ò²¾ÍÊÇÍøÂç³ÌÐòģʽ£º
B/SÊÇ ä¯ÀÀÆ÷/·þÎñÆ÷ ģʽ£¬Ö»ÒªÔÚ·þÎñÆ÷×°ºÃºó£¬ÆäËûÈËÖ»ÐèÒªÓÃä¯ÀÀÆ÷£¨±ÈÈçIE£©¾Í¿ÉÒÔÕý³£ä¯ÀÀ£»ÈçÍøÒ³ÓÎÏ·£¬¿ªÐÄÍøµÈ¡£
C/SÊÇ ¿Í»§¶Ë/·þÎñ¶Ë ģʽ£¬·þÎñÆ÷×°ºÃºó£¬ÆäËûÈË»¹ÐèÒªÔÚ¿Í»§¶ËµÄµçÄÔÉÏ°²×°×¨ÓõĿͻ§¶ËÈí¼þ²ÅÄÜÕý³£ä¯ÀÀ²Ù×÷£¬ÈçQQ£¬Ä§ÊÞÊÀ½çµÈ¡£ ......

jspÀ¹½ØÆ÷

ActionContext.getContext().getSession().put("login", "1");
<%
    String flag=(String)session.getAttribute("login");
    if(flag==null)
     response.sendRedirect("login.jsp");
     %> ......

LinuxÏÂÅäÖÃJSP¿ª·¢»·¾³µÄ·½·¨

¡¡¡¡ÏµÍ³»·¾³£ºLinux 5.0 AS 64λ
¡¡¡¡²½Ö裺
¡¡¡¡1¡¢ÏÂÔØapache-tomcat-5.5.23.tarºÍjdk-1_5_0_12-linux-i586.bin²¢´æ·ÅÔÚ/usr/localÎļþ¼ÐÏ£»
¡¡¡¡2¡¢°²×°jdk
¡¡¡¡[root@localhost local]#chmod 775 jdk-1_5_0_12-linux-i586.bin '·Ç±ØÐ룬ҪÊÇÖ±½ÓÔËÐÐʱÌáʾȨÏÞ²»¹»Ê±¸Ä±äȨÏÞ£»
¡¡¡¡[root@localhost local]#./jd ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ