PieDashboardItem Class
A Pie dashboard item that displays a series of pies or donuts.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v21.2.Core.dll
Declaration
Remarks
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.
Example
The following example demonstrates how to bind a Pie dashboard item to data in code.
using DevExpress.DashboardCommon;
using System;
using System.Windows.Forms;
namespace Dashboard_CreatePies
{
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private PieDashboardItem CreatePies(IDashboardDataSource dataSource) {
PieDashboardItem pies = new PieDashboardItem();
pies.DataSource = dataSource;
pies.Values.Add(new Measure("Extended Price"));
pies.Arguments.Add(new Dimension("Country"));
pies.SeriesDimensions.Add(new Dimension("OrderDate"));
return pies;
}
private void Form1_Load(object sender, EventArgs e) {
DashboardExcelDataSource excelDataSource = new DashboardExcelDataSource()
{
FileName = "SalesPerson.xlsx",
SourceOptions = new DevExpress.DataAccess.Excel.ExcelSourceOptions(
new DevExpress.DataAccess.Excel.ExcelWorksheetSettings()
{
WorksheetName = "Data",
CellRange = "A1:L100"
}
)
};
excelDataSource.Fill();
Dashboard dashBoard = new Dashboard();
dashBoard.DataSources.Add(excelDataSource);
PieDashboardItem pies = CreatePies(excelDataSource);
dashBoard.Items.Add(pies);
dashboardViewer1.Dashboard = dashBoard;
dashboardViewer1.ReloadData();
}
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the PieDashboardItem class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.