Skip to main content

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

public event DashboardItemMouseActionWpfEventHandler DashboardItemMouseUp

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:

The event retrieves data from different dashboard item’s visual elements:

The event has the following limitations:

View Example: How to handle a mouse click to obtain dashboard item data

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

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.

See Also