PieMapDashboardItem Class

A Pie Map dashboard item that allows you to place pies on the map using geographical coordinates.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

public class PieMapDashboardItem :
    GeoPointMapDashboardItemBase,
    IPieContext,
    IElementContainer
Public Class PieMapDashboardItem
    Inherits GeoPointMapDashboardItemBase
    Implements IPieContext,
               IElementContainer

Remarks

The Pie Map dashboard item allows you to place pies on the map using geographical coordinates. Each pie visualizes the contribution of each value to the total.

MapsOverview_PieMap

The following documentation is available.

Examples

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

using System;
using DevExpress.DashboardCommon;
using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Sql;
using DevExpress.XtraEditors;

namespace Dashboard_CreatePieMap {
    public partial class Form1 : XtraForm {
        public Form1() {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e) {
            // Creates a new dashboard and data source for this dashboard.
            Dashboard dashboard = new Dashboard();

            DashboardSqlDataSource xmlDataSource = new DashboardSqlDataSource();
            xmlDataSource.ConnectionParameters =
                new XmlFileConnectionParameters(@"..\..\Data\DashboardEnergyStatictics.xml");
            SelectQuery sqlQuery = SelectQueryFluentBuilder
                .AddTable("Countries")
                .SelectColumns("Latitude", "Longitude", "Production", "EnergyType", "Country")
                .Build("Query 1");
            xmlDataSource.Queries.Add(sqlQuery);
            dashboard.DataSources.Add(xmlDataSource);

            // Creates a Pie Map dashboard item and specifies its data source.
            PieMapDashboardItem pieMap = new PieMapDashboardItem();
            pieMap.DataSource = xmlDataSource;
            pieMap.DataMember = "Query 1";

            // Loads the map of the europe.
            pieMap.Area = ShapefileArea.Europe;

            // Provides countries coordinates.
            pieMap.Latitude = new Dimension("Latitude");
            pieMap.Longitude = new Dimension("Longitude");

            // Specifies pie values and argument.
            pieMap.Values.Add(new Measure("Production"));
            pieMap.Argument = new Dimension("EnergyType");

            // Specifies values displayed within pie tooltips.
            pieMap.TooltipDimensions.Add(new Dimension("Country"));
            pieMap.Legend.Visible = true;

            // Adds the Pie Map dashboard item to the dashboard and opens this
            // dashboard in the Dashboard Viewer.
            dashboard.Items.Add(pieMap);
            dashboardViewer1.Dashboard = dashboard;
        }
    }
}

Implements

DevExpress.DashboardCommon.Native.IDashboardComponent
DevExpress.DashboardCommon.Native.IChangeService
DevExpress.DataAccess.Native.ISupportPrefix
DevExpress.DashboardCommon.Native.ICurrencyCultureNameProvider
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.IFiltersProvider
DevExpress.DashboardCommon.Native.IInteractivityOptionsProvider
DevExpress.DashboardCommon.IRaiseClusterizationRequestItem
DevExpress.DashboardCommon.Native.IPieContext
DevExpress.DashboardCommon.Native.IElementContainer
See Also