com.sas.graphics.components.linechart
Class LineChartModel

com.sas.graphics.components.linechart.LineChartModel

public class LineChartModel

A LineChartModel encapsulates most of a LineChart's visual display properties. This contrasts with the LineChart's data model, which determines the number and organization of data elements (markers and lines) and the use of axes and a legend.

A LineChartModel contains LineChart-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its axes and legends.

A LineChartModel does not allow null values for properties in its contained models. Passing a null parameter to the set method for a contained model property results in an IllegalArgumentException. Guaranteeing non-null properties for a contained model simplifies access to the display properties and ensures that the LineChart's display state is unambiguous.

Topics:
Plot Markers
Display Properties
Interpolation Lines
Line Styles
Filled Areas
Behavior
Samples:
Swing-based Samples
Servlet-based Samples

Since:
SAS 9.1
See Also:
Graph, GraphStyle, LineChart

Constructor Summary
LineChartModel()
          Constructs a LineChartModel which is assigned to a LineChart to define most of the display properties.
 
Method Summary
 void apply(LineChartModel theOtherModel)
          Utility method to convey properties contained in "theOtherModel" to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this LineChartModel.
 AxisWallModel getAxisWallModel()
          Returns the model that encapsulates the axis wall display properties.
 AxisModel getCategoryAxisModel()
          Returns the model that encapsulates the display properties for the category (or independent) axis.
 int getColorPaletteType()
          Returns how the values of a numeric styleBy varaible are mapped to a corresponding color representation.
 GraphMatrixAxisModel getColumnAxisModel()
          Returns the Graph's column axis model, which contains axis' appearance preferences.
 LegendModel getLegendModel()
          Returns the model that encapsulates the display properties for the legend.
 int getMissingPolicy()
          Returns the graph behavior for displaying missing values.
 int getOutsideMarkerLabelContent()
          Returns the type of textual information to be displayed above the line's vertices.
 AdvancedTextStyle getOutsideMarkerLabelTextStyle()
          Returns the display appearance model that is applied to the display value appearing above a line vertex.
 ReferenceLineModel getResponse2AxisBaselineModel()
          Returns the position and display attributes of the response2Varaible bar's baseline to control where the base of the bar originates from.
 double getResponse2AxisLowerThreshold()
          Returns the lower threshold value of the response2 axis (any Double.NaN means no threshold).
 AxisModel getResponse2AxisModel()
          Returns the model that encapsulates the display properties for the response2 axis.
 double getResponse2AxisUpperThreshold()
          Returns the upper threshold value of the response2 axis (any Double.NaN means no threshold).
 ReferenceLineModel getResponseAxisBaselineModel()
          Returns the position and display attributes of the responseVaraible bar's baseline to control where the base of the bar originates from.
 double getResponseAxisLowerThreshold()
          Returns the lower threshold value of the response axis (any Double.NaN means no threshold).
 AxisModel getResponseAxisModel()
          Returns the model that encapsulates the display properties for the response axis.
 double getResponseAxisUpperThreshold()
          Returns the upper threshold value of the response axis (any Double.NaN means no threshold).
 GraphMatrixAxisModel getRowAxisModel()
          Returns the Graph's row axis model, which contains axis' appearance preferences.
 int getSkin()
          Get the style used to modify the displayed markers.
 int getStackLinePolicy()
          Returns whether or not the line elements stack when subgrouped and/or when multiple variables are applied.
 int getUniformPolicy()
          Returns whether or not the set of category axis values are forced to be uniform (i.e. the same) between all cells (GraphConstants.TRUE), uniform within the cells of each column (GraphConstants.AUTOMATIC) or not uniform (GraphConstants.FALSE).
 int hashCode()
          Computes the hash code for this LineChartModel.
 boolean isFillAreaEnabled()
          Returns whether or not the area between the line and the baseline is filled.
 boolean isInterpolationEnabled()
          Returns whether or not the MarkerStyle interpolation will be used to connect the line vertices.
 boolean isMarkerEnabled()
          Returns true if the markers are displayed, false if not.
 boolean isMissingResponseEnabled()
          Returns the graph behavior for displaying missing response values.
 boolean isSkipMissing()
          Returns whether or not the line breaks when a response with a missing value is encountered.
 boolean isUniformEnabled()
          Returns whether or not the category axis values are identical between all cells.
 void setAxisWallModel(AxisWallModel newAxisWallModel)
          Sets the model that encapsulates the display properties for the axis wall.
 void setCategoryAxisModel(AxisModel newAxisModel)
          Sets the model that encapsulates the display properties for the category (or independent) axis.
 void setColorPaletteType(int newColorPaletteType)
          Sets how the values of a numeric styleBy varaible are mapped to a corresponding color representation.
 void setColumnAxisModel(GraphMatrixAxisModel newAxisModel)
          Set the Graph's column axis model, which contains axis's appearance preferences.
 void setFillAreaEnabled(boolean newFillAreaEnabled)
          Sets whether or not the area between the line and the baseline is filled.
 void setInterpolationEnabled(boolean newInterpolationEnabled)
          Sets whether or not vertices are connected with a visible line.
 void setLegendModel(LegendModel newLegendModel)
          Sets the model that encapsulates the display properties for the legend.
 void setMarkerEnabled(boolean newMarkerEnabled)
          Sets whether or not to display markers at the line vertices.
 void setMissingPolicy(int newMissing)
          Sets the graph behavior for displaying missing values.
 void setMissingResponseEnabled(boolean newMissingEnabled)
          Sets the graph behavior for displaying missing response values (the default is false).
 void setOutsideMarkerLabelContent(int newContent)
          Sets the type of textual information to be displayed above the line's vertices.
 void setOutsideMarkerLabelTextStyle(AdvancedTextStyle newTextStyle)
          Sets the display appearance model that is applied to the display value appearing above a line vertex.
 void setResponse2AxisBaselineModel(ReferenceLineModel newBaselineModel)
          Set the position and display attributes of the response2Varaible bar's baseline to control where the base of the bar originates from.
 void setResponse2AxisLowerThreshold(double newThreshold)
          Sets the lower threshold value on the response2 axis causing the response2 elements to change the fill style extending (starting from the baseline) beyond this value.
 void setResponse2AxisModel(AxisModel newAxisModel)
          Sets the model that encapsulates the display properties for the response2 axis.
 void setResponse2AxisUpperThreshold(double newThreshold)
          Sets the upper threshold value on the response2 axis causing the response2 elements to change the fill style extending (starting from the baseline) beyond this value.
 void setResponseAxisBaselineModel(ReferenceLineModel newBaselineModel)
          Set the position and display attributes of the responseVaraible bar's baseline to control where the base of the bar originates from.
 void setResponseAxisLowerThreshold(double newThreshold)
          Sets the lower threshold value on the response axis causing the line elements to change the fill style extending (starting from the baseline) beyond this value.
 void setResponseAxisModel(AxisModel newAxisModel)
          Sets the model that encapsulates the display properties for the response axis.
 void setResponseAxisUpperThreshold(double newThreshold)
          Sets the upper threshold value on the response axis causing the line elements to change the fill style extending (starting from the baseline) beyond this value.
 void setRowAxisModel(GraphMatrixAxisModel newAxisModel)
          Set the Graph's row axis model, which contains axis's appearance preferences.
 void setSkin(int newSkin)
          Set the style of skin to modify the marker appearance.
 void setSkipMissing(boolean newSkipMissing)
          Sets whether or not a line break should appear when a missing response value is encountered.
 void setStackLinePolicy(int newStackLinePolicy)
          Sets whether or not to stack the line elements.
 void setUniformEnabled(boolean newUniformEnabled)
          Sets whether or not the category axis values are identical between all cells.
 void setUniformPolicy(int newUniformPolicy)
          Sets whether or not the set of category axis values are forced to be uniform (i.e. the same) between all cells (GraphConstants.TRUE), uniform within the cells of each column (GraphConstants.AUTOMATIC) or not forced at all (GraphConstants.FALSE).
 
