PieDashboardItem Class

A Pie dashboard item that displays a series of pies or donuts.

Namespace: DevExpress.DashboardCommon

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


public class PieDashboardItem : ChartDashboardItemBase, IDashboardComponent, IComponent, ISupportInitialize, IDisposable, IChangeService, ISupportPrefix, ICurrencyCultureNameProvider, ISliceDataQueryProvider, IDimensionAxes, IMasterFilter, IMasterFilterItem, IDataItemRepositoryProvider, IDataSourceSchemaProvider, IDataItemContainerContext, IDataItemContext, IColorSchemeContext, IFormatRulesContext, IFiltersProvider, IInteractivityOptionsProvider, IArgumentsDashboardItem, IPieContext, IElementContainer

The Pie dashboard item displays a series of pies or donuts that represent the contribution of each value to the total.


The following documentation is available.


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

´╗┐using System;
using System.Windows.Forms;
using DevExpress.DashboardCommon;
using DevExpress.DataAccess;

namespace Dashboard_CreatePies {
    public partial class Form1 : Form {
        public Form1() {
        private PieDashboardItem CreatePies(DashboardObjectDataSource dataSource) {

            // Creates a pie dashboard item and specifies its data source.
            PieDashboardItem pies = new PieDashboardItem();
            pies.DataSource = dataSource;

            // Specifies a measure that provides data used to calculate pie values.
            pies.Values.Add(new Measure("Extended Price"));
            // Specifies a dimension that provides data for arguments in a pie.
            pies.Arguments.Add(new Dimension("Country"));
            // Specifies a dimension that provides data for pie series.
            pies.SeriesDimensions.Add(new Dimension("OrderDate"));

            return pies;
        private void Form1_Load(object sender, EventArgs e) {

            // Creates a dashboard and sets it as the currently opened dashboard in the dashboard viewer.
            dashboardViewer1.Dashboard = new Dashboard();

            // Creates a data source and adds it to the dashboard data source collection.
            DashboardObjectDataSource dataSource = new DashboardObjectDataSource();
            dataSource.DataSource = (new nwindDataSetTableAdapters.SalesPersonTableAdapter()).GetData();

            // Creates a pie dashboard item with the specified data source 
            // and adds it to the Items collection to display within the dashboard.
            PieDashboardItem pies = CreatePies(dataSource);

            // Reloads data in the data sources.

See Also