ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter2/Test.java
Revision: 1.2
Committed: Sat Feb 3 19:14:37 2001 UTC (23 years, 9 months ago) by pjm2
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Test file no longer needed.

File Contents

# User Rev Content
1 pjm2 1.1 //---PACKAGE DECLARATION---
2    
3     //---IMPORTS---
4     import java.util.*;
5     import java.awt.image.*;
6    
7     public class Test {
8    
9     public static void main(String[] args){
10    
11     long endDate = DateUtils.startOfToday();
12     long startDate = DateUtils.subtractDays(endDate, 1);
13    
14     PlotData pd = new PlotData(startDate, endDate);
15    
16     pd.addPoint(startDate, 1);
17     pd.addPoint(startDate + 3600, 2);
18     pd.addPoint(startDate + 3600*2, 3);
19     pd.addPoint(startDate + 3600*3, 4);
20     pd.addPoint(startDate + 3600*3, 50);
21     pd.flushPoints();
22    
23     pd.scaleToFitX(SHTMLLayout.CHART_WIDTH, SHTMLLayout.CHART_HEIGHT);
24    
25     IscreamChart chart = new IscreamChart(startDate, endDate);
26    
27     BufferedImage img = chart.drawChart(pd, SHTMLLayout.CHART_WIDTH, SHTMLLayout.CHART_HEIGHT, 24, 10, 50);
28    
29     IscreamChartWriter imgWriter = new IscreamChartWriter();
30     imgWriter.writeChart(img, "test.gif");
31    
32    
33     }
34    
35     }