Skip to main content
All docs
V21.2

DashboardFlatDataSource Class

A data source that contains a custom item‘s data in a tabular format.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v21.2.Core.dll

Declaration

public class DashboardFlatDataSource :
    IList,
    ICollection,
    IEnumerable,
    ITypedList

Remarks

DashboardFlatDataSource is a wrapper for MultiDimensionalData. A DashboardFlatDataSource object contains aggregated data in a tabular format. The object allows you to bind data to a custom item’s underlying control that supports IList data sources.

DashboardFlatDataSource has the following methods that allow you to access its data:

GetColoringColumn
Gets the coloring column corresponding to the data item.
GetDisplayText
Gets the cell’s display text.
GetValue
Gets the cell’s value.
GetColumns
Gets data source columns.
GetDisplayTextColumn
Gets the display text column corresponding to the data item.

The following code snippet binds data to the custom Funnel chart’s series:

using System.Windows.Forms;
using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
using DevExpress.XtraCharts;

public class CustomFunnelControlProvider : CustomControlProviderBase {
  CustomDashboardItem<CustomFunnelMetadata> dashboardItem;
  //...
  protected override void UpdateControl(CustomItemData customItemData){
      chart.Series.Clear();
      if(dashboardItem.Metadata.Value != null && dashboardItem.Metadata.Arguments.Count > 0) {
          Series series = new Series("A Funnel Series", ViewType.Funnel);
          flatData = customItemData.GetFlatData(new DashboardFlatDataSourceOptions() { AddColoringColumns = true });
          series.DataSource = flatData;
          series.ValueDataMembers.AddRange(dashboardItem.Metadata.Value.UniqueId);
          series.ArgumentDataMember = dashboardItem.Metadata.Arguments.Last().UniqueId;
          series.ColorDataMember = flatData.GetColoringColumn(dashboardItem.Metadata.Value.UniqueId).Name;
          chart.Series.Add(series);
      }
  }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the DashboardFlatDataSource 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.

Inheritance

Object
DashboardFlatDataSource
See Also