Jfreechart is a Java project provided by Jfree, which is designed to implement a variety of graphs, including pie charts, histogram columns (plain columns and stack columns), line charts, area maps, distribution maps, blending diagrams, Gantt charts, and some dashboards.
Official website: http://jfree.org/.
Pie pie charts, line lines, bar bars, Gantt Gantt charts, xy plots and scatter Plots,timer series, high/low/open/close charts and candle stick,
Cause: first, the garbled problem between JFreeChart and the Chinese verification code is irrelevant to the jsp code, because the Java virtual machine cannot find the font file, therefore, similar Chinese garbled characters of Swing or AWT are also applicable to the environment: first, the garbled problem between JFreeChart and the Chinese verification code is irrelevant to the jsp code ,... cause: first, t
Jfreechart deploys the linux server to generate the image garbled solution. recently, jfreechart is used in the system to create a chart function. the local test (windwoxp environment) is normal, but when it is placed on the linux server, I found that the image generated for the chart is garbled, so I checked it online to solve the problem...
Jfreechart deploys
1. Create a fruit sales report by color using Jfreechart1 PackageCom.wcy.chart.bar;2 3 Importjavax.servlet.http.HttpSession;4 5 Importorg.jfree.chart.ChartFactory;6 ImportOrg.jfree.chart.JFreeChart;7 Importorg.jfree.chart.plot.PlotOrientation;8 Importorg.jfree.chart.servlet.ServletUtilities;9 ImportOrg.jfree.data.category.CategoryDataset;Ten Importorg.jfree.data.general.DatasetUtilities; One A Public classBarChart3 { - - Public StaticString Genbarchart (HttpSession session)throwsexcepti
Integrate jfreechart with springMVC + maven and springmvcmaven
One function of a university project is to analyze the statistical results in graphs. After finding some information, I feel that jfreechar is very quick to use. It is also easy to implement through a few simple demos, it can also meet the needs of the project, so we decided to use this tool. Here we will sort out some of the learned knowledge about jfreechar.1. Introduce the jar package
T
3.1. Simple pie chart
Pie charts must use Defaultpiedataset to provide data for the chart.
DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue("Spring Security", 100); dataset.setValue("jBPM 4", 200); dataset.setValue("Ext JS", 300); dataset.setValue("JFreeChart", 100);
This time we use SetValue to add data to the dataset, the first parameter is the name of the data, and the second data is the value of the data.
This exposes a pr
How do i show Jfreechart on PHP? Most of these situations may be the case where the servlet on the JSP can fully display the Jfreechart graph, but mixing with other languages does not show
I now also encountered this problem, think for half an hour finally understand, the realization of the process is very simple. (Summary of personal experience)
solution of the idea:
1. First save the
Jfreechart is an open chart drawing class library on the Java platform. It is written entirely in the Java language and is designed for use by applications, applets, Servlets, and JSP. Jfreechart can generate a variety of charts (pie charts), histogram (bar charts), scatter (scatter plots), time series (time series), Gantt chart (Gantt charts), and more. It also produces PNG and JPEG output, and can be asso
In many cases, jfreechart cannot automatically delete the generated image as expected when the httpsession fails.
Analyze the original chartdeleter code
Public void valueunbound (httpsessionbindingevent event ){
Iterator iter = This. chartnames. listiterator ();While (ITER. hasnext ()){String filename = (string) ITER. Next ();File file = new file (system. getproperty ("Java. Io. tmpdir"), filename );If (file. exists ()){File. Delete ();}}Return;
}
The
In my spare time, I learned how to generate a jfreechart chart. In combination with the books of prawns, the younger brother made a systematic summary, which benefited a lot. I recommend it to my friends here, for more information, see. This article introduces how to display a bar chart. Of course, this is only one method. There are also many ways to display charts, such as customizing chart labels and using the j
Jfreechart Chinese Display as a blockStatsvn+statcvs are all used Jfreechart 1.0.13, the resulting chart has a problem with the Chinese display. Old version of jfreechart1.0.10 is good ~ Rub ~Originally, from 1.0.14, added a Source\org\jfree\chart\standardcharttheme.javaInside write dead font all use Tahoma, did not find this font, generated figure, Chinese becomes block.Workaround:Either install the Tahoma
Jfreechart charts run normally on windows, but an error occurs in Linux as follows:
Java. Lang. internalerror: Can't connect to X11 window server using ': 0.0' as the value of the display variable.
At sun. AWT. x11graphicsenvironment. initdisplay (native method)
At sun. AWT. x11graphicsenvironment.
Check it online:"This error is caused by a chart.ProgramAWT is implemented through AWT. AWT will call the drawing of the local window resource of the o
Cause: first, the garbled problem between JFreeChart and the Chinese verification code is irrelevant to the jsp code. It is caused by the failure to find the font file on the Java VM. Therefore, the Chinese garbled problem of Swing or AWT of the same type is also applicable.Environment: first, the garbled problem between JFreeChart and the Chinese Verification Code has nothing to do with the jsp code, becau
2.1. Simple Bar Chart
First prepare the data for the histogram, the histogram must use Categorydataset, here we use Defaultcategorydataset.
DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(100,"Spring Security","Jan"); dataset.addValue(200,"jBPM 4","Jan"); dataset.addValue(300,"Ext JS","Jan"); dataset.addValue(400,"JFreeChart","Jan");
Each call to AddValue () adds a piece of data to the dataset, which appears to be a
This article describes the line chart effect implemented by the Jfreechart plug-in. Share to everyone for your reference, specific as follows:
Package Com.lei.jfreechart;
Import Javax.swing.JPanel;
Import Org.jfree.chart.ChartFactory;
Import Org.jfree.chart.ChartPanel;
Import Org.jfree.chart.JFreeChart;
Import Org.jfree.chart.axis.NumberAxis;
Import Org.jfree.chart.plot.CategoryPlot;
Import org.jfree.chart.plot.PlotOrientation;
Import Org.jfree.
This problem has been bothering me for a long time, today is a little to find a solution to the idea, in the online search a lot of cases, most of them are using servlets to achieve the drawing, by chance to find an illustration with the org.jfree.chart.servlet.ServletUtilities, To solve the image from backstage to the foreground method, the following is the source code.1. Create a Web project named Jfreechart in MyEclipse . Copy the jar package from
Requirements: A directory contains multiple TXT files, each TXT file saves one data per line, according to the data of each TXT file to generate a line chart, the y-axis of each row of data, the X-axis represents the first few lines.
A. Download the dependent Jar package first: Jfreechart-1.0.17.jar,jcommon-1.0.21.jar.
B. When you create a new Java project, you rely on the 2 jar packages.
C. Related Jfreechart
To analyze the performance of inserting massive data into the Cassandra Cluster or Oracle, that is, the insertion rate, we sampled the inserted data using a Java program, and finally plotted the sample results with Jfreechart.
For the sake of fairness, we did the following:
1. All the loop variables are placed outside the loop
2. For Cassandra, the Replication-factor setting is 1, so inserting the data does not require inserting additional backups.
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.