Jfreechart Installation and Use

Source: Internet
Author: User
Conversion from: jfreechart is an open-source project fully based on the Java language. Therefore, jfreechart can be used in Java development environments, including Java applications, or Java Web applications. Combined with the itext project, you can output the generated Statistical Chart to a PDF file. Combined with the latest poi project, you can also output the generated Statistical Chart to an Excel document.

Jfreechart can be used to generate a wide range of statistical charts. As long as developers provide data that conforms to the format required by jfreechart, jfreechart can automatically generate corresponding statistical charts. Jfreechart can generate pie charts, bar charts, scatter plots, time series, and Gantt charts, it can be directly output as an image file or exported as a PDF or Excel file.

Download and install jfreechart
To use jfreechart to generate statistical charts, you must download and install the jfreechart project. To download and install jfreechart, follow these steps:

1. Download jfreechart

Log on to the jfreechart Website: http://www.jfree.org/jfreechart/download.html to download the latest jfreechart的. Download jfreechart has three options:

Jfreechart: the compressed file of the jfreechart project. : Http://sourceforge.net/projects/jfreechart/files/
Documentation: the API document compression software of jfreechart, which is somewhat large and nearly MB in size. : Http://sourceforge.net/projects/jfreechart/files/
Jcommon: the class library file on which jfreechart depends (optional, not downloadable): http://sourceforge.net/projects/jfreechart/files/3.%20JCommon/
2. decompress the downloaded jfreechart-1.0.13.zip file to obtain the following file structure:
Ant: this folder stores the build. xml file for compiling the jfreechart project.
Checkstyle: stores the style files that generate the jfreechart project API documentation.
Docfiles: stores some image files of the jfreechart instance.
Experimental: stores the source code for the experimental new features of the jfreechart project.
Lib: stores the binary class libraries of the jfreechart project and third-party class libraries on which jfreechart is compiled and run.
Source: stores the source code of jfreechart.
SWT: stores the source code supported by SWT (Java Standard Widget Toolkit, java standard toolset) provided by jfreechart.
Tests: A test case file for unit testing of the jfreechart project.
Jfreechart-1.0.13-demo.jar: Demo example of jfreechart, which can be run using the Java-jar jfreechart-1.0.13-demo.jar command, but jfreechart does not provide source code for these demo examples.
Such as licence-lgpl.txtand readme.txt.
Note: jfreechart does not provide related entry Guide, reference manual, and other documents, because jfreechart has similar policies with the jasperreports project. Their projects are open-source and free, but the documents are charged.

3. Set Environment Variables
Copy all jar files in the Lib path to the classpath path where the jfreechart project application is to be used; if it is a Web application, copy these jar files to the WEB-INF/lib path of the Web application. If you need to use the jfreechart project during compilation and running, you should also add the jfreechart-1.0.13.jar file under the Lib path to the system's environment variables; if you use another IDE, you do not need to add environment variables.

After completing the preceding three steps, you can install jfreechart.

This article is transferred from: jfreechart Installation and Use

For more information, see:

Analysis and function improvement of jfreechart plug-in struts 2 using jfreechartjava in JSP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.