锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品嫩草影院久久,丰满亚洲大尺度无码无码专线,久久精品国产亚洲av麻豆蜜芽http://www.tkk7.com/balajinima/category/27806.htmlzh-cnTue, 04 Dec 2007 09:37:03 GMTTue, 04 Dec 2007 09:37:03 GMT60鏈夌儹鐐圭殑JfreeChart鏌卞瀷鍥撅紙鍘熷垱錛?/title><link>http://www.tkk7.com/balajinima/articles/165086.html</link><dc:creator>鏉庝簯娉?/dc:creator><author>鏉庝簯娉?/author><pubDate>Tue, 04 Dec 2007 01:57:00 GMT</pubDate><guid>http://www.tkk7.com/balajinima/articles/165086.html</guid><wfw:comment>http://www.tkk7.com/balajinima/comments/165086.html</wfw:comment><comments>http://www.tkk7.com/balajinima/articles/165086.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/balajinima/comments/commentRss/165086.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/balajinima/services/trackbacks/165086.html</trackback:ping><description><![CDATA[ <p> <img src="http://www.tkk7.com/images/blogjava_net/balajinima/26977/r_chart.JPG" /> <br /> <br />瀹炵幇鏂瑰紡錛歫sp+javabean<br />鐗堟湰 錛歫freechart-1.0.8<br />web-inf錛氳緗?br />=====================================<br /><servlet><br />聽聽<servlet-name>DisplayChart</servlet-name><br />聽聽<servlet-class><br />聽聽聽org.jfree.chart.servlet.DisplayChart<br />聽聽</servlet-class><br />聽</servlet><br />聽<servlet-mapping><br />聽聽<servlet-name>DisplayChart</servlet-name><br />聽聽<url-pattern>/servlet/DisplayChart</url-pattern><br />聽</servlet-mapping><br />======================================<br />jsp鏂囦歡錛?br />=========================================================================<br /><%@ page language="java" contentType="text/html; charset=GBK"<br />聽pageEncoding="GBK"%><br /><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br /><html><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=GBK"><br /><title>Insert title here</title></p> <p><script language="javascript"><br />function overlib(s){<br />聽document.all.ChartTip.style.display="block";<br />聽top.document.getElementById('ChartTip').innerHTML=s;<br />聽document.all.ChartTip.style.left=document.body.scrollLeft+event.x;<br />聽document.all.ChartTip.style.top=document.body.scrollTop+event.y-20;<br />}<br />function nd(s){<br />聽document.all.ChartTip.style.display="none";<br />}<br /></script><br /><jsp:useBean id="barchart01" scope="session"<br />聽class="com.mdcl.fso.homepage.chart.BarChart01" /><br /></head><br /><body><br /><%<br />聽String fileName = barchart01.drawPic(request.getSession(), out);<br />聽String graphURL = request.getContextPath()<br />聽聽聽+ "/servlet/DisplayChart?filename=" + fileName;<br />%><br /><br /><br /><img src="<%= graphURL %>" border="0" usemap="#<%=fileName %>" /><br /><br /><br /><div id="ChartTip"<br />聽style="position:absolute; font-family:'瀹嬩綋'; font-size: 12px;line-height: 20px;background-color:#FFFFEC; border: 1px solid #999999;display:none;left:0px;top:1px;">嫻嬭瘯鏄劇ず</div><br /></body><br /></html><br />=========================================================================<br />java鏂囦歡<br />=========================================================================<br />package com.mdcl.fso.homepage.chart;</p> <p>import org.jfree.chart.ChartFactory;<br />import org.jfree.chart.ChartRenderingInfo;<br />import org.jfree.chart.ChartUtilities;<br />import org.jfree.chart.JFreeChart;<br />import org.jfree.chart.plot.PlotOrientation;<br />import org.jfree.data.category.DefaultCategoryDataset;<br />import java.awt.Color;<br />import java.awt.Font;<br />import java.io.IOException;<br />import java.io.OutputStream;<br />import java.io.PrintWriter;</p> <p>import org.jfree.chart.renderer.category.BarRenderer3D;<br />import org.jfree.chart.servlet.ServletUtilities;<br />import org.jfree.chart.urls.StandardCategoryURLGenerator;<br />import org.jfree.chart.urls.StandardPieURLGenerator;<br />import org.jfree.chart.labels.StandardCategoryItemLabelGenerator;<br />import org.jfree.chart.axis.AxisLocation;<br />import org.jfree.chart.axis.CategoryAxis;<br />import org.jfree.chart.entity.StandardEntityCollection;<br />import org.jfree.chart.plot.CategoryPlot;<br />import org.jfree.chart.labels.*;<br />import org.jfree.ui.*;<br />import java.util.*;</p> <p>import javax.servlet.http.HttpSession;<br />import javax.servlet.http.HttpServletResponse;<br />import javax.servlet.jsp.JspWriter;</p> <p>import com.mdcl.fso.homepage.*;</p> <p>public class BarChart01 {</p> <p>聽private static DefaultCategoryDataset dataset = new DefaultCategoryDataset();</p> <p>聽private DefaultCategoryDataset getDataset() {// 鍙栨暟鎹?/p> <p>聽聽List expense = new ArrayList();<br />聽聽String sql = "select ftr.organ_id ,fs.dept_name,ftr.subject_id,fft.finance_type_name,ftr.rpt_date ,ftr.rpt_data "<br />聽聽聽聽+ "from fso_t_rpt_expense ftr,fso_sdept fs,fso_finance_type fft "<br />聽聽聽聽+ "where ftr.type_id='D' "<br />聽聽聽聽+ "and ftr.organ_id=fs.dept_id聽 "<br />聽聽聽聽+ "and ftr.rpt_date='2007-08' "<br />聽聽聽聽+ "and fft.finance_type_id=ftr.subject_id聽 "<br />聽聽聽聽+ "and ftr.organ_id='1140'";</p> <p>聽聽expense = DBDao.DbQueryExpense(sql);<br />聽聽for (int i = 0; i < expense.size(); i++) {<br />聽聽聽HashMap param = new HashMap();<br />聽聽聽param = (HashMap) expense.get(i);</p> <p>聽聽聽double dt = Double.parseDouble(String.valueOf(param.get("rpt_data")));<br />聽聽聽String a = (String) param.get("organ");<br />聽聽聽String b = (String) param.get("subject");</p> <p>聽聽聽dataset.addValue(dt, a, b);<br />聽聽}</p> <p>聽聽return dataset;</p> <p>聽}</p> <p>聽public String drawPic(HttpSession session, JspWriter out) {<br />聽聽String fileName = null;<br />聽聽JFreeChart chart = ChartFactory.createBarChart3D("2007-08鎴愭湰緇熻", "璐圭敤綾誨瀷",<br />聽聽聽聽"閲戦錛堝崟浣嶏細鍏冿級", getDataset(), PlotOrientation.VERTICAL, true, true,<br />聽聽聽聽true);<br />聽聽chart.setBackgroundPaint(Color.WHITE);</p> <p>聽聽CategoryPlot plot = chart.getCategoryPlot();// 鑾峰彇緇樺浘鍖?/p> <p>聽聽plot.setBackgroundPaint(new Color(255, 255, 255)); // 璁劇疆緇樺浘鍖鴻儗鏅壊</p> <p>聽聽plot.setRangeGridlinePaint(Color.gray); // 璁劇疆姘村鉤鏂瑰悜鑳屾櫙綰塊鑹?/p> <p>聽聽plot.setRangeGridlinesVisible(true); // 璁劇疆鏄惁鏄劇ず姘村鉤鏂瑰悜鑳屾櫙綰?榛樿鍊間負True</p> <p>聽聽plot.setDomainGridlinePaint(Color.black); // 璁劇疆鍨傜洿鏂瑰悜鑳屾櫙綰塊鑹?/p> <p>聽聽// plot.setDomainGridlinesVisible(true); // 璁劇疆鏄惁鏄劇ず鍨傜洿鏂瑰悜鑳屾櫙綰?榛樿鍊間負False</p> <p>聽聽CategoryAxis domainAxis = plot.getDomainAxis();// 鑾峰彇緇熻縐嶇被杞存爣棰橈紙X杞達級</p> <p>聽聽plot.setDomainAxis(domainAxis);// 娣誨姞X杞?/p> <p>聽聽BarRenderer3D renderer = new BarRenderer3D();// 鑾峰緱BarRenderer3D綾葷殑瀹炰緥錛岀洰鐨勬槸璁劇疆鏌卞艦鐨勭粯鍒跺睘鎬?/p> <p>聽聽renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());//</p> <p>聽聽renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator("index2.jsp"));// 鐢熸垚鐑偣,鐢ㄤ簬閾炬帴</p> <p>聽聽renderer.setItemMargin(0.1);// 璁劇疆姣忎釜緇勬墍鍖呭惈鐨勫鉤琛屾煴鐨勪箣闂磋窛紱?/p> <p>聽聽renderer.setSeriesPaint(0, Color.GREEN);// 璁劇疆鏌卞瓙鐨勯鑹?br />聽聽renderer.setSeriesPaint(1, Color.blue);// 璁劇疆鏌卞瓙鐨勯鑹?/p> <p>聽聽renderer.setBaseOutlinePaint(Color.BLACK);</p> <p>聽聽renderer.setWallPaint(Color.gray);// 璁劇疆 Wall 鐨勯鑹?/p> <p>聽聽renderer.setItemLabelAnchorOffset(10D);// 璁劇疆鏌卞艦鍥句笂鐨勬枃瀛楀亸紱誨?/p> <p>聽聽renderer.setBaseItemLabelFont(new Font("arial", Font.PLAIN, 10), true);// 璁劇疆鏌卞艦鍥句笂鐨勬枃瀛?/p> <p>聽聽renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());// //鏄劇ず姣忎釜鏌辯殑鏁板鹼紝騫朵慨鏀硅鏁板肩殑瀛椾綋灞炴?/p> <p>聽聽renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BASELINE_CENTER));</p> <p>聽聽renderer.setBaseItemLabelsVisible(true);</p> <p>聽聽renderer.setMaximumBarWidth(0.050000000000000003D);</p> <p>聽聽plot.setRenderer(renderer);</p> <p>聽聽plot.setForegroundAlpha(0.80f);// 璁劇疆鏌辯殑閫忔槑搴?/p> <p>聽聽// plot.setDomainAxisLocation(AxisLocation.TOP_OR_RIGHT);//璁劇疆鏄劇ず浣嶇疆</p> <p>聽聽plot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_RIGHT);// 璁劇疆鏄劇ず浣嶇疆</p> <p>聽聽try {</p> <p>聽聽聽PrintWriter pw = new PrintWriter(out);</p> <p>聽聽聽StandardEntityCollection sec = new StandardEntityCollection();<br />聽聽聽ChartRenderingInfo info = new ChartRenderingInfo(sec);</p> <p>聽聽聽fileName = ServletUtilities.saveChartAsPNG(chart, 640, 400, info,<br />聽聽聽聽聽session);<br />聽聽聽// ChartUtilities.writeChartAsPNG(op,chart, 640, 400, info,true,0);<br />聽聽聽ChartUtilities.writeImageMap(pw, fileName, info, true);<br />聽聽} catch (IOException e) {<br />聽聽聽// TODO Auto-generated catch block<br />聽聽聽e.printStackTrace();<br />聽聽}</p> <p>聽聽return fileName;</p> <p>聽}</p> <p>}<br />=========================================================================<br /><br /><br /></p> <img src ="http://www.tkk7.com/balajinima/aggbug/165086.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/balajinima/" target="_blank">鏉庝簯娉?/a> 2007-12-04 09:57 <a href="http://www.tkk7.com/balajinima/articles/165086.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://fangdazd.com" target="_blank">久久精品国产亚洲AV果冻传媒</a>| <a href="http://www1688mz.com" target="_blank">亚洲宅男天堂在线观看无病毒</a>| <a href="http://sdshfengji.com" target="_blank">亚洲精品无码久久久久A片苍井空</a>| <a href="http://ytsp88.com" target="_blank">大地资源在线观看免费高清</a>| <a href="http://hwjyrck.com" target="_blank">美女无遮挡免费视频网站</a>| <a href="http://831055.com" target="_blank">国产性爱在线观看亚洲黄色一级片</a>| <a href="http://172pk.com" target="_blank">精品国产福利尤物免费</a>| <a href="http://hkschooltv.com" target="_blank">亚洲美女视频免费</a>| <a href="http://ocn888.com" target="_blank">成人毛片免费观看视频在线 </a>| <a href="http://77sosoo.com" target="_blank">亚洲日韩乱码久久久久久</a>| <a href="http://ningxialanh.com" target="_blank">麻豆成人精品国产免费</a>| <a href="http://jimeng-99.com" target="_blank">永久在线观看免费视频 </a>| <a href="http://jyzs888.com" target="_blank">国产 亚洲 中文在线 字幕</a>| <a href="http://5r7b.com" target="_blank">亚洲av区一区二区三</a>| <a href="http://www00475.com" target="_blank">日韩免费观看一区</a>| <a href="http://bixnu.com" target="_blank">亚洲大尺度无码无码专线一区</a>| <a href="http://h47h.com" target="_blank">国产AV无码专区亚洲AV毛网站</a>| <a href="http://wwwpaogou123.com" target="_blank">国产大片线上免费看</a>| <a href="http://wxyz2.com" target="_blank">视频免费在线观看</a>| <a href="http://flowsns.com" target="_blank">羞羞漫画页面免费入口欢迎你</a>| <a href="http://pgb168.com" target="_blank">亚洲视频一区二区在线观看</a>| <a href="http://tiantangapp.com" target="_blank">亚洲Av无码乱码在线观看性色 </a>| <a href="http://www-15706.com" target="_blank">最近中文字幕高清免费中文字幕mv </a>| <a href="http://misiranim.com" target="_blank">国产成人无码免费看视频软件 </a>| <a href="http://ryhjled.com" target="_blank">一本天堂ⅴ无码亚洲道久久</a>| <a href="http://831055.com" target="_blank">亚洲中文字幕无码永久在线 </a>| <a href="http://333uy.com" target="_blank">亚洲熟妇无码另类久久久</a>| <a href="http://www66913.com" target="_blank">在线观着免费观看国产黄</a>| <a href="http://www-533999.com" target="_blank">57PAO成人国产永久免费视频 </a>| <a href="http://zuahowan.com" target="_blank">黄床大片30分钟免费看</a>| <a href="http://773311h.com" target="_blank">亚洲国产福利精品一区二区</a>| <a href="http://dqzlxgg.com" target="_blank">日本亚洲国产一区二区三区</a>| <a href="http://www611rr.com" target="_blank">亚洲午夜福利精品久久</a>| <a href="http://okbala.com" target="_blank">亚洲国产成人精品91久久久</a>| <a href="http://gkhnf.com" target="_blank">日本高清免费aaaaa大片视频</a>| <a href="http://aplus178.com" target="_blank">亚洲成人免费网址</a>| <a href="http://26672814.com" target="_blank">1000部禁片黄的免费看</a>| <a href="http://jsjumei.com" target="_blank">永久看日本大片免费35分钟 </a>| <a href="http://xyhfloor.com" target="_blank">久久久高清免费视频</a>| <a href="http://www55nana.com" target="_blank">欧洲一级毛片免费</a>| <a href="http://gwcyy.com" target="_blank">毛片高清视频在线看免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>