DashboardControl.DashboardItemMouseUp Event
Occurs when the mouse pointer is over the dashboard item and a mouse button is released.
Namespace: DevExpress.DashboardWpf
Assembly: DevExpress.Dashboard.v24.1.Wpf.dll
NuGet Package: DevExpress.Wpf.Dashboard
Declaration
Event Data
The DashboardItemMouseUp event's data class is DashboardItemMouseActionWpfEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
DashboardItemName | Gets the name of the dashboard item. Inherited from DashboardItemMouseWpfEventArgs. |
Data | Gets the data displayed in the dashboard item. |
The event data class exposes the following methods:
Method | Description |
---|---|
GetAxisPoint() | Obtains the AxisPoint object located at the top priority axis and related to the visual element under the test point. |
GetAxisPoint(String) | Obtains the AxisPoint object located at the specified axis and related to the visual element under the test point. |
GetDeltas() | Gets a list of delta descriptors related to the visual element located under the test point. |
GetMeasures() | Gets a list of measure descriptors related to the visual element located under the test point. |
GetSlice() | Returns the data slice for the Default axis by the AxisPoint related to the visual element located under the test point. |
GetSlice(String) | Returns the data slice for the specified axis by the AxisPoint related to the visual element located under the test point. |
GetUnderlyingData() | Returns underlying data related to the visual element located under the test point. |
GetUnderlyingData(IList<String>) | Returns underlying data related to the visual element located under the test point. |
GetUnderlyingData(String, IList<String>) | Returns underlying data related to the visual element located under the test point. |
GetUnderlyingData(String) | Returns underlying data related to the visual element located under the test point. |
Remarks
Use the e.DashboardItemName property to obtain the dashboard item name for which the event is raised.
To obtain the data related to the dashboard item element, use the following methods:
- e.Data returns the MultiDimensionalData object;
- e.GetAxisPoint;
- e.GetDeltas;
- e.GetMeasures;
- e.GetUnderlyingData.
The event retrieves data from different dashboard item’s visual elements:
- a cell in PivotDashboardItem
- a row in GridDashboardItem
- a point in ChartDashboardItem
- a point in ScatterChartDashboardItem
- a segment in PieDashboardItem
- a gauge in GaugeDashboardItem
- a card in CardDashboardItem
- a point in TreemapDashboardItem
- an area in ChoroplethMapDashboardItem
- a point/bubble/pie in GeoPointMapDashboardItem
The event has the following limitations:
- This event is not raised for filter elements.
- This event does not obtain data related to the following dashboard items: RangeFilterDashboardItem, ImageDashboardItem, TextBoxDashboardItem. Only the item’s name is available.
- This event does not occur when the mouse pointer hovers over the scroll area and space between elements in the following dashboard items: cards in the CardDashboardItem, pies in the PieDashboardItem and gauges in the GaugeDashboardItem.
- This event does not occur when the mouse pointer hovers over the image paddings in the ImageDashboardItem.
private void DashboardControl_DashboardItemMouseUp(object sender, DevExpress.DashboardWpf.DashboardItemMouseActionWpfEventArgs e)
{
if (e.DashboardItemName == "cardDashboardItem1" & e.GetAxisPoint() != null)
{
// Obtains client data related to the clicked card.
MultiDimensionalData clickedItemData = e.GetSlice();
DeltaDescriptor delta = e.GetDeltas()[0];
// Creates a data table that will be used to hold client data.
DataTable dataSource = new DataTable();
dataSource.Columns.Add("Argument", typeof(DateTime));
dataSource.Columns.Add("Actual", typeof(double));
dataSource.Columns.Add("Target", typeof(double));
// Saves values of axis points placed on the "sparkline" axis and corresponding
// actual/target values to the data table.
foreach (AxisPoint point in
clickedItemData.GetAxisPoints(DashboardDataAxisNames.SparklineAxis))
{
DataRow row = dataSource.NewRow();
DeltaValue deltaValue = clickedItemData.GetSlice(point).GetDeltaValue(delta);
if (deltaValue.ActualValue.Value != null &&
deltaValue.TargetValue.Value != null)
{
row["Argument"] = point.Value;
row["Actual"] = deltaValue.ActualValue.Value;
row["Target"] = deltaValue.TargetValue.Value;
}
else
{
row["Argument"] = DBNull.Value;
row["Actual"] = DBNull.Value;
row["Target"] = DBNull.Value;
}
dataSource.Rows.Add(row);
}
DisplayDetailedChart(GetFormTitle(clickedItemData), dataSource);
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DashboardItemMouseUp event.
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.