Methods inherited from class com.sas.graphics.components.GraphModel
apply, getBackgroundFillStyle, getBrushModel, getDataElementStyles, getDataTipModel, getFrameLineStyle, getLogo, getLogoJustification, isAntialiasedGraphics, isAntialiasedText, setAntialiasedGraphics, setAntialiasedText, setBackgroundFillStyle, setBrushModel, setDataElementStyles, setDataTipModel, setFrameLineStyle, setLogo, setLogoJustification
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

LineChartModel

public LineChartModel()
Constructs a LineChartModel which is assigned to a LineChart to define most of the display properties.

Method Detail

apply

public void apply(LineChartModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object.
Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

Parameters:
theOtherModel - properties applied to this instance

equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this LineChartModel.

The result is true if and only if the argument is not null and is a LineChartModel object that has the same property values as this object.

Overrides:
equals in class GraphModel
Parameters:
obj - the object to test for equality with this LineChartModel
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this LineChartModel.

Overrides:
hashCode in class GraphModel
Returns:
a hash code value for this object.

setRowAxisModel

public void setRowAxisModel(GraphMatrixAxisModel newAxisModel)
                     throws java.lang.IllegalArgumentException
Set the Graph's row axis model, which contains axis's appearance preferences. The row axis appears when the Graph's "Row" variable is assigned to a valid data column. The row Axis manages groups of rows.

Parameters:
newAxisModel - row axis display attributes
Throws:
java.lang.IllegalArgumentException - if newAxisModel is null.
See Also:
getRowAxisModel(), GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)

