Skip to main content

Obtaining Underlying and Displayed Data

  • 5 minutes to read

The DashboardViewer control provides the API that allows you to obtain underlying data from the dashboard data source and client data displayed within the dashboard item.

Client Data

The dashboard aggregates and visualizes data from the underlying data source (for instance, external databases or lists of data created at runtime).

Each data-bound dashboard item aggregates underlying data based on the provided dimensions. Measure/delta values are calculated at the intersection of these dimensions. Thus, dashboard items visualize dimension values and corresponding measure/delta values. You can access a hierarchical representation of this data using the DashboardViewer API.

Use the DashboardViewer.GetItemData method to obtain the MultiDimensionalData object containing a hierarchical representation of data displayed within a dashboard item.

Client Data Structure

The MultiDimensionalData object is used to hold hierarchical data displayed within the dashboard item in a unified way. The dimension value corresponding to a specific hierarchy level is stored in the AxisPoint class, that defines a point in a multidimensional space. Such points are placed on a specific data axis represented by the DataAxis class. For instance, the pivot grid has the “Row” and “Column” axes, the chart has the “Argument” and “Series” axes, etc. The DashboardDataAxisNames class provides access to names that allow you to identify various types of data axes.

The image below illustrates how hierarchical data is stored in the MultiDimensionalData object.

MultidimensionalData

Metadata

The MultiDimensionalData object allows you to obtain settings of dimensions/measures that provide the displayed data. These settings include data member identifiers, formatting options, data item name, etc.

The MultiDimensionalData.GetDimensions method returns the dimensions that provide data for the specified axis. To obtain measures, use the MultiDimensionalData.GetMeasures method. You can also obtain information about deltas using the MultiDimensionalData.GetDeltas method (for the Grid, Card, Gauge and Choropleth Map dashboard items).

Dimension Values

To access dimension values, you need to obtain axis points placed on the required data axis. Use the MultiDimensionalData.GetAxisPoints method to obtain axis points placed on the specified data axis. The MultiDimensionalData.GetAxisPointsByDimension method allows you to obtain only axis points corresponding to the specified dimension.

As an alternative, obtain the required data axis by calling the MultiDimensionalData.GetAxis method. The returned DataAxis object exposes the DataAxis.GetPoints method that returns axis points belonging to the current axis.

You can obtain dimension values for these axis points using the following members.

Slicing

The MultiDimensionalData.GetSlice method returns the slice of the current MultiDimensionalData object by the specified axis point. For instance, the slice of multidimensional data by the axis point corresponding to “Product 3” allows you to obtain summary values for all date intervals (horizontal shaded area). The slice by the axis point corresponding to “May” contains summary values for all products (vertical shaded area). So, you need to sequentially call this method two times to obtain the slice at the intersection of the “Product 3” and “May” axis points.

The slice of the MultiDimensionalData object can be described by the AxisPointTuple class instance containing a set of axis points from different data axes.

Measure Values

To obtain total summary values or summary values at the intersection of several axis points, call the MultiDimensionalData.GetValue method and pass the required measure obtained using the MultiDimensionalData.GetMeasures method. To obtain delta values, use the MultiDimensionalData.GetDeltaValue method and pass the required delta obtained using the MultiDimensionalData.GetDeltas method.

You can obtain measure values for the returned MeasureValue objects using the following members.

The DeltaValue object contains multiple options that allow you to obtain actual/target values and various delta settings.

Note

Note that you can also obtain summary values for hidden measures using MultiDimensionalData.GetValue/MultiDimensionalData.GetDeltaValue methods.

The DashboardViewer also provides the events that allow you to obtain client data related to the clicked visual element.

For instance, the chart series points in the image below are obtained based on the axis points placed on the DashboardDataAxisNames.SparklineAxis of the clicked card.

ClientData_Win

To learn more, see Events.

View Example: How to Obtain a Dashboard Item's Client Data in the WinForms Viewer

Underlying Data

The dashboard visualizes aggregated data from the underlying data source.

You can obtain underlying data for particular dashboard item using the DashboardViewer.GetUnderlyingData method. This method’s overloads allow you to obtain underlying data related to the specified axis point.

The DashboardViewer also provides the events that allow you to obtain underlying data related to the clicked visual element. For instance, the grid in the image below displays underlying data related to the clicked pivot grid‘ cell.

UnderlyingData_Win

To learn more, see Events.

View Example: How to Obtain a Dashboard Item's Underlying Data for a Clicked Visual Element

Events

The DashboardViewer allows you to access underlying and client data when handling the following events.

When handling these events, you can obtain the axis point related to the clicked visual element (the DashboardItemMouseHitTestEventArgs.GetAxisPoint method) or corresponding underlying data (the DashboardItemMouseHitTestEventArgs.GetUnderlyingData method). Use the DashboardItemMouseEventArgs.DashboardItemName event parameter to obtain the component name of the dashboard item, for which the event was raised.