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
Constants
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
Constructor Details
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
Calculates aging and returns the appropriate symbol. See the
SymbolAger class for details.
Parameters:
<Symbol > symbol |
Required |
The symbol to age. |
<Graphic > graphic |
Required |
Feature being rendered. |