getRowAxisModel

public GraphMatrixAxisModel getRowAxisModel()
Returns the Graph's row axis model, which contains axis' appearance preferences. The row axis appears when the Graph's "Row" variable is assigned to a valid data column. The row Axis manages groups of rows.

Returns:
GraphMatrixAxisModel
See Also:
setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel), getColumnAxisModel()

setColumnAxisModel

public void setColumnAxisModel(GraphMatrixAxisModel newAxisModel)
                        throws java.lang.IllegalArgumentException
Set the Graph's column axis model, which contains axis's appearance preferences. The column axis appears when the Graph's "Column" variable is assigned to a valid data column. The column Axis manages groups of columns.

Parameters:
newAxisModel - the column axis display attributes
Throws:
java.lang.IllegalArgumentException - if newAxisModel is null.
See Also:
getColumnAxisModel(), GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)

getColumnAxisModel

public GraphMatrixAxisModel getColumnAxisModel()
Returns the Graph's column axis model, which contains axis' appearance preferences. The column axis appears when the Graph's "Column" variable is assigned to a valid data column. The column Axis manages groups of columns.

Returns:
GraphMatrixAxisModel
See Also:
setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel), getRowAxisModel()

setResponseAxisModel

public void setResponseAxisModel(AxisModel newAxisModel)
                          throws java.lang.IllegalArgumentException
Sets the model that encapsulates the display properties for the response axis. The response axis (or dependent axis) is used to reference the position of the line vertices.

Parameters:
newAxisModel - a model that encapsulates axis display properties.
Throws:
java.lang.IllegalArgumentException - if newAxisModel is null.
See Also:
getResponseAxisModel(), setResponse2AxisModel(com.sas.graphics.components.AxisModel)

getResponseAxisModel

public AxisModel getResponseAxisModel()
Returns the model that encapsulates the display properties for the response axis.

Returns:
the axis model that encapsulates the display properties for the response axis
See Also:
setResponseAxisModel(com.sas.graphics.components.AxisModel), getResponse2AxisModel()

setResponse2AxisModel

public void setResponse2AxisModel(AxisModel newAxisModel)
                           throws java.lang.IllegalArgumentException
Sets the model that encapsulates the display properties for the response2 axis. The response2 axis (a second dependent axis) is used to reference the position of the line vertices generated from response2 variables (see BarLineChartTableDataModel). The response2 axis is not visible unless it has associated lines.

Parameters:
newAxisModel - a model that encapsulates axis display properties.
Throws:
java.lang.IllegalArgumentException - if newAxisModel is null.
See Also:
getResponse2AxisModel(), setResponseAxisModel(com.sas.graphics.components.AxisModel), AxisModel.apply(com.sas.graphics.components.AxisModel)

getResponse2AxisModel

public AxisModel getResponse2AxisModel()
Returns the model that encapsulates the display properties for the response2 axis.

Returns:
the axis model that encapsulates the display properties for the response2 axis
See Also:
setResponse2AxisModel(com.sas.graphics.components.AxisModel), getResponseAxisModel()

setCategoryAxisModel

public void setCategoryAxisModel(AxisModel newAxisModel)
                          throws java.lang.IllegalArgumentException
Sets the model that encapsulates the display properties for the category (or independent) axis. The values defined by the categoryVariable role in the LineChartTableDatamodel are displayed on the category axis. The 1st dimension on the OLAP data's column axis is displayed on the LineChart's category axis (by default, see the LineChartOLAPDataModel for additional options).

Parameters:
newAxisModel - a model that encapsulates axis display properties.
Throws:
java.lang.IllegalArgumentException - if newAxisModel is null.
See Also:
getCategoryAxisModel(), AxisModel.apply(com.sas.graphics.components.AxisModel)

getCategoryAxisModel

public AxisModel getCategoryAxisModel()
Returns the model that encapsulates the display properties for the category (or independent) axis.

Returns:
the axis model that encapsulates the display properties for the category (or independent) axis.
See Also:
setCategoryAxisModel(com.sas.graphics.components.AxisModel)

setAxisWallModel

public void setAxisWallModel(AxisWallModel newAxisWallModel)
                      throws java.lang.IllegalArgumentException
Sets the model that encapsulates the display properties for the axis wall. The axis wall appears in the area between the response and category axis.

