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
const renderer = {
type: "simple", // autocasts as new SimpleRenderer()symbol: defaultSym, // the default symbol defined in step 1label: "% population in poverty by county", // label for the legendvisualVariables: [
{
type: "size", // indicates this is a size visual variablefield: "POP_POVERTY", // total population in povertynormalizationField: "TOTPOP_CY", // total populationstops: [
{
value: 0.15, // features where < 15% of the pop is in povertysize: 4, // will be assigned a marker with this size in ptslabel: "less than 15%"// label to display in the legend },
{
value: 0.35, // features where > 35% of the pop is in povertysize: 24, // will be assigned a marker with this size in ptslabel: "more than 35%"// label to display in the legend }
]
// features with values between 0.15 - 0.35 will be assigned// a size between 4 pts and 24 pts proportional// to where the value falls between 0.15 and 0.35// e.g. if a county has a pov rate of 0.25, then it will// have a marker sized at 14 pts }
]
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const renderer = {
type: "simple", // autocasts as new SimpleRenderer()symbol: defaultSym, // the default symbol defined in step 1label: "% population in poverty by county", // label for the legendvisualVariables: [
{
type: "color", // indicates this is a color visual variablefield: "POP_POVERTY", // total population in povertynormalizationField: "TOTPOP_CY", // total populationminDataValue: 0.1, // features where < 10% of the pop in povertymaxDataValue: 0.3, // features where > 30% of the pop in povertyminSize: 4, // size of marker in ptsmaxSize: 24// size of marker in pts }
]
};