Class: TimeClassBreaksAger

Description

Class added v2.0.

Time class breaks ager displays aging by classifying features based on an age range.

Samples

Search for samples that use this class.  

Class hierarchy

esri.Renderer.SymbolAger
  |_ esri.renderer.TimeClassBreaksAger

Constructor

Constructor Description
esri.renderer.TimeClassBreaksAger(infos) Creates a new TimeClassBreaksAgerObject with the specified time breaks inforamtion.

Constants

Constant Description
UNIT_DAYS Time breaks are measured in days.
UNIT_HOURS Time breaks are measured in hours.
UNIT_MILLISECONDS Time breaks are measured in milliseconds.
UNIT_MINUTES Time breaks are measured in minutes.
UNIT_MONTHS Time breaks are measured in months.
UNIT_SECONDS Time breaks are measured in seconds.
UNIT_WEEKS Time breaks are measured in weeks.
UNIT_YEARS Time breaks are measured in years.

Methods

Method Return Value Description
getAgedSymbol(symbol, graphic) Symbol Calculates aging and returns the appropriate symbol. See the SymbolAger class for details.
Constructor Detail

esri.renderer.TimeClassBreaksAger(infos)

Creates a new TimeClassBreaksAgerObject with the specified time breaks inforamtion.
Parameters:
<Object[]> infos Required

Each element in the array is an object that describes the class breaks information. Each break info can specify a color, size or both. The features age is calculated with respect to the map's time extent end time. The object has the following properties:

<Number> minAge The minimum age for the break info.
<Number> maxAge The maximum age for the break info.
<dojo.Color> color The color for the break.
<Number> size The size for the break.
Options:
<String> timeUnits The unit in which the minimum and maximum break values are measured. View the constants table for a list of valid values. The default value is esri.renderer.TimeClassBreaksAger.UNIT_DAYS
Code snippets:
var infos = [
  { minAge: 0, maxAge: 1, color: new dojo.Color([255,0,0,0.5])},
  { minAge: 1, maxAge: 24, color: new dojo.Color([49,154,255,0.5])},
  { minAge: 24, maxAge: Infinity, color: new dojo.Color([255,255,8,0.5])}
];
var ager = new esri.renderer.TimeClassBreaksAger(infos, esri.renderer.TimeClassBreaksAger.UNIT_HOURS);
Methods Detail

getAgedSymbol(symbol, graphic)

Calculates aging and returns the appropriate symbol. See the SymbolAger class for details.
Return value: Symbol
Input Parameters:
<Symbol> symbol Required The symbol to age.
<Graphic> graphic Required Feature being rendered.