Parameters:
newAxisWallModel - a model that encapsulates axis wall display properties.
Throws:
java.lang.IllegalArgumentException - if newAxisWallModel is null.
See Also:
getAxisWallModel(), AxisWallModel.apply(com.sas.graphics.components.AxisWallModel)

getAxisWallModel

public AxisWallModel getAxisWallModel()
Returns the model that encapsulates the axis wall display properties.

Returns:
the axis wall model that encapsulates the display properties for the area between the response and category axes.
See Also:
setAxisWallModel(com.sas.graphics.components.AxisWallModel)

setLegendModel

public void setLegendModel(LegendModel newLegendModel)
                    throws java.lang.IllegalArgumentException
Sets the model that encapsulates the display properties for the legend. If the graph is displaying subgrouped lines then each fill style represents a different subgroup value. The subgroupVariable role in the LineChartTableDataModel can be used to define the subgroup values.
If the graph is displaying multiple responses (and no subgrouped lines) then the legend entry represents each different data column (or measure if using OLAP data).

The legend displays the association between fill style and data value, data column or measure.

Parameters:
newLegendModel - a model that encapsulates legend display properties.
Throws:
java.lang.IllegalArgumentException - if newLegendModel is null.
See Also:
getLegendModel(), LegendModel.apply(com.sas.graphics.components.LegendModel), LineChartTableDataModel.setSubgroupVariable(com.sas.graphics.components.ClassificationVariable), LineChartOLAPDataModel

getLegendModel

public LegendModel getLegendModel()
Returns the model that encapsulates the display properties for the legend.

Returns:
the legend model that encapsulates the display properties for the legend.
See Also:
setLegendModel(com.sas.graphics.components.LegendModel)

setResponseAxisUpperThreshold

public void setResponseAxisUpperThreshold(double newThreshold)
Sets the upper threshold value on the response axis causing the line elements to change the fill style extending (starting from the baseline) beyond this value. The Default value is Double.POSITIVE_INFINITY (meaning no threshold). The threshold value is only valid if the value is not a Double.NaN and is greater than the baseline. This value does not affect the response axis range.

Parameters:
newThreshold - the upper threshold value on the response axis
See Also:
getResponseAxisUpperThreshold(), setResponseAxisLowerThreshold(double), setResponse2AxisUpperThreshold(double)

getResponseAxisUpperThreshold

public double getResponseAxisUpperThreshold()
Returns the upper threshold value of the response axis (any Double.NaN means no threshold).

Returns:
the upper threshold value on the response axis
See Also:
setResponseAxisUpperThreshold(double), getResponse2AxisUpperThreshold()

setResponseAxisLowerThreshold

public void setResponseAxisLowerThreshold(double newThreshold)
Sets the lower threshold value on the response axis causing the line elements to change the fill style extending (starting from the baseline) beyond this value. The Default value is Double.NEGATIVE_INFINITY (meaning no threshold). The threshold value is only valid if the value is not a Double.NaN and is less than the baseline. This value does not affect the response axis range.

Parameters:
newThreshold - the lower threshold value on the response axis
See Also:
getResponseAxisLowerThreshold(), setResponseAxisUpperThreshold(double), setResponse2AxisLowerThreshold(double)

getResponseAxisLowerThreshold

public double getResponseAxisLowerThreshold()
Returns the lower threshold value of the response axis (any Double.NaN means no threshold).

Returns:
the responseVariable response axis' lower threshold value
See Also:
setResponseAxisLowerThreshold(double), getResponse2AxisLowerThreshold()

setResponse2AxisUpperThreshold

public void setResponse2AxisUpperThreshold(double newThreshold)
Sets the upper threshold value on the response2 axis causing the response2 elements to change the fill style extending (starting from the baseline) beyond this value. The Default value is Double.POSITIVE_INFINITY (meaning no threshold). The threshold value is only valid if the value is not a Double.NaN and is greater than the baseline. This value does not affect the response axis range.

Parameters:
newThreshold - the value of the threshold
See Also:
getResponse2AxisUpperThreshold(), setResponseAxisUpperThreshold(double)

getResponse2AxisUpperThreshold

public double getResponse2AxisUpperThreshold()
Returns the upper threshold value of the response2 axis (any Double.NaN means no threshold).

Returns:
the response2Variable upper threshold value
See Also:
setResponse2AxisUpperThreshold(double), getResponseAxisUpperThreshold()

setResponse2AxisLowerThreshold

