A newer version of this page is available. Switch to the current version.

PieDashboardItem Class

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

Namespace: DevExpress.DashboardCommon

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


public class PieDashboardItem :


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.

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

Namespace Dashboard_CreatePies
    Partial Public Class Form1
        Inherits Form

        Public Sub New()
        End Sub
        Private Function CreatePies(ByVal dataSource As DashboardObjectDataSource) As PieDashboardItem

            ' Creates a pie dashboard item and specifies its data source.
            Dim pies As 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
        End Function
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load

            ' 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.
            Dim dataSource As 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.
            Dim pies As PieDashboardItem = CreatePies(dataSource)

            ' Reloads data in the data sources.
        End Sub
    End Class
End Namespace
See Also