ScaleBase.NoData

Syntax

NoData: PP.Brush

Description

The NoData property sets scale item that corresponds to data absence.

Comments

Property value: an identifier of the object described in item dictionary, or full description of the object returned when no data is available.

Example

To execute the example, the HTML page must contain the MapChart component (see Placing of Map on a HTML Page) 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 that contains values of the Brush type. The XML file must also have legend set up with the MapLegend0 identifier.

On map loading change color of the scale item that corresponds to missing data, and add the ScaleBase.ItemsChanging event handler:

        function scaleSet() {

            scale = map.getFirstVisual().getBackground().getMapScale();

            legend = map.getLegends().MapLegend0;

            legend.show();//Show legend

            scale.setNoData(new PP.SolidColorBrush({

                Color: "Yellow"

            }));

            scale.ItemsChanging.add(function (sender, args) {

                alert("New color is set for NoData")

            })

        }

        map.Loaded.add(scaleSet);

After executing the example yellow color is set for the scale item that corresponds to missing data, and an appropriate message is shown in the screen.

The example of property use from JSON is given on the Example of Scale List Setup page.

See also:

ScaleBase