public void setResponse2AxisLowerThreshold(double newThreshold)
Sets the lower threshold value on the response2 axis causing the response2 elements to change the fill style extending (starting from the baseline) beyond this value. The Default value is Double.POSITIVE_INFINITY (meaning no threshold). The threshold value is only valid if the value is not a Double.NaN and is greater than the baseline. This value does not affect the response axis range.

Parameters:
newThreshold - the value of the threshold
See Also:
getResponse2AxisLowerThreshold(), setResponseAxisLowerThreshold(double)

getResponse2AxisLowerThreshold

public double getResponse2AxisLowerThreshold()
Returns the lower threshold value of the response2 axis (any Double.NaN means no threshold).

Returns:
the response2Variable response axis' lower threshold value
See Also:
setResponse2AxisLowerThreshold(double), getResponseAxisLowerThreshold()

setResponseAxisBaselineModel

public void setResponseAxisBaselineModel(ReferenceLineModel newBaselineModel)
                                  throws java.lang.IllegalArgumentException
Set the position and display attributes of the responseVaraible bar's baseline to control where the base of the bar originates from. Note: This baseline position only pertains to bars displaying values from the responseVariable values and is only applicable if the bars are not stacked. When stacked the baseline position is always 0.

Parameters:
newBaselineModel - the baseline model for the responseVariable bar(s)
Throws:
java.lang.IllegalArgumentException - if newBaselineModel is null.
See Also:
getResponseAxisBaselineModel(), setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)

getResponseAxisBaselineModel

public ReferenceLineModel getResponseAxisBaselineModel()
Returns the position and display attributes of the responseVaraible bar's baseline to control where the base of the bar originates from. Note: This baseline position only pertains to bars displaying values from the responseVariable values and is only applicable iff the bars are not stacked. When stacked the baseline position is always 0.

Returns:
the baseline model for the responseVariable bar(s)
See Also:
setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel), setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)

setResponse2AxisBaselineModel

public void setResponse2AxisBaselineModel(ReferenceLineModel newBaselineModel)
                                   throws java.lang.IllegalArgumentException
Set the position and display attributes of the response2Varaible bar's baseline to control where the base of the bar originates from. Note: This baseline position only pertains to bars displaying values from the response2Variable values and is only applicable iff the bars are not stacked. When stacked the baseline position is always 0.

Parameters:
newBaselineModel - the baseline model for the response2Variable bar(s)
Throws:
java.lang.IllegalArgumentException - if newBaselineModel is null.
See Also:
getResponse2AxisBaselineModel(), setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)

getResponse2AxisBaselineModel

public ReferenceLineModel getResponse2AxisBaselineModel()
Returns the position and display attributes of the response2Varaible bar's baseline to control where the base of the bar originates from. Note: This baseline position only pertains to bars displaying values from the response2Variable values and is only applicable if the bars are not stacked. When stacked the baseline position is always 0.

Returns:
the baseline model for the response2Variable bar(s)
See Also:
setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel), setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)

setStackLinePolicy

public void setStackLinePolicy(int newStackLinePolicy)
Sets whether or not to stack the line elements. Valid values are:
 GraphConstants.AUTOMATIC
 GraphConstants.TRUE
 GraphConstants.FALSE
 

The default value is GraphConstants.AUTOMATIC. The LineChart's GraphConstants.AUTOMATIC behavior is to not stack lines.

If a subgroupVariable has been assigned then GraphConstants.TRUE would stack the subgroup lines. If multiple responseVariables or multiple response2Variables have been assigned then GraphConstants.TRUE would stack the multiple response lines. Note: If a subgroupVariable and more than one response variable has been specified (i.e. sum of the responseVariables and response2Variables assignments is greater than 1) then only the subgrouped lines would be stacked. This is similar to that of the BarChart's behavior but it is not forced (that is, there are no variable combinations that force the lines to stack).

For example:

 LineChartTableDataModel dataModel = new LineChartTableDataModel();
 dataModel.setCategoryVariable(new ClassificationVariableList("Products"));
 dataModel.setResponseVariable(new AnalysisVariableList(new String[]{"SalesA","SalesB","SalesC"}));
 LineChart lineChart = new LineChart(dataModel);
 lineChart.getGraphModel().setStackLinePolicy(GraphConstants.TRUE)
 
