Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: TimeClassBreaksAger

require(["esri/renderers/TimeClassBreaksAger"], function(TimeClassBreaksAger) { /* code goes here */ });

Description

(Added at 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/renderers/SymbolAger
|_esri/renderers/TimeClassBreaksAger

Constructors

NameSummary
new TimeClassBreaksAger(params, timeUnits?)Creates a new TimeClassBreaksAgerObject with the specified time breaks inforamtion.

Constants

NameDescription
UNIT_DAYSTime breaks are measured in days.
UNIT_HOURSTime breaks are measured in hours.
UNIT_MILLISECONDSTime breaks are measured in milliseconds.
UNIT_MINUTESTime breaks are measured in minutes.
UNIT_MONTHSTime breaks are measured in months.
UNIT_SECONDSTime breaks are measured in seconds.
UNIT_WEEKSTime breaks are measured in weeks.
UNIT_YEARSTime breaks are measured in years.

Methods

NameReturn typeSummary
getAgedSymbol(symbol, graphic)SymbolCalculates aging and returns the appropriate symbol.
Constructor Details

new TimeClassBreaksAger(params, timeUnits?)

Creates a new TimeClassBreaksAgerObject with the specified time breaks inforamtion.
Parameters:
<Object[]> params 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. See the object specifications tables below for the structure of the info object.
<String> timeUnits Optional 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
params properties:
<Number> alpha Required The alpha opacity for the break. Valid values are between 0 and 1. As of v2.8.
<Color> color Required The color for the break.
<Number> maxAge Required The maximum age for the break info.
<Number> minAge Required The minimum age for the break info.
<Number> size Required The size for the break.
Sample:
require([
 
"esri/Color", "esri/renderers/TimeClassBreaksAger", ...
], function(Color, TimeClassBreaksAger, ... ) {
 
var params = [
   
{ minAge: 0, maxAge: 1, color: new Color([255,0,0,0.5])},
   
{ minAge: 1, maxAge: 24, color: new Color([49,154,255,0.5])},
   
{ minAge: 24, maxAge: Infinity, color: new Color([255,255,8,0.5])}
 
];
 
var ager = new TimeClassBreaksAger(params, TimeClassBreaksAger.UNIT_HOURS);
 
...
});
Method Details

getAgedSymbol(symbol, graphic)

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