ASPxClientDashboard.ItemElementCustomColor Event
Allows you to color the required dashboard item elements using the specified colors.
Namespace: DevExpress.DashboardWeb.Scripts
Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.Scripts.dll
Declaration
Event Data
The ItemElementCustomColor event's data class is ASPxClientDashboardItemElementCustomColorEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
ItemName | Gets the component name of the dashboard item for which the event was raised. |
The event data class exposes the following methods:
Method | Description |
---|---|
GetColor() | Gets the color of the current dashboard item element. |
GetMeasures() | Gets measures corresponding to the current dashboard item element. |
GetTargetElement() | Gets the axis point tuple that corresponds to the current dashboard item element. |
SetColor(String) | Sets the color of the current dashboard item element. |
Remarks
The ItemElementCustomColor event allows you to color the required dashboard item elements (for instance, chart series points, pie segments or scatter chart points) using the specified colors. The ASPxClientDashboardItemElementCustomColorEventArgs class exposes the following settings that allow you to color the required element.
- Use the ASPxClientDashboardItemElementCustomColorEventArgs.ItemName property to obtain the component name of the dashboard item for which the event was raised.
The ASPxClientDashboardItemElementCustomColorEventArgs.GetTargetElement method returns the axis point tuple that corresponds to the current dashboard item element.
The ASPxClientDashboardItemElementCustomColorEventArgs.GetMeasures method returns measures corresponding to the current dashboard item element.
- Use the ASPxClientDashboardItemElementCustomColorEventArgs.SetColor method to set the color of the current dashboard item element.
Note that color modifications applied using the ItemElementCustomColor event are not applied in the resulting exported document.
Note
By default, the Chart dashboard item colors lines (or fills areas) for the Line/Area series types using the color of the first series point. For these lines/areas, the ASPxClientDashboardItemElementCustomColorEventArgs.GetTargetElement method returns a tuple that does not contain the axis point on the DashboardDataAxisNames.ChartArgumentAxis.