I. Demand Analysis My leaders believe that there should be a more scientific decision model on whether to marry me a wife. If you can quantify daily emotional life, you can provide data support for her decision with time to generate a data report. Based on the basic principles of leadership, this software has been developed to provide new ideas for family information construction. Second, the system summary The basic function of the system is to receive the user's daily input and save, the month / quarter / annual end chart, the cycle ring ratio. Since the investment is limited (not letting me pay for it, it is very good), so the Software version 1.0 uses a single-machine application, use the Access database. If the market promotion is good, it does not exclude the possibility of launching large FRP software (KIN RELATION MANAGE, family relationship management), HA (House Automatization, home automation), using a powerful J2EE framework Provide a complete solution for family information construction. The target picture effect generated by the program is as follows: 3. System Requirements 1, open source toolkit JFreeChart-1.0.0-pre1.jar and it you want to use the toolkit JCOMMON-1.0.0-pre1.jar download address: http: // SourceForge.Net/projects/jfreechart/2, a girlfriend one. Please prepare it yourself, not to provide the download below to tell how the system extracts data from the database and then generates a graphical report. (I finally entered the topic.) Data Sheet Structure: CURVE_ID Decoction Auto Growth Curve_OWNER VARCHAR (30) Distinguishing Is Old Public Data or Wife's Data CURVE_CENT DOUBLE CURVE_YEAR INT Year CURVE_MONTH INT Month INT Month INT NOT NOT NOTE TEXT Note For Package The value of a score is as follows:
package org.bromon.fiona.curve.dao; import java.util *;. public class CurveVo {private int year; private int month; private int day; private double cent; private String note; private String owner; // get / SET method ............}
The key code for generating pictures is as follows:
Package org.bromon.fiona.curve.util; // A large pile of import public class drawpic {/ ** * According to the time query data, encapsulate the obtained data into the TimeSeriesCollection object * TimeSeriesCollection is the object of the class defined in jfreechart * * This method will be called later DRAW method to call * @ param int to query which year * @ param int to query 1 month * @ Return TimeSeriescollection * / public TimeSeriescollection getData (int year, int month) {// fiona data collection The value of these value objects is stored in the database, and the relevant code is the most common JDBC content. Please complete the list DataOffiona = new arraylist (); // bromon data set List DataOfbromon = new arraylist (); // Configuration Object TimeSeriesCollection Result = New TimeSeriesCollection (); // These two objects respectively correspond to a curve, constructor parameters, will be displayed below the picture in the picture TimeSeries Fiona = New TimeSeries ("fiona"); TimeSeries Bromon = New TimeSeries ("bromon"); curvevo cv = null; // Traversing Fiona's data set, fill Fiona object for (int i = 0; i M "Month"; String Domain = "Time"; // X-axis String Range = "Score"; // Y-axis TimeSeriesCollection Data = this.getdata (Y, M); JFreeChart Chart = ChartFactory.createtimeSerieschart (Title, Domain , Range, Data, True, True, False; TextTitle Subtitle = New TextTitle (Subtitle, New Font ("Song", Font.Bold, 20); Chart.Addsubtitle (Subtitle); Chart.SetTitle (New TextTitle (Title New Font ("Song", Font.Italic, 20))); Chart.SetBackground (New GradientPaint (0, 0, Color.White, 0, 1000, Color.White)); C.SETTIME (New Date () ); String filename = "c: // pics //" y "" m ".jpg"; // Save as position try {file f = new file ("c: // pics"); if (! F.EXISTS ()) {f.mkdir ();} ChartUTILITIES.SAVECHARTASJPEG (New File (FileName), 100, CHART, 1000, 600); // Width 1000, High 600} catches (Exception E) {E.PrintStackTrace ();} Result = filename; returnrate;} // ok, test Public static void main (String args []) {new drawpic (). DRAW (2005, 3);}} Generates the related content of the ring-boring chart, and is released. JFreechart's drawing is very powerful, but the API's writing is very uncomfortable, and many elements are not easy. If there is a better API, I am very willing to use, of course, free is a very important premise.