GaugeDashboardItem Class
A Gauge dashboard item that visualizes data within a series of KPI elements (gauges).
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v21.2.Core.dll
Declaration
Remarks
The Gauge dashboard item visualizes data within a series of KPI elements called gauges.
The following documentation is available.
Example
The following example demonstrates how to bind a Gauge dashboard item to data in code.
using System;
using System.Windows.Forms;
using DevExpress.DashboardCommon;
namespace Dashboard_CreateGauges {
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1() {
InitializeComponent();
}
private GaugeDashboardItem CreateGauges(DashboardObjectDataSource dataSource) {
GaugeDashboardItem gauges = new GaugeDashboardItem();
gauges.ViewType = GaugeViewType.CircularHalf;
gauges.DataSource = dataSource;
Gauge gauge = new Gauge();
gauge.ActualValue = new Measure("Extended Price", SummaryType.Sum);
gauges.Gauges.Add(gauge);
gauges.SeriesDimensions.Add(new Dimension("Sales Person"));
return gauges;
}
private void Form1_Load(object sender, EventArgs e) {
dashboardViewer1.Dashboard = new Dashboard();
DashboardObjectDataSource dataSource = new DashboardObjectDataSource();
dashboardViewer1.AsyncDataLoading+=(s,ev) => {
ev.Data = (new nwindDataSetTableAdapters.SalesPersonTableAdapter()).GetData();
};
dashboardViewer1.Dashboard.DataSources.Add(dataSource);
GaugeDashboardItem gauges = CreateGauges(dataSource);
dashboardViewer1.Dashboard.Items.Add(gauges);
dashboardViewer1.ReloadData();
}
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GaugeDashboardItem 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.