getItem(index);
setItem(index, value);
index. Scale item index.
value. Scale element value.
The Item property sets value for a scale element by element index.
To execute the example, the HTML page must contain the Placing of Map on a HTML PageMapChart (see Placing of Map on a HTML Page) component named map, XML file with settings of map and the Russia.svg topobase.
The XML file must contain settings of the fill factor that is the first located in the list of map factors. Fill background - dependency object, for which scale is set up.
Change value of the third scale element:
function scaleSet() {
scale = map.getFirstVisual().getBackground().getMapScale();
scale.setItem(2, new PP.SolidColorBrush({Color:"Green"}));
map.draw();
};
map.Loaded.add(scaleSet);
After executing the example, map fill is changed: on loading the map the regions with values that lie in the third interval are shown in green color:
See also: