|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.AnalysisVariableList
public class AnalysisVariableList
AnalysisVariableList are used to form an ordered list of AnalysisVariables. Graphs support multiple data column associations on some of their variable roles. For example graphs allow multiple data columns to be associated with their Column and Row Variables via the graph's DataModel. Some graphs like the BarChart also support multiple data column associations on other graph variables roles (such as the ResponseVariable in this example) to enable better data comparisons.
You can chain AnalysisVariableList objects together via the "next" property.
Example
You can chain together the "ActualSales" and "PredictedSales" data columns by doing one of the following:
myVariable1 = new AnalysisVariableList(); myVariable1.setColumnName("ActualSales"); myVariable2 = new AnalysisVariableList(); myVariable2.setColumnName("PredictedSales"); myVariable1.setNext(myVariable2);
As a convenience the constructor supports constructing a list this same way as follows:
myVariable = new AnalysisVariableList( new String[]{"ActualSales","PredictedSales"});Example as applicable to a BarChart
BarChart barChart = new BarChart(); TableModel tableModel = myTableModel(); // <...set up tableModel...> BarChartTableDataModel barChartTableDataModel = new BarChartTableDataModel(tableModel); barChartTableDataModel.setResponseVariable(new AnalysisVariableList( new String[]{"ActualSales","PredictedSales"})); barChart.setDataModel( barChartTableDataModel );
Variable
,
VariableList
,
ClassificationVariable
,
ClassificationVariableList
,
AnalysisVariable
Constructor Summary | |
---|---|
AnalysisVariableList(AnalysisVariable[] variableArray)
Construct a list of VariableList objects whose properties and order are defined by the Variables in the array. |
|
AnalysisVariableList(int columnIndex,
java.lang.String format,
java.lang.String informat,
java.lang.String label,
int statistic,
AnalysisVariableList next)
|
|
AnalysisVariableList(java.lang.String[] columnNames)
Construct a list of VariableList objects designated by column name in the order provided. |
|
AnalysisVariableList(java.lang.String columnName,
java.lang.String format,
java.lang.String informat,
java.lang.String label,
int statistic,
AnalysisVariableList next)
Constructor designating data column by name. |
Method Summary | |
---|---|
AnalysisVariable[] |
asArray()
Provides a conversion into a Variable array. |
java.util.ArrayList |
asArrayList()
Provides a conversion into an ArrayList. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this AnalysisVariableList . |
AnalysisVariableList |
getNext()
Returns the next AnalysisVariableList in the list. |
int |
hashCode()
Computes the hash code for this AnalysisVariableList . |
java.util.Iterator |
iterator()
Provides an iterator to the list. |
Methods inherited from class com.sas.graphics.components.AnalysisVariable |
---|
getStatistic |
Methods inherited from class com.sas.graphics.components.RangeVariable |
---|
getHighColumnIndex, getHighColumnName, getHighLabel, getLowColumnIndex, getLowColumnName, getLowLabel, getTargetColumnIndex, getTargetColumnName, getTargetLabel |
Methods inherited from class com.sas.graphics.components.Variable |
---|
getCategorizationModel, getColumnIndex, getColumnName, getFormat, getInformat, getLabel, getSegmentedRangeStyle |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public AnalysisVariableList(java.lang.String columnName, java.lang.String format, java.lang.String informat, java.lang.String label, int statistic, AnalysisVariableList next)
columnName
- the name identifying the data columnformat
- the name of the SAS format applied
(by the graph) on the values found in
this variable's data columninformat
- the name of the SAS informat applied
(by the graph) on the values found in
this variable's data columnlabel
- the label the chart will display
via data tips, axis labels and legend labels
(where applicable)statistic
- the statistic to be applied to the
associated data values.next
- the next variable in the list
The supported informats are:
DATE5. - "ddMMM"
DATE7. - "ddMMMyy"
DATE9. - "ddMMMyyyy"
DATETIME13. - "ddMMMyy:HH:mm"
DATETIME16. - "ddMMMyy:HH:mm:ss"
DATETIME18. - "ddMMMyyyy:HH:mm:ss"
DATETIME20. - "ddMMMyy:HH:mm:ss.SSS"
DATETIME22. - "ddMMMyyyy:HH:mm:ss.SSS"
TIME5. - "HH:mm"
TIME8. - "HH:mm:ss""
TIME12. - "HH:mm:ss.SSS"
Valid statistic values are:
GraphConstants.STATISTIC_LAST
GraphConstants.STATISTIC_MEAN
GraphConstants.STATISTIC_FREQ
GraphConstants.STATISTIC_PERCENTAGE_FREQ
GraphConstants.STATISTIC_CUMULATIVE_FREQ
GraphConstants.STATISTIC_CUMULATIVE_PERCENTAGE_FREQ
GraphConstants.STATISTIC_SUM
GraphConstants.STATISTIC_PERCENTAGE_SUM
GraphConstants.STATISTIC_CUMULATIVE_SUM
GraphConstants.STATISTIC_CUMULATIVE_PERCENTAGE_SUM
GraphConstants.STATISTIC_MIN
GraphConstants.STATISTIC_MAX
GraphConstants.STATISTIC_FIRST
public AnalysisVariableList(int columnIndex, java.lang.String format, java.lang.String informat, java.lang.String label, int statistic, AnalysisVariableList next)
public AnalysisVariableList(java.lang.String[] columnNames)
columnNames
- the column namespublic AnalysisVariableList(AnalysisVariable[] variableArray)
variableArray
- the array of variablesMethod Detail |
---|
public AnalysisVariableList getNext()
public AnalysisVariable[] asArray()
public java.util.ArrayList asArrayList()
ArrayList
public java.util.Iterator iterator()
remove
method will not have any affect
on the list.
public boolean equals(java.lang.Object obj)
AnalysisVariableList
.
The result is true
if and only if the argument is not
null
and is a AnalysisVariableList
object that has the same
property values as this object.
equals
in class AnalysisVariable
obj
- the object to test for equality with this
AnalysisVariableList
true
if the objects are the same;
false
otherwise.public int hashCode()
AnalysisVariableList
.
hashCode
in class AnalysisVariable
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |