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.v19.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.

Note

The complete sample project How to Bind a Pie Map Dashboard Item to Data at Runtime is available in the DevExpress Examples repository.

uusing 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)
        {
            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);

            PieMapDashboardItem pieMap = CreatePieMap(xmlDataSource);

            dashboard.Items.Add(pieMap);
            dashboardViewer1.Dashboard = dashboard;
        }

        private static PieMapDashboardItem CreatePieMap(DashboardSqlDataSource xmlDataSource)
        {
            PieMapDashboardItem pieMap = new PieMapDashboardItem();
            pieMap.DataSource = xmlDataSource;
            pieMap.DataMember = "Query 1";

            pieMap.Area = ShapefileArea.Europe;

            pieMap.Latitude = new Dimension("Latitude");
            pieMap.Longitude = new Dimension("Longitude");

            pieMap.Values.Add(new Measure("Production"));
            pieMap.Argument = new Dimension("EnergyType");

            pieMap.TooltipDimensions.Add(new Dimension("Country"));
            pieMap.Legend.Visible = true;
            return pieMap;
        }
    }
}
See Also