In this case the SalesA, SalesB and SalesC line vertices would stack on top of each other. If "dataModel.setResponse2Variable(new AnalysisVariableList(new String[]{"PreSalesA","PreSalesB","PreSalesC"}));" were added then PreSalesA, PreSalesB and PreSalesC lines would stack on each other (but Sales and PreSales lines would not stack on each other.

Parameters:
newStackLinePolicy - the line stacking preference
Throws:
java.lang.IllegalArgumentException - if an invalid value is specified
See Also:
getStackLinePolicy()

getStackLinePolicy

public int getStackLinePolicy()
Returns whether or not the line elements stack when subgrouped and/or when multiple variables are applied.

Returns:
the line stack preference
See Also:
setStackLinePolicy(int)

setMarkerEnabled

public void setMarkerEnabled(boolean newMarkerEnabled)
Sets whether or not to display markers at the line vertices. The default value is true. Marker properties are stored in the DataElementStyles's MarkerStyles list property.

Parameters:
newMarkerEnabled - true to show the markers.
See Also:
isMarkerEnabled(), DataElementStyles.getMarkerStyles(), MarkerStyle

isMarkerEnabled

public boolean isMarkerEnabled()
Returns true if the markers are displayed, false if not.

Returns:
true if markers are displayed.
See Also:
setMarkerEnabled(boolean)

setSkipMissing

public void setSkipMissing(boolean newSkipMissing)
Sets whether or not a line break should appear when a missing response value is encountered. The MissingResponseEnabled property must be set to true for this property to be applicable. The default value is false.

Parameters:
newSkipMissing - true indicates that line breaks are desired when missing response values are encountered
See Also:
isSkipMissing(), setMissingResponseEnabled(boolean)

isSkipMissing

public boolean isSkipMissing()
Returns whether or not the line breaks when a response with a missing value is encountered.

Returns:
true if the line breaks when a missing response value is encountered
See Also:
setSkipMissing(boolean)

setInterpolationEnabled

public void setInterpolationEnabled(boolean newInterpolationEnabled)
Sets whether or not vertices are connected with a visible line. The default value is false. If the interpolation is enabled (i.e. set to true) then the LineChart will perform the interpolation defined in the associated MarkerStyle to connect the vertices. If the interpolation is not enabled then the vertices will be connected by straight lines (i.e. the same as interpolation==MarkerStyle.INTERPOLATION_STRAIGHT). Note that this behavior is different then applying MarkerStyle.INTERPOLATION_NONE.

Parameters:
newInterpolationEnabled - true enables the MarkerStyle interpolations
See Also:
isInterpolationEnabled(), DataElementStyles.getMarkerStyles(), MarkerStyle.setInterpolation(int)

isInterpolationEnabled

public boolean isInterpolationEnabled()
Returns whether or not the MarkerStyle interpolation will be used to connect the line vertices. Returns true if the interpolations between the markers are enabled.

Returns:
true if interpolations are displayed.
See Also:
setInterpolationEnabled(boolean)

setFillAreaEnabled

public void setFillAreaEnabled(boolean newFillAreaEnabled)
Sets whether or not the area between the line and the baseline is filled.

Parameters:
newFillAreaEnabled - set whether or not the area between the line and the baseline is filled.
See Also:
isFillAreaEnabled()

isFillAreaEnabled

public boolean isFillAreaEnabled()
Returns whether or not the area between the line and the baseline is filled.

Returns:
the line stack preference
See Also:
setFillAreaEnabled(boolean)

setUniformEnabled

public void setUniformEnabled(boolean newUniformEnabled)
Sets whether or not the category axis values are identical between all cells. Note: If uniformEnabled is true and more than one cell is displayed then there are some limitation placed on sorting the category axis. For one the values can only be sorted by the category values (not by the response value or other data). This is to preserve a uniform appearance between all cells.

Parameters:
newUniformEnabled - The uniformEnabled to set
See Also:
isUniformEnabled()

isUniformEnabled

public boolean isUniformEnabled()
Returns whether or not the category axis values are identical between all cells.

Returns:
boolean whether or not the category axis values are identical between all cells.
See Also:
setUniformEnabled(boolean)

setUniformPolicy

public void setUniformPolicy(int newUniformPolicy)
                      throws java.lang.IllegalArgumentException
Sets whether or not the set of category axis values are forced to be uniform (i.e. the same) between all cells (GraphConstants.TRUE), uniform within the cells of each column (GraphConstants.AUTOMATIC) or not forced at all (GraphConstants.FALSE).
Valid values are:
Note: There are some limitation placed on sorting the category axis if forced to be uniform. One limitation is that the values can only be sorted by the category values (not by the response or other data column) because to do otherwise suggests inconsistent category axis value ordering between cells.

Similarly, if the category axis value sort is not based upon the category axis values then GraphConstants.AUTOMATIC will perform the same as GraphConstants.FALSE. Otherwise it will ensure that the category axis values are uniform between cells for a given column if the orientation is vertical. If the orientation is horizontl then it will ensure that the category axis values are uniform within a given row.

Special note:
The following String values are interpreted as missing values:


The following Number values are interpreted as missing values:

Parameters:
newUniformPolicy - defines category axis uniformity
Throws:
java.lang.IllegalArgumentException - if newUniformPolicy is invalid.
See Also:
getUniformPolicy()

getUniformPolicy

public int getUniformPolicy()
Returns whether or not the set of category axis values are forced to be uniform (i.e. the same) between all cells (GraphConstants.TRUE), uniform within the cells of each column (GraphConstants.AUTOMATIC) or not uniform (GraphConstants.FALSE).

Returns:
the category axis uniformity behavior
See Also:
setUniformPolicy(int)

setMissingResponseEnabled

public void setMissingResponseEnabled(boolean newMissingEnabled)
Sets the graph behavior for displaying missing response values (the default is false). (Similar to setMissingPolicy but this is the behavior applied to missing response values.)

Note: missing response values (Ex. com.sas.MissingValues.Dot ) obviously do not have a representable response and as such no symbol will be produced. However this option is available to control whether or not the classification values associated with missing response values are represented in the graph. For instance if you have categories "A", "B" and "C" with associated response vaues 5, 10 and MissingValues.Dot then the resulting graph would display a cateogry axis with "A" and "B". If you set the missingResponseEnabled to true then "C" will also appear in the graph (however "C" will not display an associated symbol).

Subgroup values with associated missing values are not assigned a display attribues (colors, symbols) etc unless the missingResponseEnabled proeprty is set to true. This mechanism may be useful in controling display attribute mapping between graphs via data values embedded in the data source.

Special note:
The following String values are interpreted as missing values:


The following Number values are interpreted as missing values:

Parameters:
newMissingEnabled - true means represent missing response values in the graph
See Also:
isMissingResponseEnabled()

isMissingResponseEnabled

public boolean isMissingResponseEnabled()
Returns the graph behavior for displaying missing response values.

Returns:
whether or not missing response values are represented in the graph
See Also:
setMissingResponseEnabled(boolean)

setMissingPolicy

public void setMissingPolicy(int newMissing)
                      throws java.lang.IllegalArgumentException
Sets the graph behavior for displaying missing values. (Similar to the server side "missing" statement in proc gchart.)
Valid values are:
GraphConstants.AUTOMATIC is the same as the server side proc gchart default (which is to display all classification variable missing values except category).
GraphConstants.TRUE is the same as the server side gchart behavior with the "missing" statement (which is to display all classification variable missing values (including category)).
GraphConstants.FALSE means don't display any classification variable missing values. Special note:
The following String values are interpreted as missing values:


The following Number values are interpreted as missing values:

Throws:
java.lang.IllegalArgumentException - if newMissing is invalid.
See Also:
getMissingPolicy()

getMissingPolicy

public int getMissingPolicy()
Returns the graph behavior for displaying missing values.

Returns:
how to display classification variable missing values.
See Also:
setMissingPolicy(int)

setOutsideMarkerLabelContent

public void setOutsideMarkerLabelContent(int newContent)
Sets the type of textual information to be displayed above the line's vertices. Valid values are :

Parameters:
newContent - the type of textual information to be displayed above the line's vertices.
Throws:
java.lang.IllegalArgumentException - if an invalid parameter value is specified.
See Also:
getOutsideMarkerLabelContent()

getOutsideMarkerLabelContent

public int getOutsideMarkerLabelContent()
Returns the type of textual information to be displayed above the line's vertices.

Returns:
the type of textual information to be displayed above the line's vertices
See Also:
setOutsideMarkerLabelContent(int)

setOutsideMarkerLabelTextStyle

public void setOutsideMarkerLabelTextStyle(AdvancedTextStyle newTextStyle)
                                    throws java.lang.IllegalArgumentException
Sets the display appearance model that is applied to the display value appearing above a line vertex.

Parameters:
newTextStyle - encapsulates the display properties for the display values above a line vertex
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getOutsideMarkerLabelTextStyle(), AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)

