New to Telerik Reporting? Download free 30-day trial

Add ShapeMapSeries to the Map

Environment

Product Version All
Product Progress® Telerik® Reporting Map Report Item

Description

How can I add a ShapeMapSeries instance to the Map report item?

Solution

The ShapeMapSeries uses its own source to obtain a set of coordinates which will determine the shape of the data points. These series do 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.

To add new ShapeMapSeries instance to the Map:

  1. Open the Series collection editor and Add a new ShapeMapSeries item.

    Adding a new ShapeMapSeries

  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 any of the None, EqualInterval, or EqualDistribution available options.

    • None means that no grouping will be used and every data point will be colored according to its respective color data value.

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

    • 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.
  6. Set the ColorsCount property depending on the number of groups in which you 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. Set up the LegendItem.Value expression by using the specific RangeMin and RangeMax references that determine the minimum and maximum values of the respective data range.
  8. Set up the ColorPalette property to define a range of colors that will be used when displaying the data points. GradientPalette is recommended.
  9. Define the source for the shapes.

    • 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 SpatialField property, write an expression or select the data set field that will provide the WKT or WKB data. SpatialField 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 or WKB contents will be used only if they contain valid POLYGON or MULTIPOLYGON definitions. The parsing of the points data will be done by using InvariantCulture, so make sure your WKT definition uses a period [.] as a decimal symbol.

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

    • 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, set up 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.

      Configure the Map Relation Pairs Dialog

      The engine will join 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.

  10. To make the boundaries of the data points more distinctive from each other, apply additional styling.

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

A Shape Map Series Layout In Property Grid

In this article