Package | com.esri.bacore.thematicmapping |
Class | public class TMValueCalculator |
Inheritance | TMValueCalculator ValueCalculator flash.events.EventDispatcher |
TMValueType
enumeration.
See also
Property | Defined By | ||
---|---|---|---|
averageBaseFieldAlias : String [read-only]
Alias name of the field to calculate an average by. | TMValueCalculator | ||
averageBaseFieldName : String [read-only]
Name of the field to calculate an average by. | TMValueCalculator | ||
baseFieldAlias : String
Alias name of the base field. | TMValueCalculator | ||
baseFieldName : String [read-only]
Name of the base field. | TMValueCalculator | ||
decimals : int [override] [read-only]
The number of significant digits after the decimal point for a value calculated by this calculator. | TMValueCalculator | ||
formatter : IValueFormatter
Value formatter to be used to format values. | ValueCalculator | ||
indexBase : Number [read-only]
Base value for index calculation (NaN or zero value means no index base). | TMValueCalculator | ||
percentageFieldAlias : String [read-only]
Alias name of the field to calculate percentage by. | TMValueCalculator | ||
percentageFieldName : String [read-only]
Name of the field to calculate percentage by. | TMValueCalculator | ||
valueCalculationType : TMValueType
Current value-calculation method. | TMValueCalculator | ||
valueType : BAValueType [override] [read-only]
The type of the current thematic value. | TMValueCalculator |
Method | Defined By | ||
---|---|---|---|
TMValueCalculator(summarizations:TMSummarizations, baseFieldName:String, percentFieldName:String = null, averageBaseFieldName:String = null, indexBase:Number)
Creates a new instance of the ValueCalculator class. | TMValueCalculator | ||
calculate(attributes:Object, provider:TMAttributesProvider):Number [override]
Calculates a value to thematically shade the given feature by. | TMValueCalculator | ||
createBaseDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array [static]
Creates base description fields for a graphic feature. | ValueCalculator | ||
createDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array [override]
Creates a list of fields describing value calculation properties. | TMValueCalculator | ||
createTMValueFormat(formatWithUnits:Boolean):ValueFormat
Creates a format for formatting the thematic value. | ValueCalculator | ||
getSummarizationFields():Array [override]
Gets an array of names of summarization fields which are required for value calculation. | TMValueCalculator | ||
isEnabledTMValueType(type:TMValueType):Boolean
Tests this calculator to support the given summarization type. | TMValueCalculator |
averageBaseFieldAlias | property |
averageBaseFieldAlias:String
[read-only] Alias name of the field to calculate an average by.
public function get averageBaseFieldAlias():String
averageBaseFieldName | property |
averageBaseFieldName:String
[read-only] Name of the field to calculate an average by.
public function get averageBaseFieldName():String
baseFieldAlias | property |
baseFieldAlias:String
Alias name of the base field.
public function get baseFieldAlias():String
public function set baseFieldAlias(value:String):void
baseFieldName | property |
baseFieldName:String
[read-only] Name of the base field.
public function get baseFieldName():String
decimals | property |
decimals:int
[read-only] [override] The number of significant digits after the decimal point for a value calculated by this calculator. Negative value means unknown number of significant digits.
public function get decimals():int
indexBase | property |
indexBase:Number
[read-only] Base value for index calculation (NaN or zero value means no index base).
public function get indexBase():Number
percentageFieldAlias | property |
percentageFieldAlias:String
[read-only] Alias name of the field to calculate percentage by.
public function get percentageFieldAlias():String
percentageFieldName | property |
percentageFieldName:String
[read-only] Name of the field to calculate percentage by.
public function get percentageFieldName():String
valueCalculationType | property |
valueCalculationType:TMValueType
Current value-calculation method.
public function get valueCalculationType():TMValueType
public function set valueCalculationType(value:TMValueType):void
valueType | property |
valueType:BAValueType
[read-only] [override] The type of the current thematic value.
public function get valueType():BAValueType
TMValueCalculator | () | Constructor |
public function TMValueCalculator(summarizations:TMSummarizations, baseFieldName:String, percentFieldName:String = null, averageBaseFieldName:String = null, indexBase:Number)
Creates a new instance of the ValueCalculator class.
The percentFieldName
and averageBaseFieldName
parameters are
mutually exclusive. Only one of them can be specified.
summarizations:TMSummarizations — Name of the base field.
| |
baseFieldName:String — Name of the field to calculate percentage by.
| |
percentFieldName:String (default = null ) — Name of the field to calculate an average by.
| |
averageBaseFieldName:String (default = null ) — Base value for index calculation (NaN or zero value means no index base).
| |
indexBase:Number (default = NaN )
|
calculate | () | method |
override public function calculate(attributes:Object, provider:TMAttributesProvider):Number
Calculates a value to thematically shade the given feature by.
Parameters
attributes:Object — Attributes of a feature.
| |
provider:TMAttributesProvider — Provider of thematic mapping attributes.
|
Number — The value calculated.
|
createDescriptionFields | () | method |
override public function createDescriptionFields(attributes:Object, provider:TMAttributesProvider, descriptionStyle:ValueDescriptionStyle):Array
Creates a list of fields describing value calculation properties.
The table below shows the avaiability and precedence of the description fields which appear
in the output list depending on the ValueDescriptionStyle
used.
Field | NONE | SIMPLE | SHORT | LONG |
---|---|---|---|---|
"ID" | no | no | yes | yes |
"Name" | no | no | yes | yes |
"Value" | no | yes | yes | yes |
"TMBAValueType" | no | no | no | yes |
"TMVarID" | no | no | no | yes |
"TMVarName" | no | no | no | yes |
"TMVarValue" | no | no | no | yes |
"PercentageVarID" | no | no | no | yes? |
"PercentageVarName" | no | no | no | yes? |
"PercentageVarValue" | no | no | no | yes? |
"AverageBaseVarID" | no | no | no | yes? |
"AverageBaseVarName" | no | no | no | yes? |
"AverageBaseVarValue" | no | no | no | yes? |
"IndexBaseValue" | no | no | no | yes? |
Parameters
attributes:Object — Attributes of feature to get values from.
| |
provider:TMAttributesProvider — Provider of thematic mapping attributes (can be null).
| |
descriptionStyle:ValueDescriptionStyle — Value description style.
|
Array — An array of feature description fields containing KeyValuePair items.
|
See also
getSummarizationFields | () | method |
override public function getSummarizationFields():Array
Gets an array of names of summarization fields which are required for value calculation.
ReturnsArray — The array of String items containing names of required summarization fields.
|
isEnabledTMValueType | () | method |
public function isEnabledTMValueType(type:TMValueType):Boolean
Tests this calculator to support the given summarization type.
Parameters
type:TMValueType — Summarization type requested.
|
Boolean — True if this summarization type is allowed.
|