The following example shows how to load a .shp file to provide a custom map for the Choropleth Map dashboard item.
DevExpress Dashboard uses a Shapefile vector format to provide custom maps. Commonly, this format includes two file types:
- .shp file - holds map shapes (points/lines/polygons);
- .dbf file - contains attributes for each shape.
Follow the steps below to load the existing shapefile in code:
- Set the MapDashboardItem.Area property to Custom and use the MapDashboardItem.CustomShapefile property.
- Create a CustomShapefileData object.
- Specify its CustomShapefileData.ShapeData property and CustomShapefileData.AttributeData property (optional).
- Assign this object to the CustomShapefile.Data property.
If you use the CustomShapefile.Url property to open a map, the dashboard XML definition will contain the path to a map shapefile. If you open the map with the CustomShapefile.Data property, the dashboard XML definition will contain the map itself.
- Dashboard for WinForms - Customize Map Item Popup Menu to Load Shape Files
- Dashboard for WinForms - Bind a Choropleth Map Dashboard Item to Data at Runtime
- Dashboard for WinForms - Bind a Pie Map Dashboard Item to Data in code
- Dashboard for WinForms - Bind a Bubble Map Dashboard Item to Data in code
- Dashboard for WinForms - Bind a Geo Point Map Dashboard Item to Data at Runtime
(you will be redirected to DevExpress.com to submit your response)