getOutsideMarkerLabelTextStyle

public AdvancedTextStyle getOutsideMarkerLabelTextStyle()
Returns the display appearance model that is applied to the display value appearing above a line vertex.

Returns:
display attributes for the value above the line vertex
See Also:
setOutsideMarkerLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)

setColorPaletteType

public void setColorPaletteType(int newColorPaletteType)
                         throws java.lang.IllegalArgumentException
Sets how the values of a numeric styleBy varaible are mapped to a corresponding color representation.
Valid values are:
To explain this mapping it is necessary to understand the graph's resulting "min" "max" and "baseline" values (i.e. the min, max and baseline values pertaining to the styleBy variable values). The LegendModel has 4 properties {minimum, maximum, baseline, symmetricEnabled} that can affect the graph's resulting min, max and baseline values. Typically the LegendModel's minimum and maximum values (default of Double.NaN) are not be specified and result in the graph computing the resulting min and max values from the styleBy variable data. However if the LegendModel's minimum and maximum values are specified then they override the graph's computed min and max values. Specifying a maximum or maximum on the LegendModel has the inherent risk of improperly defining the data range (i.e. this specified range not encompassing the styleBy variables data range). If this happens the specified range is still honored by the legend and any data values that extend beyond the specified range are colored by that color value mapped to the boundary which was breeched. For example if a user defined max value of 100 was specified then any data values greater than 100 would be mapped to the the same color as 100.
Note: a warning message is when rendering if on the LegendModel :
  • the minimum is specified and baseline is less than minimum
  • the maximum is specified and baseline is greater than maximum
  • the maximum is specified less than minimum

