1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
renderer.visualVariables = [
{
type: "color",
field: "CNSTRCT_YR",
legendOptions: {
title: "Built:" },
// year is the slider value set by the userstops: [
{
// buildings built in the given year are bluevalue: year,
color: "#0ff",
label: "in " + Math.floor(year)
},
{
// if built 0 - 20 years prior to the slider value then// the color is interpolated between blue and pinkvalue: year - 20,
color: "#f0f",
label: "in " + (Math.floor(year) - 20)
},
{
value: year - 50,
color: "#606",
label: "before " + (Math.floor(year) - 50)
}
]
}
];