Telerik Reporting R1 2017

How to: Add ShapeMapSeries to the Map Item

The ShapeMapSeries uses its own source to obtain a set of coordinates which will determine the shape of the data points. These series does not use a LocationProvider or a GeoLocationMapGroup, because the data points are not determined by a single location on the map surface, as with the LocationMapSeries

Adding a ShapeMapSeries instance to the map

To add new ShapeMap series to the map follow these steps:

  1. Open Series collection editor and Add new ShapeMapSeries item, as shown below:

    Choropleth Add Shape Map Series
  2. Set the ShapeMapGroup to an existing ShapeMapGroup instance or create a new one from scratch.

  3. Set the SeriesGroup to an existing MapGroup instance or create a new one from scratch.

  4. Set an expression for the ColorData field to define the value that will be used to calculate the data point color.

  5. Set the RangeGrouping property to one of the available options: None, EqualInterval or EqualDistribution. None means that no grouping will be used and every data point will be colored according to its respective color data value. EqualInterval will split the interval between the minimum and maximum values by the colors count, assigning a separate color to each interval. EqualDistribution will try to distribute the data evenly among the groups defined by the ColorsCount property, assigning a separate color to each group.

    Note Note

    When the RangeGrouping property is set to None, the ColorsCount value is not respected.

  6. Set the ColorsCount property depending on on how many groups you would want to split the data values. When the RangeGrouping is set to None, the legend will contain only two items, showing the minimum and maximum data values. However, if the data set contains less records than the desired colors count, the legend will display items only for the available data records.

  7. Setup the LegendItem.Value expression, using the specific references RangeMin and RangeMax that determine the minimum and maximum values of the respective data range.

  8. Setup the ColorPalette property in order to define a range of colors that will be used when displaying the data points. In the most cases the GradientPalette will be the best choice.

    • If you want to use a Well-known text (WKT) or its binary representation (WKB) as a source for your shapes, select the SourceType property and choose WellKnownText from the drop-down list. In the property SpatialField below you have to write an expression or select the data set field that will provide the WKT/WKB data. This property is mandatory and it will be used by the processing engine to evaluate the contents of the field against the current data record and parse it as a Well-known text or Well-known binary. Since the ShapeMapSeries displays polygons as its data points, the WKT/WKB contents will be used only if they contain valid POLYGON or MULTIPOLYGON definitions. The parsing of the points data will be done using InvariantCulture, so make sure your WKT definition uses period [.] as a decimal symbol.

      Note Note

      The nested (interior) polygon rings will be displayed as polygons with no color fill.

    • If you want to use an ESRI Shapefile as a shapes source, select the SourceType property and choose EsriShapeFile from the drop-down list.

      Set the path to the Shapefile as a value of the FileName property. The processing engine will resolve absolute and relative file paths, and also will try to download synchronously the file contents if it detects a valid URL. It is not necessary to provide the .shp file extension.

      Using the Map Relation Pairs dialog, setup the RelationPairs property, pairing the fields from the analytical data set with fields from the spatial data set, produced by the DBF file that is contained in the Shapefile bundle.

      Choropleth Map Relation Pairs Dialog
      Important note Important

      The engine will join the the analytical data set with the spatial data set, preserving all the records from the spatial data set. In terms of SQL, if the spatial data set is "left" and the analytical data set is "right", the processing engine will produce a Left outer join.

  9. If needed, you can apply some additional styling properties to the data points in order to make their boundaries more distinctive from each other.

When all the properties are set, the ShapeMapSeries instance should look similar to the following one in the Property Grid:

Choropleth Shape Map Series Layout In Property Grid

See Also