Skip to main content
All docs
V25.1
  • DashboardFlatDataSource Class

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

    Namespace: DevExpress.DashboardCommon

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

    NuGet Package: DevExpress.Dashboard.Core

    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);
          }
      }
    }
    

    Inheritance

    Object
    DashboardFlatDataSource
    See Also