Packagecom.esri.bacore
Interfacepublic interface IValueFormatter
Implementors ValueFormatter

The IValueFormatter interface provides method for formatting a numeric value.



Public Methods
 MethodDefined By
  
formatValue(value:Number, decimals:int):String
Converts a numeric value to a string representation with the required number of digits after the decimal point.
IValueFormatter
  
formatValueWithUnits(value:Number, decimals:int, valueType:BAValueType):String
Converts a numeric value to a string representation with the required number of digits after the decimal point provided with units if necessary.
IValueFormatter
  
parse(formattedValue:String):Number
Converts a formatted value to a numeric value.
IValueFormatter
Method Detail
formatValue()method
public function formatValue(value:Number, decimals:int):String

Converts a numeric value to a string representation with the required number of digits after the decimal point.

Parameters

value:Number — A numeric value to be converted.
 
decimals:int — The number of significant digits after the decimal point. Negative value means unknown number of digits.

Returns
String
formatValueWithUnits()method 
public function formatValueWithUnits(value:Number, decimals:int, valueType:BAValueType):String

Converts a numeric value to a string representation with the required number of digits after the decimal point provided with units if necessary.

Parameters

value:Number — A numeric value to be converted.
 
decimals:int — The number of significant digits after the decimal point. Negative value means unknown number of digits.
 
valueType:BAValueType — Type of value.

Returns
String
parse()method 
public function parse(formattedValue:String):Number

Since : Community Analyst API for Flex 2.2.

Converts a formatted value to a numeric value.

Parameters

formattedValue:String — String containing a formatted value.

Returns
Number — Numeric value or NaN.