<%// HighLowPlot:%>
<%
// To generate a high-low plot or use error values in a plot,
// specify multiple columns on the PlotVariable(s) used in
// the plot. The first specified column is used for the
// variable's assigned roll, the second for the high values,
// and the third for the low values.
%>
<%@page import="com.sas.graphics.components.PlotVariable,
com.sas.graphics.components.PlotVariableList,
com.sas.graphics.components.ClassificationVariable,
javax.swing.table.DefaultTableModel,
com.sas.swing.models.TableModelAdapter,
com.sas.servlet.tbeans.graphics.html.LinePlot,
com.sas.graphics.components.lineplot.LinePlotTableDataModel"
%>
<%
// Create a line plot and data source
LinePlot linePlot = new LinePlot();
%>
<%@ include file="HighLowData.jsp" %>
<%
// Create a data model and attach the data source
LinePlotTableDataModel dataModel=
new LinePlotTableDataModel();
dataModel.setModel(dataTable);
// Create two PlotVariables with high and low values
dataModel.setXVariable(new PlotVariable("Month"));
dataModel.setYVariable(new PlotVariableList(
new PlotVariable[] {
new PlotVariable("Dow","#.00",null,"Dow Jones Composite"
, "Dow-high", "Dow High", "Dow-low", "Dow Low" )
, new PlotVariable("Nikkei-DOW","Best4.", null, "Nikkei-DOW"
, "Nikkei-high", "Nikkei High", "Nikkei-low", "Nikkei Low")
,new PlotVariable("U.K.-All Shares","#.00", null, "U.K.-All Shares"
, "U.K.-high", "U.K. High", "U.K.-low", "U.K. Low")
}));
dataModel.setColumnVariable(new ClassificationVariable("Year"));
// Turn on the line plot's interpolation and set its data model
linePlot.getGraphModel().setInterpolationEnabled(true);
linePlot.setDataModel(dataModel);
// Set graph titles and footnote
linePlot.getTitle1().setText(
"Market indices with low and high ranges") ;
linePlot.getTitle2().setText(
"Values are normalized based on Jan 4,1988 value") ;
linePlot.getFootnote1().setText(
"source: sashelp-Citibase daily indicaters");
// Set HTTP-specific response and request functionality
linePlot.setResponse(response);
linePlot.setRequest(request);
// Set a graph size and write the chart to the display
linePlot.setWidth(900);
linePlot.setHeight(450);
linePlot.write(out);
%>