Example of Legend Setup

The page below gives code of legend setup in the JSON format. The code must be stored in XML file that stores map settings within the MapChart root item. The dictionary must contain the following items:

"MapLegends":

{

        "MapLegend":

      {

           "Width": "0",

           "Background": "#EEE8AA",

           "LessFormat": "less than{0}",

           "EqualFormat": "equal to{0}",

           "Marker": "Rhombus",

           "BorderRadius": "8",

           "MapScale": "{AreaVisualScale}",

           "BorderThickness": "1",

           "Left": "800",

           "Id": "FirstLegend",

           "GreaterFormat": "greater than{0}",

           "BetweenFormat": "from {0} to{1}",

           "Top": "10",

           "Font": "{BlackFont}",

           "Padding": "2222",

           "Height": "0",

           "BorderColor": "#20B2AA",

           "ColumnCount": "2",

           "Margin": "5050",

           "IsOuter": "True",

           "NoDataText": "No data",

           "NoDataPosition": "Before"

        }

}

After executing the example the following map legend is positioned on the page:

See also:

MapLegends Item