dashboard-devexpress-dot-dashboardcommon-c4f71c41.md
Specifies whether data items in a section support coloring.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
[AttributeUsage(AttributeTargets.Property)]
public class SupportColoringAttribute :
Attribute
<AttributeUsage(AttributeTargets.Property)>
Public Class SupportColoringAttribute
Inherits Attribute
You can apply SupportColoringAttribute to a data section when you create metadata for a custom dashboard item. The attribute indicates that a custom item supports coloring for data items in this section. Pass one of the DefaultColoringMode values as an argument to the SupportColoringAttribute constructor:
Hue Data item values use different colors. None Data item values use the same color.
The specified DefaultColoringMode property defines the Default value of the Color by option (the DashboardItemColoringOptions.MeasuresColoringMode property for measures and the Dimension.ColoringMode property for dimensions).
The following code snippet shows how to enable color variation for data items in the Value and Arguments data sections:
using System.ComponentModel;
using DevExpress.DashboardCommon;
namespace CustomItemsSample {
[DisplayName("Funnel"),
CustomItemDescription("Funnel description"),
CustomItemImage("CustomItemsSample.Images.Funnel.svg")]
public class CustomFunnelMetadata : CustomItemMetadata{
[DisplayName("Value"),
EmptyDataItemPlaceholder("Value"),
SupportColoring(DefaultColoringMode.Hue)]
public Measure Value {
get { return GetPropertyValue<Measure>(); }
set { SetPropertyValue(value); }
}
[DisplayName("Arguments"),
EmptyDataItemPlaceholder("Argument"),
SupportColoring(DefaultColoringMode.Hue),
SupportInteractivity]
public DimensionCollection Arguments { get; } = new DimensionCollection();
}
}
Imports System.ComponentModel
Imports DevExpress.DashboardCommon
Namespace CustomItemsSample
<DisplayName("Funnel"), CustomItemDescription("Funnel description"), CustomItemImage("Funnel.svg")>
Public Class CustomFunnelMetadata
Inherits CustomItemMetadata
<DisplayName("Value"), EmptyDataItemPlaceholder("Value"), SupportColoring(DefaultColoringMode.Hue)>
Public Property Value() As Measure
Get
Return GetPropertyValue(Of Measure)()
End Get
Set(ByVal value As Measure)
SetPropertyValue(value)
End Set
End Property
<DisplayName("Arguments"), EmptyDataItemPlaceholder("Argument"), SupportColoring(DefaultColoringMode.Hue), SupportInteractivity>
Public ReadOnly Property Arguments() As New DimensionCollection()
End Class
End Namespace
The following image illustrates the Funnel custom item with enabled color variation for the Value and Arguments data sections. The Default value’s Color by option paints the Argument data item values. The indicator on the data item shows that color variation is enabled.
Object Attribute SupportColoringAttribute
See Also