The LegendModel's baseline value (default of 0.0) is treated somewhat differently from maximum and minimum in determing the graph's resulting min/max range. The LegendModel's baseline value is treated as if it were a data value when the graph is computing its resulting min and max values. If the LegendModel's baseline value is set to Double.NaN then the graph's resulting baseline value is computed to be the midpoint of the resulting min/max range. Note: The LegendModel's baseline value may only affect the graphs resulting maximum if LegendModel's maximum has not been specified. Likewise baseline may affect the graphs resulting minimum if minimum has not been specified.
The LegendModel's symetricEnabled value (default of false) is only applicable when maximum and minimum have not been specified and baseline has been specified. If symmetricEnabled is true then the graph's computed min/max range will encompass the data range and be symetric about the baseline.

Applying colors to the resulting range:

A value of GraphConstants.COLOR_PALETTE_TWO_COLOR_CONTINUOUS indicates that the DataElementStyles' continuousFillTwoColor values are applied gradating the colors from min to max.

A value of GraphConstants.COLOR_PALETTE_TWO_COLOR_DISCRETE indicates that the DataElementStyles' continuousFillTwoColor values are applied. Any value falling between min and baseline (not including baseline) are mapped to DataElementStyles' continuousFillTwoColorStartColor color. Values falling between the baseline (including the baseline) and max are colored DataElementStyles' continuousFillTwoColorEndColor.

A value of GraphConstants.COLOR_PALETTE_THREE_COLOR_CONTINUOUS indicates that the DataElementStyles' continuousFillThreeColor values are applied gradating between the start and neutral colors from min to baseline and then gradate between the neutral and end colors from baseline to max.

A value of GraphConstants.COLOR_PALETTE_THREE_COLOR_DISCRETE indicates that the DataElementStyles' continuousFillThreeColor values are applied. Any value falling between min and baseline (not including baseline) are mapped to DataElementStyles' continuousFillThreeColorStartColor color. Values equal to the baseline value are colored DataElementStyles' continuousFillThreeColorNeutralColor. Values falling between the baseline (not including the baseline) and max are colored DataElementStyles' continuousFillThreeColorEndColor.

A value of GraphConstants.COLOR_PALETTE_COLOR_SPECTRUM indicates that the DataElementStyles' continuousColorSpectrum values should be mapped to the corresponding data value. The color spectrum defines the mapping in percentages along a normalized range or 0.0 to 1.0. Note: Although the LegendModel's baseline value is still considered when deterining the resulting min/max range, the baseline value is not mapped to any specific color when using the DataElementStyles' continuousColorSpectrum.

Parameters:
newColorPaletteType - defines which set of colors to apply when a numeric styleBy variable has been assigned.
Throws:
java.lang.IllegalArgumentException - if newColorPaletteType is invalid.
See Also:
getColorPaletteType()

getColorPaletteType

public int getColorPaletteType()
Returns how the values of a numeric styleBy varaible are mapped to a corresponding color representation.

Returns:
the an indicator of which set of colors to apply when a numeric styleBy variable has been assigned.
See Also:
setColorPaletteType(int)

setSkin

public void setSkin(int newSkin)
             throws java.lang.IllegalArgumentException
Set the style of skin to modify the marker appearance. Valid values are:
GraphConstants.SKIN_AUTOMATIC, GraphConstants.SKIN_NONE GraphConstants.SKIN_SATIN GraphConstants.SKIN_MODERN

The default is GraphConstants.SKIN_AUTOMATIC.

Parameters:
newSkin - Which skin style to use
Throws:
java.lang.IllegalArgumentException - if newSkin is invalid.
See Also:
getSkin()

getSkin

public int getSkin()
Get the style used to modify the displayed markers.

Returns:
current skin definition
See Also:
setSkin(int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.