The requested page is not available for the requested platform. You are viewing the content for Default platform.

ChoroplethMapDashboardItem Class

A Choropleth Map dashboard item that colors areas depending on the provided values.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v19.1.Core.dll

Declaration

public class ChoroplethMapDashboardItem :
    MapDashboardItem,
    IElementContainer
Public Class ChoroplethMapDashboardItem
    Inherits MapDashboardItem
    Implements IElementContainer

Remarks

The Choropleth Map dashboard item allows you to colorize required areas in proportion to the provided values. For instance, you can visualize a sales amount or population density.

MainFeatures_Maps

The following documentation is available.

Examples

The following example demonstrates how to bind a Choropleth Map dashboard item to data in code.

Imports System.Windows.Forms
Imports DevExpress.DashboardCommon
Imports DevExpress.DataAccess.ConnectionParameters
Imports DevExpress.DataAccess.Sql

Namespace Dashboard_CreateChoroplethMap
    Partial Public Class Form1
        Inherits Form

        Public Sub New()
            InitializeComponent()

            ' Creates a new dashboard and a data source for this dashboard.
            Dim dashboard As New Dashboard()

            Dim dataSource As New DashboardSqlDataSource()
            Dim sqlQuery As New CustomSqlQuery("Countries", "select * from Countries")
            dataSource.ConnectionParameters = New Access97ConnectionParameters("..\..\Data\countriesDB.mdb", "", "")
            dataSource.Queries.Add(sqlQuery)

            ' Creates a choropleth map dashboard item and specifies its data source.
            Dim choroplethMap As New ChoroplethMapDashboardItem()
            choroplethMap.DataSource = dataSource
            choroplethMap.DataMember = "Countries"

            ' Loads the map of the world.
            choroplethMap.Area = ShapefileArea.WorldCountries

            ' Specifies a binding between the required map attribute and the data source field.
            choroplethMap.AttributeName = "NAME"
            choroplethMap.AttributeDimension = New Dimension("Country")

            ' Creates a ValueMap object with a measure that provides data for color map shapes.
            ' Then, adds this object to the Maps collection of the choropleth map dashboard item.
            Dim populationMap As New ValueMap(New Measure("Population"))
            choroplethMap.Maps.Add(populationMap)

            ' Adds the choropleth map dashboard item to the dashboard and opens this
            ' dashboard in the Dashboard Viewer.
            dashboard.Items.Add(choroplethMap)
            dashboardViewer1.Dashboard = dashboard
        End Sub
    End Class
End Namespace

Inheritance

Implements

DevExpress.DashboardCommon.Native.IDashboardComponent
DevExpress.DashboardCommon.Native.IChangeService
DevExpress.DataAccess.Native.ISupportPrefix
DevExpress.DashboardCommon.Native.ICurrencyCultureNameProvider
DevExpress.DashboardCommon.Native.IFiltersProvider
DevExpress.DashboardCommon.Native.ISliceDataQueryProvider
DevExpress.DashboardCommon.Native.IDimensionAxes
DevExpress.DashboardCommon.Native.IMasterFilter
DevExpress.DashboardCommon.Native.IMasterFilterItem
DevExpress.DashboardCommon.Native.IDataItemRepositoryProvider
DevExpress.DashboardCommon.Native.IDataSourceSchemaProvider
DevExpress.DashboardCommon.Native.IDataItemContainerContext
DevExpress.DashboardCommon.Native.IDataItemContext
DevExpress.DashboardCommon.Native.IFormatOwnerContext
DevExpress.DashboardCommon.Native.IColorSchemeContext
DevExpress.DashboardCommon.Native.IFormatRulesContext
DevExpress.DashboardCommon.Native.IInteractivityOptionsProvider
DevExpress.DashboardCommon.Native.IElementContainer
See Also