|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.barchart.BarChartModel
public class BarChartModel
A BarChartModel encapsulates most of a BarChart's visual display properties. This contrasts with the BarChart's data model, which determines the number and organization of data elements (bars) and the use of axes and a legend.
A BarChartModel contains BarChart-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 BarChartModel 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 BarChart's display state is unambiguous.
Graph
,
GraphStyle
,
BarChart
Constructor Summary | |
---|---|
BarChartModel()
Constructs a BarChartModel which is assigned
to a BarChart to define most of the display
properties. |
Method Summary | |
---|---|
void |
apply(BarChartModel 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 BarChartModel . |
AxisWallModel |
getAxisWallModel()
Returns the model that encapsulates the axis wall display properties. |
int |
getBarShape()
Returns the bar element shape (applicable when the dimension property is GraphConstants.DIMENSION_3D). |
com.sas.measures.BaseLength |
getBarWidth()
Returns the element width (note: the barWidth, barWidthSpace and growBarWidthEnabled properties along with the chart's displayPolicy property all play together to determine what visible width is actually given to the bar elements). |
com.sas.measures.BaseLength |
getBarWidthSpace()
Returns the element widthSpace (note: the barWidth, barWidthSpace and growBarWidthEnabled properties along with the chart's displayPolicy property all play together to determine what visible width is actually given to the bar elements). |
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. |
int |
getDimension()
Get the rendering to display the graph in 2 or 3 dimensions. |
int |
getInsideBarLabelContent()
Returns the type of textual information to be displayed inside the bar. |
AdvancedTextStyle |
getInsideBarLabelTextStyle()
Returns the text appearance model that is applied to the inside label on the bar elements. |
LegendModel |
getLegendModel()
Returns the model that encapsulates the display properties for the legend. |
int |
getMissingPolicy()
Returns the graph behavior for displaying missing values. |
int |
getOrientation()
Returns the orientation of the bar elements. |
int |
getOutsideBarLabelContent()
Returns the type of textual information to be displayed outside and at the end of the bar. |
AdvancedTextStyle |
getOutsideBarLabelTextStyle()
Returns the text appearance model that is applied to the outside label on the bar elements. |
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 bars. |
int |
getStackBarPolicy()
Returns whether or not the bar elements stack (for each category value) when subgrouped 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 BarChartModel . |
boolean |
isConfidenceLimitEnabled()
Returns the graph behavior for displaying confidence limit brackets around the bars. |
boolean |
isGrowBarWidthEnabled()
Returns whether or not to allow the bar's displayed width to grow beyond the barWidth property value. |
boolean |
isMissingResponseEnabled()
Returns the graph behavior for displaying missing response values. |
boolean |
isUniformEnabled()
Deprecated. use getUniformPolicy |
boolean |
isZeroHeightBarsVisible()
Returns whether or not to show zero height bars. |
void |
setAxisWallModel(AxisWallModel newAxisWallModel)
Sets the model that encapsulates the display properties for the axis wall. |
void |
setBarShape(int newBarShape)
Sets the bar element shape. |
void |
setBarWidth(com.sas.measures.BaseLength newWidth)
Sets the element width (note: the barWidth, barWidthSpace and barGowthEnabled properties along with the chart's displayPolicy property all play together to determine what visible width is actually given to the bar elements). |
void |
setBarWidthSpace(com.sas.measures.BaseLength newWidthSpace)
Sets the element widthSpace (note: the barWidth, barWidthSpace and growBarWidthEnabled properties along with the chart's displayPolicy property all play together to determine what visible width is actually given to the bar elements). |
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' appearance preferences. |
void |
setConfidenceLimitEnabled(boolean newConfidenceEnabled)
Sets the confidence limit brackets around the bars.It is based on the values provided as high and low values as a data column.Based on which the brackets appear around the bar. |
void |
setDimension(int newDimension)
Set the rendering to display the graph in 2 or 3 dimensions. |
void |
setGrowBarWidthEnabled(boolean newGrowBarWidthEnabled)
Sets whether or not to allow the bar's displayed width to grow beyond the barWidth property value. |
void |
setInsideBarLabelContent(int newContent)
Sets the type of textual information to be displayed inside the bar. |
void |
setInsideBarLabelTextStyle(AdvancedTextStyle newTextStyle)
Sets the text appearance model that is applied to the inside label on the bar elements. |
void |
setLegendModel(LegendModel newLegendModel)
Sets the model that encapsulates the display properties for the legend. |
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 |
setOrientation(int newOrientation)
Set the orientation of the bar elements. |
void |
setOutsideBarLabelContent(int newContent)
Sets the type of textual information to be displayed outside and at the end of the bar. |
void |
setOutsideBarLabelTextStyle(AdvancedTextStyle newTextStyle)
Sets the text appearance model that is applied to the outside label on the bar elements. |
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 bar2 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 bar2 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 bar 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 bar 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' appearance preferences. |
void |
setSkin(int newSkin)
Set the style of skin to modify the bar slice appearance. |
void |
setStackBarPolicy(int newStackBarPolicy)
Sets whether or not to stack the bar elements (for each category value). |
void |
setUniformEnabled(boolean newUniformEnabled)
Deprecated. use setUniformPolicy |
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). |
void |
setZeroHeightBarsVisible(boolean newShowZerosEnabled)
Sets whether or not to show zero height bars. |
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 |
---|
public BarChartModel()
BarChartModel
which is assigned
to a BarChart
to define most of the display
properties.
Method Detail |
---|
public void apply(BarChartModel theOtherModel)
theOtherModel
- properties applied to this instancepublic boolean equals(java.lang.Object obj)
BarChartModel
.
The result is true
if and only if the argument is not
null
and is a BarChartModel
object that has the same
property values as this object.
equals
in class GraphModel
obj
- the object to test for equality with this
BarChartModel
true
if the objects are the same;
false
otherwise.public int hashCode()
BarChartModel
.
hashCode
in class GraphModel
public void setRowAxisModel(GraphMatrixAxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- row axis display attributes
java.lang.IllegalArgumentException
- if newAxisModel is null.getRowAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getRowAxisModel()
setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getColumnAxisModel()
public void setColumnAxisModel(GraphMatrixAxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- the column axis display attributes
java.lang.IllegalArgumentException
- if newAxisModel is null.getColumnAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getColumnAxisModel()
setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getRowAxisModel()
public void setResponseAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- a model that encapsulates axis display properties.
java.lang.IllegalArgumentException
- if newAxisModel is null.getResponseAxisModel()
,
setResponse2AxisModel(com.sas.graphics.components.AxisModel)
public AxisModel getResponseAxisModel()
setResponseAxisModel(com.sas.graphics.components.AxisModel)
,
getResponse2AxisModel()
public void setResponse2AxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- a model that encapsulates axis display properties.
java.lang.IllegalArgumentException
- if newAxisModel is null.getResponse2AxisModel()
,
setResponseAxisModel(com.sas.graphics.components.AxisModel)
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public AxisModel getResponse2AxisModel()
setResponse2AxisModel(com.sas.graphics.components.AxisModel)
,
getResponseAxisModel()
public void setCategoryAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- a model that encapsulates axis display properties.
java.lang.IllegalArgumentException
- if newAxisModel is null.getCategoryAxisModel()
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public AxisModel getCategoryAxisModel()
setCategoryAxisModel(com.sas.graphics.components.AxisModel)
public void setAxisWallModel(AxisWallModel newAxisWallModel) throws java.lang.IllegalArgumentException
newAxisWallModel
- a model that encapsulates axis wall display properties.
java.lang.IllegalArgumentException
- if newAxisWallModel is null.getAxisWallModel()
,
AxisWallModel.apply(com.sas.graphics.components.AxisWallModel)
public AxisWallModel getAxisWallModel()
setAxisWallModel(com.sas.graphics.components.AxisWallModel)
public void setLegendModel(LegendModel newLegendModel) throws java.lang.IllegalArgumentException
The legend displays the association between fill style and data value, data column or measure.
newLegendModel
- a model that encapsulates legend display properties.
java.lang.IllegalArgumentException
- if newLegendModel is null.getLegendModel()
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
,
BarChartTableDataModel.setSubgroupVariable(com.sas.graphics.components.ClassificationVariable)
,
BarChartOLAPDataModel
public LegendModel getLegendModel()
setLegendModel(com.sas.graphics.components.LegendModel)
public void setResponseAxisUpperThreshold(double newThreshold)
newThreshold
- the upper threshold value on the response axisgetResponseAxisUpperThreshold()
,
setResponseAxisLowerThreshold(double)
,
setResponse2AxisUpperThreshold(double)
public double getResponseAxisUpperThreshold()
setResponseAxisUpperThreshold(double)
,
getResponse2AxisUpperThreshold()
public void setResponseAxisLowerThreshold(double newThreshold)
newThreshold
- the lower threshold value on the response axisgetResponseAxisLowerThreshold()
,
setResponseAxisUpperThreshold(double)
,
setResponse2AxisLowerThreshold(double)
public double getResponseAxisLowerThreshold()
setResponseAxisLowerThreshold(double)
,
getResponse2AxisLowerThreshold()
public void setResponse2AxisUpperThreshold(double newThreshold)
newThreshold
- the value of the thresholdgetResponse2AxisUpperThreshold()
,
setResponseAxisUpperThreshold(double)
public double getResponse2AxisUpperThreshold()
setResponse2AxisUpperThreshold(double)
,
getResponseAxisUpperThreshold()
public void setResponse2AxisLowerThreshold(double newThreshold)
newThreshold
- the value of the thresholdgetResponse2AxisLowerThreshold()
,
setResponseAxisLowerThreshold(double)
public double getResponse2AxisLowerThreshold()
setResponse2AxisLowerThreshold(double)
,
getResponseAxisLowerThreshold()
public void setResponseAxisBaselineModel(ReferenceLineModel newBaselineModel) throws java.lang.IllegalArgumentException
newBaselineModel
- the baseline model for the responseVariable bar(s)
java.lang.IllegalArgumentException
- if newResponseAxisBaselineModel is null.getResponseAxisBaselineModel()
,
setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
public ReferenceLineModel getResponseAxisBaselineModel()
setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
,
setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
public void setResponse2AxisBaselineModel(ReferenceLineModel newBaselineModel) throws java.lang.IllegalArgumentException
newBaselineModel
- the baseline model for the response2Variable bar(s)
java.lang.IllegalArgumentException
- if newResponse2AxisBaselineModel is null.getResponse2AxisBaselineModel()
,
setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
public ReferenceLineModel getResponse2AxisBaselineModel()
setResponse2AxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
,
setResponseAxisBaselineModel(com.sas.graphics.components.ReferenceLineModel)
public void setOrientation(int newOrientation) throws java.lang.IllegalArgumentException
Note: that this affects where the response (dependent) and
category (independent) axes are placed.
Valid values are:
javax.swing.SwingConstants.VERTICAL, javax.swing.SwingConstants.HORIZONTAL
newOrientation
- the orientation of the bar elements
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetOrientation()
public int getOrientation()
Note: that this affects where the response (dependent) and
category (independent) axes are placed.
Possible values are:
javax.swing.SwingConstants.VERTICAL, javax.swing.SwingConstants.HORIZONTAL
setOrientation(int)
public void setDimension(int newDimension) throws java.lang.IllegalArgumentException
The default is GraphConstants.DIMENSION_2D.
newDimension
- how many dimensions the graph will be rendered in
java.lang.IllegalArgumentException
- if newDimension is invalid.getDimension()
public int getDimension()
setDimension(int)
public void setBarShape(int newBarShape)
newBarShape
- the desired bar shape
java.lang.IllegalArgumentException
- if newBarShape is invalid.getBarShape()
public int getBarShape()
setBarShape(int)
public void setBarWidth(com.sas.measures.BaseLength newWidth) throws java.lang.IllegalArgumentException
newWidth
- the desired width of the bar
java.lang.IllegalArgumentException
- if newWidth is null.setBarWidthSpace(com.sas.measures.BaseLength)
,
setGrowBarWidthEnabled(boolean)
,
Graph.setDisplayPolicy(int)
,
getBarWidth()
public com.sas.measures.BaseLength getBarWidth()
getBarWidthSpace()
,
isGrowBarWidthEnabled()
,
Graph.getDisplayPolicy()
,
setBarWidth(com.sas.measures.BaseLength)
public void setBarWidthSpace(com.sas.measures.BaseLength newWidthSpace) throws java.lang.IllegalArgumentException
newWidthSpace
- the desired gap between bar elements
java.lang.IllegalArgumentException
- if newWidthSpace is null.setBarWidth(com.sas.measures.BaseLength)
,
setGrowBarWidthEnabled(boolean)
,
Graph.setDisplayPolicy(int)
,
getBarWidth()
public com.sas.measures.BaseLength getBarWidthSpace()
getBarWidth()
,
isGrowBarWidthEnabled()
,
Graph.getDisplayPolicy()
,
setBarWidthSpace(com.sas.measures.BaseLength)
public void setGrowBarWidthEnabled(boolean newGrowBarWidthEnabled)
The default value is true.
newGrowBarWidthEnabled
- - true means to allow the bar elements to grow if there is available spacesetBarWidth(com.sas.measures.BaseLength)
,
setBarWidthSpace(com.sas.measures.BaseLength)
,
Graph.setDisplayPolicy(int)
,
getBarWidth()
public boolean isGrowBarWidthEnabled()
getBarWidth()
,
getBarWidthSpace()
,
Graph.getDisplayPolicy()
,
setGrowBarWidthEnabled(boolean)
public void setStackBarPolicy(int newStackBarPolicy)
GraphConstants.AUTOMATIC GraphConstants.TRUE case GraphConstants.FALSE
The default value is GraphConstants.AUTOMATIC. The BarChart's GraphConstants.AUTOMATIC behavior is to stack subgrouped bars but not stack multiple response bars.
If a subgroupVariable has been assigned then GraphConstants.TRUE would stack the subgroup bars. If multiple responseVariables or multiple response2Variables have been assigned then GraphConstants.TRUE would stack the multiple response bars. 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 this property is ignored and the BarChart will stack the subgroup bars. To clarify stacking of multiple responses: responseVariable and response2Variable bars are not stacked on each other (because they are assigned differend axes). But if multiple AnalysisVariables (via the AnalysisVariableList class) are assigned to the responseVariable OR the response2Variable then they can be stacked.
For example:
BarChartTableDataModel dataModel = new BarChartTableDataModel(); dataModel.setCategoryVariable(new ClassificationVariableList("Products")); dataModel.setResponseVariable(new AnalysisVariableList(new String[]{"SalesA","SalesB","SalesC"})); BarChart barChart = new BarChart(dataModel); barChart.getGraphModel().setStackBarPolicy(GraphConstants.TRUE)In this in case the SalesA, SalesB and SalesC bars would stack on top of each other. If "dataModel.setResponse2Variable(new AnalysisVariableList(new String[]{"PreSalesA","PreSalesB","PreSalesC"}));" were added then PreSalesA, PreSalesB and PreSalesC bars would stack on each other (but Sales and PreSales bars would not stack on each other.
newStackBarPolicy
- the bar stacking preference
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetStackBarPolicy()
public int getStackBarPolicy()
setStackBarPolicy(int)
public void setZeroHeightBarsVisible(boolean newShowZerosEnabled)
newShowZerosEnabled
- true means that if zero height bars are
present then they are displayed (which will act as a place holder).isZeroHeightBarsVisible()
public boolean isZeroHeightBarsVisible()
setZeroHeightBarsVisible(boolean)
public void setUniformEnabled(boolean newUniformEnabled)
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.
newUniformEnabled
- The uniformEnabled to setisUniformEnabled()
public boolean isUniformEnabled()
setUniformEnabled(boolean)
public void setUniformPolicy(int newUniformPolicy) throws java.lang.IllegalArgumentException
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:
newUniformPolicy
- defines category axis uniformity
java.lang.IllegalArgumentException
- if newUniformPolicy is invalid.getUniformPolicy()
public int getUniformPolicy()
setUniformPolicy(int)
public void setMissingResponseEnabled(boolean newMissingEnabled)
Note: missing response values (Ex. com.sas.MissingValues.Dot ) obviously do not have a representable response and as such no bar 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 bar).
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:
newMissingEnabled
- true means represent missing response values in the graphisMissingResponseEnabled()
public boolean isMissingResponseEnabled()
setMissingResponseEnabled(boolean)
public void setMissingPolicy(int newMissing) throws java.lang.IllegalArgumentException
Special note:
The following String values are interpreted as missing values:
The following Number values are interpreted as missing values:
java.lang.IllegalArgumentException
- if newMissing is invalid.getMissingPolicy()
public int getMissingPolicy()
setMissingPolicy(int)
public void setInsideBarLabelContent(int newContent)
GraphConstants.DATA_LABEL_AUTOMATIC
GraphConstants.DATA_LABEL_NONE
GraphConstants.DATA_LABEL_CATEGORY
GraphConstants.DATA_LABEL_RESPONSE
GraphConstants.DATA_LABEL_SUM
GraphConstants.DATA_LABEL_MEAN
GraphConstants.DATA_LABEL_PERCENT
GraphConstants.DATA_LABEL_SUBPERCENT
newContent
- the type of information to be displayed inside the bar
java.lang.IllegalArgumentException
- if an invalid parameter value is specified.getInsideBarLabelContent()
public int getInsideBarLabelContent()
setInsideBarLabelContent(int)
public void setInsideBarLabelTextStyle(AdvancedTextStyle newTextStyle) throws java.lang.IllegalArgumentException
newTextStyle
- the new repository for the inside bar label's display attributes
java.lang.IllegalArgumentException
- if newTextStyle is null.getInsideBarLabelTextStyle()
,
AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)
public AdvancedTextStyle getInsideBarLabelTextStyle()
setInsideBarLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
public void setOutsideBarLabelContent(int newContent)
GraphConstants.DATA_LABEL_AUTOMATIC
GraphConstants.DATA_LABEL_NONE
GraphConstants.DATA_LABEL_CATEGORY
GraphConstants.DATA_LABEL_RESPONSE
GraphConstants.DATA_LABEL_SUM
GraphConstants.DATA_LABEL_MEAN
GraphConstants.DATA_LABEL_PERCENT
newContent
- the type of textual information to be displayed outside and at the end of the bar
java.lang.IllegalArgumentException
- if an invalid parameter value is specified.getOutsideBarLabelContent()
public int getOutsideBarLabelContent()
setOutsideBarLabelContent(int)
public void setOutsideBarLabelTextStyle(AdvancedTextStyle newTextStyle) throws java.lang.IllegalArgumentException
newTextStyle
- the new repository for the outside bar label's display attributes
java.lang.IllegalArgumentException
- if newTextStyle is null.getOutsideBarLabelTextStyle()
,
AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)
public AdvancedTextStyle getOutsideBarLabelTextStyle()
setOutsideBarLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
public void setColorPaletteType(int newColorPaletteType) throws java.lang.IllegalArgumentException
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()
public int getColorPaletteType()
setColorPaletteType(int)
public void setSkin(int newSkin) throws java.lang.IllegalArgumentException
The default is GraphConstants.SKIN_AUTOMATIC.
newSkin
- Which skin style to use
java.lang.IllegalArgumentException
- if newSkin is invalid.getSkin()
public int getSkin()
setSkin(int)
public void setConfidenceLimitEnabled(boolean newConfidenceEnabled)
newConfidenceEnabled
- true means to show the confidence brackets around the bars.isConfidenceLimitEnabled()
public boolean isConfidenceLimitEnabled()
setConfidenceLimitEnabled(boolean)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |