Skip to main content
All docs
V24.1

DashboardFlatDataSourceOptions.AddColoringColumns Property

Specifies whether coloring columns should be added to DashboardFlatDataSource.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

public bool AddColoringColumns { get; set; }

Property Value

Type Description
Boolean

true to add coloring columns; otherwise, false.

Remarks

You can include color values calculated for each data row in a flat data source if a custom item supports coloring. To accomplish this, set the AddColoringColumns property to true and pass the DashboardFlatDataSourceOptions object to the CustomItemData.GetFlatData(DashboardFlatDataSourceOptions) method.

The following code snippet adds a coloring column to the DashboardFlatDataSource object:

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