- 浏览: 1150819 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
冷酷月光:
楼主。请教一下。arcgis for android 有提供地 ...
ArcGIS API For Android离线地图的实现 -
winney117:
请问如何GET已有网页上的指定内容?比如百度文库中的某一篇文章 ...
三步发布java方式的rest服务 -
zige1012:
您好,我想问问我想换个自己地图的切片,也有4层(L0-L3), ...
ArcGIS API For Android离线地图的实现
五.开始开发
前面的其实都是废话,呵呵。对JFreeChart的操作其实可以分成6步骤
记住以上6步骤,无论做什么形状的图表,都是在某一步的扩展。
1) 直接生成图片
2) 采用servlet和struts的action方式输出
采用这种方式输出,不用生成图片。
A .servlet输出
B .struts的action方式输出
只将这条语句加上try catch即可,并返回null。
其实采用这两种方式与生成图片的方式改动并不大
加上语句response.setContentType("image/jpeg");
ChartUtilities.writeChartAsJPEG(new FileOutputStream("D:\\ 项目状态分布.jpg");,100,chart,640,480,null);
文件流改成response的输出流就可以了
hartUtilities.writeChartAsJPEG(response.getOutputStream(),100,chart,800,600,null);
3)jsp+servlet+javabean方式
1. Create ChartViewer servlet
2. Create a servlet map in web.xml
3. Create a chart in a java bean (Pie3DDemo.java)
6. 页面
4)采用工具类ChartUtil和DisplayChart(jfreechart的servlet)输出
我用了上面的几个方法输出图片,发现页面里只能输出一个图片,
不过下面的方法可以输出多个图片,而且是几种方式中最简单的一个,推荐使用。
这种方式和上面的三种比较类似,是将javabean里的生成图片的方法写的一个工具类ChartUtil里面。
1 .添加工具类ChartUtil
public class ChartUtil {
// 产生时间序列图,返回图片名称
2、在action里统计数据,设置好数据集dataset。传到页面
3、 在页面里取出
DefaultPieDataset piedataset=(DefaultPieDataset)request.getAttribute("piedataset");
// 用ChartUtil工具类产生图片
Java代码
String p = ChartUtil.generatePieChart(piedataset," 项目收支线图",500,300,null, new PrintWriter(out));
String p1 = request.getContextPath() + "/servlet/DisplayChart?filename=" + p;
String p = ChartUtil.generatePieChart(piedataset," 项目收支线图",500,300,null, new PrintWriter(out));
String p1 = request.getContextPath() + "/servlet/DisplayChart?filename=" + p;
通过以下方式输出
4、在web.xml中添加
5) ApplicationFrame 方式
六. 可参考资料与网址
官方网站
http://www.jfree.org/jfreechart/index.html
官方论坛
http://www.jfree.org/phpBB2/index.php
API 文档
http://www.jfree.org/jfreechart/api/gjdoc/index.html
中文API
http://blog.sina.com.cn/u/405da78d010000ap
前面的其实都是废话,呵呵。对JFreeChart的操作其实可以分成6步骤
- 引入生成图表所需的Jar包
- 创建绘制图表所需要的数据集
- 创建JFreeChart的实例
- 设置图表的生成格式及文件名
- 设置图表的浏览路径
- 在HTML中,调用<img>显示图表
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartRenderingInfo; import org.jfree.chart.JFreeChart; import org.jfree.chart.entity.StandardEntityCollection; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.servlet.ServletUtilities; import org.jfree.data.category.DefaultCategoryDataset; public class ChartServelt extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { static final long serialVersionUID = 1L; public ChartServelt() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //第二步,创建绘制数据集 DefaultCategoryDataset dataset = new DefaultCategoryDataset(); int bookSales=0; String[] xAxis= new String[10]; String[] yAxis= new String[20]; xAxis[0] = 999+""; for(int i=0;i<xAxis.length;i++){ xAxis[i]=i+""; for(int j=0;j<yAxis.length;j++){ yAxis[j]=j+""; bookSales = 1 +(int)(Math.random()*100); dataset.addValue(bookSales, xAxis[0], yAxis[j]); } } //第三步,创建JFreeChart实例 String chartTile = "Hello,JFreeChart"; JFreeChart chart = ChartFactory.createLineChart( chartTile, //图表的标题 "XAxis", //x轴标题 "YAxis", //y轴标题 dataset, //数据集 PlotOrientation.VERTICAL, //直方图的方向,水平方向和垂直方向 true, //是否有图例 true, //是否有提示 true); //是否有连接 //第四步,图表的格式和文件名 ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); String fileName = ServletUtilities.saveChartAsPNG(chart,827, 290, info,request.getSession()); //第五步,浏览路径 String graphURL = request.getContextPath()+"/servlet/DisplayChart?filename="+fileName; request.getRequestDispatcher("test.jsp?graphURL="+graphURL).forward(request, response); } }
记住以上6步骤,无论做什么形状的图表,都是在某一步的扩展。
1) 直接生成图片
public class PieChartPicture { public static void main(String[] args) { PieDataset dataset = getDataSet(); JFreeChart chart = ChartFactory.createPieChart3D( "项目进度分布", // chart title dataset,// data true,// include legend true, false ); PiePlot3D plot=(PiePlot3D)chart.getPlot(); // 图片中显示百分比:默认方式 //plot.setLabelGenerator(new StandardPieSectionLabelGenerator(StandardPieToolTipGenerator.DEFAULT_TOOLTIP_FORMAT)); // 图片中显示百分比:自定义方式,{0} 表示选项, {1} 表示数值, {2} 表示所占比例 ,小数点后两位 plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}={1}({2})", NumberFormat.getNumberInstance(), new DecimalFormat("0.00%"))); // 图例显示百分比:自定义方式, {0} 表示选项, {1} 表示数值, {2} 表示所占比例 plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0}={1}({2})")); // 设置背景色为白色 chart.setBackgroundPaint(Color.white); // 指定图片的透明度(0.0-1.0) plot.setForegroundAlpha(1.0f); // 指定显示的饼图上圆形(false)还椭圆形(true) plot.setCircular(true); // 设置图标题的字体 Font font = new Font(" 黑体",Font.CENTER_BASELINE,20); TextTitle title = new TextTitle(" 项目状态分布"); title.setFont(font); chart.setTitle(title); FileOutputStream fos_jpg = null; try { fos_jpg=new FileOutputStream("D:\\ 项目状态分布.jpg"); ChartUtilities.writeChartAsJPEG(fos_jpg,100,chart,640,480,null); fos_jpg.close(); } catch (Exception e) { } } private static PieDataset getDataSet() { DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue(" 市场前期", new Double(10)); dataset.setValue(" 立项", new Double(15)); dataset.setValue(" 计划", new Double(10)); dataset.setValue(" 需求与设计", new Double(10)); dataset.setValue(" 执行控制", new Double(35)); dataset.setValue(" 收尾", new Double(10)); dataset.setValue(" 运维",new Double(10)); return dataset; } }
2) 采用servlet和struts的action方式输出
采用这种方式输出,不用生成图片。
A .servlet输出
public class PieByServlet extends HttpServlet{ public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { res.setContentType("image/jpeg"); PieDataset dataset = getDataSet(); JFreeChart chart = ChartFactory.createPieChart3D( " 水果饼图", // chart title dataset,// data true, // include legend true, false ); //设置图表属性 // 输出图片 ChartUtilities.writeChartAsJPEG(res.getOutputStream(),100,chart,800,600,null); }
B .struts的action方式输出
只将这条语句加上try catch即可,并返回null。
try{ ChartUtilities.writeChartAsJPEG(response.getOutputStream(),100,chart,800,600,null); } catch (Exception e) { } return null; try{ ChartUtilities.writeChartAsJPEG(response.getOutputStream(),100,chart,800,600,null); } catch (Exception e) { } return null;
其实采用这两种方式与生成图片的方式改动并不大
加上语句response.setContentType("image/jpeg");
ChartUtilities.writeChartAsJPEG(new FileOutputStream("D:\\ 项目状态分布.jpg");,100,chart,640,480,null);
文件流改成response的输出流就可以了
hartUtilities.writeChartAsJPEG(response.getOutputStream(),100,chart,800,600,null);
3)jsp+servlet+javabean方式
1. Create ChartViewer servlet
public class ChartViewer extends HttpServlet { public void init() throws ServletException { } //Process the HTTP Get request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // get the chart from session HttpSession session = request.getSession(); BufferedImage chartImage = (BufferedImage) session.getAttribute("chartImage"); // set the content type so the browser can see this as a picture response.setContentType("image/png"); // send the picture PngEncoder encoder = new PngEncoder(chartImage, false, 0, 9); response.getOutputStream().write(encoder.pngEncode()); } //Process the HTTP Post request public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } //Process the HTTP Put request public void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } //Clean up resources public void destroy() { } } public class ChartViewer extends HttpServlet { public void init() throws ServletException { } //Process the HTTP Get request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // get the chart from session HttpSession session = request.getSession(); BufferedImage chartImage = (BufferedImage) session.getAttribute("chartImage"); // set the content type so the browser can see this as a picture response.setContentType("image/png"); // send the picture PngEncoder encoder = new PngEncoder(chartImage, false, 0, 9); response.getOutputStream().write(encoder.pngEncode()); } //Process the HTTP Post request public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } //Process the HTTP Put request public void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } //Clean up resources public void destroy() { } }
2. Create a servlet map in web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app> <servlet> <servlet-name>ChartViewer</servlet-name> <servlet-class>myapp.webwork.servlets.ChartViewer</servlet-class> </servlet> <servlet-mapping> <servlet-name>ChartViewer</servlet-name> <url-pattern>/servlet/ChartViewer</url-pattern> </servlet-mapping> </web-app> <?xml version="1.0" encoding="UTF-8"?> <web-app> <servlet> <servlet-name>ChartViewer</servlet-name> <servlet-class>myapp.webwork.servlets.ChartViewer</servlet-class> </servlet> <servlet-mapping> <servlet-name>ChartViewer</servlet-name> <url-pattern>/servlet/ChartViewer</url-pattern> </servlet-mapping> </web-app>
3. Create a chart in a java bean (Pie3DDemo.java)
public class Pie3DDemo { private DefaultPieDataset getDataset() { // categories... String[] section = new String[] { "Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec" }; // data... double[] data = new double[section.length]; for (int i = 0; i < data.length; i++) { data[i] = 10 + (Math.random() * 10); } // create the dataset... DefaultPieDataset dataset = new DefaultPieDataset(); for (int i = 0; i < data.length; i++) { dataset.setValue(section[i], data[i]); } return dataset; } public String getChartViewer(HttpServletRequest request, HttpServletResponse response) { DefaultPieDataset dataset = getDataset(); // create the chart... <SPAN class=hilite1>JFreeChart</SPAN> chart = ChartFactory.createPie3DChart( "Pie3D Chart Demo", // chart title dataset, // data true, // include legend true, false ); // set the background color for the chart... chart.setBackgroundPaint(Color.cyan); PiePlot plot = (PiePlot) chart.getPlot(); plot.setNoDataMessage("No data available"); // set drilldown capability... plot.setURLGenerator(new StandardPieURLGenerator("Bar3DDemo.jsp","section")); plot.setLabelGenerator(null); // OPTIONAL CUSTOMISATION <SPAN class=hilite3>COM</SPAN>PLETED. ChartRenderingInfo info = null; HttpSession session = request.getSession(); try { //Create RenderingInfo object response.setContentType("text/html"); info = new ChartRenderingInfo(new StandardEntityCollection()); BufferedImage chartImage = chart.createBufferedImage(640, 400, info); // putting chart as BufferedImage in session, // thus making it available for the image reading action Action. session.setAttribute("chartImage", chartImage); PrintWriter writer = new PrintWriter(response.getWriter()); ChartUtilities.writeImageMap(writer, "imageMap", info); writer.flush(); } catch (Exception e) { } String pathInfo = "http://"; pathInfo += request.getServerName(); int port = request.getServerPort(); pathInfo += ":"+String.valueOf(port); pathInfo += request.getContextPath(); String chartViewer = pathInfo + "/servlet/ChartViewer"; return chartViewer; } public class Pie3DDemo { private DefaultPieDataset getDataset() { // categories... String[] section = new String[] { "Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec" }; // data... double[] data = new double[section.length]; for (int i = 0; i < data.length; i++) { data[i] = 10 + (Math.random() * 10); } // create the dataset... DefaultPieDataset dataset = new DefaultPieDataset(); for (int i = 0; i < data.length; i++) { dataset.setValue(section[i], data[i]); } return dataset; } public String getChartViewer(HttpServletRequest request, HttpServletResponse response) { DefaultPieDataset dataset = getDataset(); // create the chart... JFreeChart chart = ChartFactory.createPie3DChart( "Pie3D Chart Demo", // chart title dataset, // data true, // include legend true, false ); // set the background color for the chart... chart.setBackgroundPaint(Color.cyan); PiePlot plot = (PiePlot) chart.getPlot(); plot.setNoDataMessage("No data available"); // set drilldown capability... plot.setURLGenerator(new StandardPieURLGenerator("Bar3DDemo.jsp","section")); plot.setLabelGenerator(null); // OPTIONAL CUSTOMISATION COMPLETED. ChartRenderingInfo info = null; HttpSession session = request.getSession(); try { //Create RenderingInfo object response.setContentType("text/html"); info = new ChartRenderingInfo(new StandardEntityCollection()); BufferedImage chartImage = chart.createBufferedImage(640, 400, info); // putting chart as BufferedImage in session, // thus making it available for the image reading action Action. session.setAttribute("chartImage", chartImage); PrintWriter writer = new PrintWriter(response.getWriter()); ChartUtilities.writeImageMap(writer, "imageMap", info); writer.flush(); } catch (Exception e) { } String pathInfo = "http://"; pathInfo += request.getServerName(); int port = request.getServerPort(); pathInfo += ":"+String.valueOf(port); pathInfo += request.getContextPath(); String chartViewer = pathInfo + "/servlet/ChartViewer"; return chartViewer; }
6. 页面
<html> <head> <title>Pie Chart Demo</title> </head> <jsp:useBeanid="myChart"scope="session"class="myapp.webwork.beans.Pie3DDemo" /> <body> <h2>Pie Chart Demo</h2> <%String chartViewer = myChart.getChartViewer(request, response);%> <img src="<%=chartViewer%>" border=0 usemap="#imageMap"> </body> </html> <html> <head> <title>Pie Chart Demo</title> </head> <jsp:useBeanid="myChart"scope="session"class="myapp.webwork.beans.Pie3DDemo" /> <body> <h2>Pie Chart Demo</h2> <%String chartViewer = myChart.getChartViewer(request, response);%> <img src="<%=chartViewer%>" border=0 usemap="#imageMap"> </body> </html>
4)采用工具类ChartUtil和DisplayChart(jfreechart的servlet)输出
我用了上面的几个方法输出图片,发现页面里只能输出一个图片,
不过下面的方法可以输出多个图片,而且是几种方式中最简单的一个,推荐使用。
这种方式和上面的三种比较类似,是将javabean里的生成图片的方法写的一个工具类ChartUtil里面。
1 .添加工具类ChartUtil
public class ChartUtil {
// 产生时间序列图,返回图片名称
public static String generatePieChart(DefaultPieDataset dataset,String title,int width,int height,HttpSession session, PrintWriter pw) { String filename = null; try { if (session != null) { ChartDeleter deleter = (ChartDeleter)session.getAttribute("<SPAN class=hilite1>JFreeChart</SPAN>_Deleter"); session.removeAttribute("<SPAN class=hilite1>JFreeChart</SPAN>_Deleter"); session.setAttribute("<SPAN class=hilite1>JFreeChart</SPAN>_Deleter", deleter); } <SPAN class=hilite1>JFreeChart</SPAN> chart = ChartFactory.createPieChart3D( title, // chart title dataset, // data true, // include legend true, false ); // Write the chart image to the temporary directory ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); //If the last parameter is null, the chart is a "one time"-chart and will be deleted after the first serving. //If the last parameter is a session object, the chart remains until session time out. filename = ServletUtilities.saveChartAsPNG(chart, width, height, info, session); // Write the image map to the PrintWriter ChartUtilities.writeImageMap(pw, filename, info,true); pw.flush(); } catch (Exception e) { System.out.println("Exception - " + e.toString()); e.printStackTrace(System.out); filename = "picture_error.png"; } return filename; } } public static String generatePieChart(DefaultPieDataset dataset,String title,int width,int height,HttpSession session, PrintWriter pw) { String filename = null; try { if (session != null) { ChartDeleter deleter = (ChartDeleter)session.getAttribute("JFreeChart_Deleter"); session.removeAttribute("JFreeChart_Deleter"); session.setAttribute("JFreeChart_Deleter", deleter); } JFreeChart chart = ChartFactory.createPieChart3D( title, // chart title dataset, // data true, // include legend true, false ); // Write the chart image to the temporary directory ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); //If the last parameter is null, the chart is a "one time"-chart and will be deleted after the first serving. //If the last parameter is a session object, the chart remains until session time out. filename = ServletUtilities.saveChartAsPNG(chart, width, height, info, session); // Write the image map to the PrintWriter ChartUtilities.writeImageMap(pw, filename, info,true); pw.flush(); } catch (Exception e) { System.out.println("Exception - " + e.toString()); e.printStackTrace(System.out); filename = "picture_error.png"; } return filename; } }
2、在action里统计数据,设置好数据集dataset。传到页面
3、 在页面里取出
DefaultPieDataset piedataset=(DefaultPieDataset)request.getAttribute("piedataset");
// 用ChartUtil工具类产生图片
Java代码
String p = ChartUtil.generatePieChart(piedataset," 项目收支线图",500,300,null, new PrintWriter(out));
String p1 = request.getContextPath() + "/servlet/DisplayChart?filename=" + p;
String p = ChartUtil.generatePieChart(piedataset," 项目收支线图",500,300,null, new PrintWriter(out));
String p1 = request.getContextPath() + "/servlet/DisplayChart?filename=" + p;
通过以下方式输出
<td><img src="<%= p1 %>" width=500 height=300 border=0 usemap="#<%= p %>"></td> <td><img src="<%= p1 %>" width=500 height=300 border=0 usemap="#<%= p %>"></td>
4、在web.xml中添加
<servlet> <servlet-name>DisplayChart</servlet-name> <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> </servlet> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> <url-pattern>/servlet/DisplayChart</url-pattern> </servlet-mapping> <servlet> <servlet-name>DisplayChart</servlet-name> <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> </servlet> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> <url-pattern>/servlet/DisplayChart</url-pattern> </servlet-mapping>
5) ApplicationFrame 方式
public class PieChartDemo1 extends ApplicationFrame { public PieChartDemo1(String title) { super(title); setContentPane(createDemoPanel()); } private static <SPAN class=hilite1>JFreeChart</SPAN> createChart(PieDataset dataset) { <SPAN class=hilite1>JFreeChart</SPAN> chart = ChartFactory.createPieChart( ....... return chart; } public static JPanel createDemoPanel() { <SPAN class=hilite1>JFreeChart</SPAN> chart = createChart(createDataset()); return new ChartPanel(chart); } public static void main(String[] args) { PieChartDemo1 demo = new PieChartDemo1("Pie Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); } } public class PieChartDemo1 extends ApplicationFrame { public PieChartDemo1(String title) { super(title); setContentPane(createDemoPanel()); } private static JFreeChart createChart(PieDataset dataset) { JFreeChart chart = ChartFactory.createPieChart( ....... return chart; } public static JPanel createDemoPanel() { JFreeChart chart = createChart(createDataset()); return new ChartPanel(chart); } public static void main(String[] args) { PieChartDemo1 demo = new PieChartDemo1("Pie Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); } }
六. 可参考资料与网址
官方网站
http://www.jfree.org/jfreechart/index.html
官方论坛
http://www.jfree.org/phpBB2/index.php
API 文档
http://www.jfree.org/jfreechart/api/gjdoc/index.html
中文API
http://blog.sina.com.cn/u/405da78d010000ap
- 使用JFreeChart_制作美观易懂的图表.rar (534 KB)
- 下载次数: 148
发表评论
-
Java中文排序
2011-06-14 13:11 1774所谓中文排序就是按照汉语拼音的顺序进行排序,在Java中进行排 ... -
三步发布java方式的rest服务
2010-10-18 09:47 19482大家好: 最近大家都想知道怎么发布一个java的rest方式的 ... -
JDK路径设置全解
2010-05-28 23:44 1692PATH:.;D:\Java\jdk1.6.0_10\bin ... -
java.util.Properties类的使用
2009-02-10 10:21 1826Properties 类已不是新东西了,它在 Java 编程的 ... -
java导入导出excel操作(jxl),整理中。。。
2009-02-10 10:15 4060jxl.jar 包 下载地址: http://www.and ... -
使用Struts和Velocity开发web应用
2008-12-25 23:31 1420http://www.edu999.com/IT/JAVA/2 ... -
关于JAVA断点续传
2008-10-18 10:20 2184SiteFileFetch.java负责整个文件的抓取,控制内 ... -
Spring中Quartz的配置实例
2008-10-13 15:29 2085Quartz是一个强大的企业级任务调度框架,Spring中继承 ... -
Spring中Quartz的Cron配置说明
2008-10-13 10:43 3345一个Cron-表达式是一个 ... -
在Hibernate应用中如何处理批量更新和批量删除?
2008-10-07 10:03 1148批量更新是指在一个事务中更新大批量数据,批量删除是指在一个事务 ... -
Servlet和Filter的url匹配以及url-pattern详解
2008-09-22 16:33 1895Servlet和filter是J2EE开发 ... -
动态代理(Dynamic Proxy)Java Servlet
2008-09-16 21:02 2101从JDK1.3开始,Java就引入了动态代理的概念。动态代理( ... -
用Java动态代理实现AOP
2008-09-16 20:36 1084目前整个开发社区对AOP(Aspect Oriented Pr ... -
JAVA中的反射机制详解
2008-09-16 14:44 2144JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个 ... -
从查询串中分离请求参数——acegi security中SecurityContextHolderA
2008-09-03 17:57 1996大多数情况下我们是不需要单独处理HttpServletRequ ... -
使用RememberMeProcessingFilter来实现cookies自动登陆
2008-09-03 17:56 2186要使用cookies自动登陆,我们需要配置过滤器Remembe ... -
Acegi concurrent session
2008-09-03 16:33 1341. <bean id="concurrent ... -
Web开发中的Listener和Filter
2008-08-28 16:12 2988http://www.javadby.com/Web_Serv ... -
关于struts2无法加载struts.properties的问题
2008-08-15 15:17 1688最近整合了struts2和spring的问题,其中看到一个st ... -
Hibernate配置详解
2008-08-02 23:19 1733表 3.3. Hibernate配置属 ...
相关推荐
JfreeChart学习总结JfreeChart学习总结
### JFreeChart学习总结 #### 一、为什么学习JFreeChart? 随着互联网技术的飞速发展,越来越多的应用程序转向了Web平台。这不仅包括传统的静态网页,也涵盖了那些需要复杂数据展示的应用,如报表系统。然而,从...
总结而言,JFreeChart 不仅是一个功能强大的图表生成库,而且拥有活跃的社区支持,提供了详尽的文档和示例代码。无论是初学者还是有经验的开发者,都能够通过本文档快速上手并熟练掌握 JFreeChart 的使用技巧。
这份学习资料是针对 JFreeChart 的使用进行讲解,主要涵盖了如何在 Web 项目中集成 JFreeChart 以及创建不同类型的图表。 1. **Web 项目集成**: 在一个标准的 Web 项目中,为了展示 JFreeChart 生成的图表,我们...
总结,JFreeChart是一个功能强大的Java图表库,适用于各种数据可视化需求。通过理解其核心概念,如Chart、Dataset、Plot和Renderer,以及如何创建和定制图表,开发者能够轻松地在Java项目中实现专业级别的数据可视化...
**JFreeChart学习文档** **一、JFreeChart简介** JFreeChart是一个强大的Java图表库,它能够生成各种类型的高质量图表,包括折线图、柱状图、饼图、散点图、甘特图以及时间序列图表等。这个库广泛应用于数据分析、...
因此,针对JFreeChart中的中文乱码问题,本文将汇总并整理一系列有效的解决方案。 #### JFreeChart简介 JFreeChart是一款开源Java图表库,它提供了丰富的API来创建高质量的图表。JFreeChart支持多种类型的图表,...
**正文** JFreeChart是一款强大的Java图形库...通过学习《JFreeChart中文教程》和查阅中文API,开发者能够熟练掌握JFreeChart的使用,提升数据可视化的技能,从而更好地在项目中呈现数据,增强用户的理解和分析能力。
**正文** JFreeChart是一款强大的Java图表库,它允许开发者创建各种复杂的...利用这个“JFreeChart学习资料大全”,你可以系统地学习和提升这方面的能力,无论是在数据分析、数据展示还是软件开发中,都将大有裨益。
**JFreeChart API 中文文档详解** ...总之,JFreeChart API 中文文档是开发者在使用JFreeChart进行图表开发时不可或缺的参考资料,通过深入学习和实践,可以轻松掌握各种图表的创建和定制,提升数据可视化的专业水平。
在JFreeChart中,线图通常基于`XYDataset`数据集,其中每个数据项由一对X和Y值定义。`XYLine`可能用于封装这些数据点,并提供方法来设置线的样式,如颜色、线条宽度和线型。例如,你可以创建一个`...
JFreeChart API中文文档
在本文中,我们将深入探讨 JFreeChart 的核心类和它们在创建图表过程中的作用。 1. **JFreeChart 类**: 这是所有图表的基础,它代表了图表对象。你可以通过 JFreeChart 工厂类创建各种类型的图表,例如饼图、柱状...
如果你还在java EE 门口徘徊,常用开发组件介绍>将是你最好的向导;如果你已经入门了,那恭喜你,你将更容易从全局上把握自己的学习方向...
JFreeChart是一款功能强大的Java图表库,它能够生成多种图表,如柱状图、折线图、饼图、时间序列图等,常用于Java应用程序中。而Eclipse是一个开源的集成开发环境,广泛用于Java语言的开发。在Eclipse中配置...