TimeSeriesPlot STATBEAN®

Purpose: The time series graph maker displays horizontal or vertical line plots of a numeric column versus time.

Time Series Plot DataSource: any. 


Time Series Graph Maker Read/Write Properties
Name Type Description Possible Values Default Value
baseline double The base from which vertical lines extend in a vertical plot. Any double 0.0
connected boolean Whether the points should be connected with a line. true,false false
drawVertical boolean Whether to create a vertical time sequence plot. true,false false
points boolean Whether point symbols should be plotted. true,false true
referenceLine String Type of additional reference line, if any, to be added to the plot. "None",
referenceLineColor Color Color for drawing the reference line. Any valid color. Color.black
referenceLineLocation double Location of a horizontal or vertical reference line. Any double value. 0.0
samplingInterval double The length of time between consecutive data values. Any double > 0.0 1.0
smootherColor Color Color for drawing the smooth. Any valid color. Color.blue
smoothVariableName String The name of the column with smoothed data values. Any string. ""
startTime String The value of time associated with row 1. Any string resulting in the proper type of value. "1.0"
timeScale String The type of time units. "Year","Quarter","Month","Day",
timeSeriesVariableName String The name of the column with data values to be plotted. Any string. ""

Other properties used by the time series graph maker are inherited from the java.awt.Canvas class and from the general GraphicalStatbean class.

Code Sample 

//create a datasource bean 
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource(); 

//set the file name to be read 

//create a plot bean 
TimeSeriesPlot plot1 = new STATBEANS.TimeSeriesPlot(); 

//create an adjustment bean 
TimeSeriesAdjustments adjust1 = new STATBEANS.TimeSeriesAdjustments(); 
//take the logs of the time series data 


//smooth the adjusted data 
TimeSeriesSmoothing smooth1=new TimeSeriesSmoothing(); 
smooth1.setTimeSeriesVariableName("Adjusted Data"); 

//override the top title 
plot1.setTopTitleLine1("Plot of Stock Price Data"); 

//override the axis titles 

//set the variable names for plotting 
plot1.setTimeSeriesVariableName("Adjusted Data"); 
plot1.setSmoothVariableName("Smoothed Data"); 

//add the plot to the application frame 

//make the adjustment bean a listener for changes in the FileDataSource bean 

//make the smoothing bean a listener for changes in the adjustment bean 

//make the plot bean a listener for changes in the smoothing bean 

//instruct the fileDataSource bean to read the file