The requested page is not available for the requested platform. You are viewing the content for Default platform.
All docs
V19.1
19.2 (EAP/Beta)
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientDashboardItemDataAxisPoint Class

A point on the data axis.

Declaration

declare class ASPxClientDashboardItemDataAxisPoint

Remarks

Each data-bound dashboard item uses a multidimensional representation of data (the ASPxClientDashboardItemData class). This provides the capability to visualize information hierarchically. For instance, the pivot grid allows end-users to expand or collapse column/row field values to view data at different detail levels. The Drill-Down feature provides a common way to move between different detail levels in different dashboard items.

The value corresponding to a specific hierarchy level is stored in the ASPxClientDashboardItemDataAxisPoint class that defines a data point in a multidimensional space. Such data points are placed on a specific data axis, represented by the ASPxClientDashboardItemDataAxis class. For instance, the pivot grid has the "Row" and "Column" axes, the chart has the "Argument" and "Series" axes, etc.

To obtain the parent point for the current axis point, use the ASPxClientDashboardItemDataAxisPoint.GetParent method. The ASPxClientDashboardItemDataAxisPoint.GetChildren method returns the collection of child axis points.

To obtain axis point values, use the ASPxClientDashboardItemDataAxisPoint.GetDimensionValue method.

Examples

The following example demonstrates how to obtain client data corresponding to a particular visual element using ASPxDashboard's client-side API. In this example, the ASPxClientDashboard.ItemClick event is handled to obtain client data and invoke the dxPopup widget with the child dxChart.

In the event handler, the ASPxClientDashboardItemClickEventArgs.GetData method is called to obtain dashboard item's client data. The ASPxClientDashboardItemClickEventArgs.GetAxisPoint method returns the axis point corresponding to the clicked card while the ASPxClientDashboardItemData.GetSlice method returns the slice of client data by this axis point. To obtain axis points belonging to the "Sparkline" data axis, the ASPxClientDashboardItemDataAxis.GetPoints method is used. Corresponding actual/target values are obtained using the ASPxClientDashboardItemData.GetDeltaValue method.

The dxChart is used to display the detailed chart showing a variation of actual/target values over time.

function getClientData(args) {
    if (args.ItemName == "cardDashboardItem1") {
        var clientData = [],
            clientDataTable = [],
            clickedItemData,
            delta;
        var sparklineAxis = DashboardDataAxisNames.SparklineAxis,
            defaultAxis = DashboardDataAxisNames.Default;

        clientData = args.GetData();
        clickedPoint = args.GetAxisPoint(defaultAxis);
        clickedItemData = clientData.GetSlice(clickedPoint);
        delta = args.GetDeltas()[0];

        for (var i = 0; i < clickedItemData.GetAxis(sparklineAxis).GetPoints().length; i++) {
            var dataTableRow = {},
            axisPoint = clickedItemData.GetSlice(clickedItemData.GetAxis(sparklineAxis).GetPoints()[i]);

            dataTableRow["Argument"] = clickedItemData.GetAxis(sparklineAxis).GetPoints()[i].GetValue();
            if (axisPoint.GetDeltaValue(delta.Id).GetActualValue().GetValue() != null &&
                axisPoint.GetDeltaValue(delta.Id).GetTargetValue().GetValue() != null) {
                dataTableRow["Actual"] = axisPoint.GetDeltaValue(delta.Id).GetActualValue().GetValue();
                dataTableRow["Target"] = axisPoint.GetDeltaValue(delta.Id).GetTargetValue().GetValue();
            }
            else {
                dataTableRow["Actual"] = 0;
                dataTableRow["Target"] = 0;
            }
            clientDataTable.push(dataTableRow);
        }

        var $chart = $('<div/>');
        $chart.dxChart({
            height: 500,
            dataSource: clientDataTable,
            series: [{
                valueField: 'Actual', name: 'Actual'
            }, {
                valueField: 'Target', name: 'Target'
            }
            ],
            commonSeriesSettings: {
                type: 'splineArea',
                argumentField: 'Argument',
                ignoreEmptyPoints: true
            },
            argumentAxis: {
                showZero: false,
                type: 'discrete'
            },
            valueAxis: {
                showZero: false,
                type: 'continuous',
                label: { format: 'currency' }
            }
        });

        var popup = $("#myPopup").data("dxPopup");
        popup.option('title', clickedPoint.GetValue() + " - Details");
        $popupContent = popup.content();
        $popupContent.empty();
        $popupContent.append($chart);
        popup.show();
    };
}

function initPopup() {
    $("#myPopup").dxPopup({
        width: 800, height: 600,
        title: "Details",
        showCloseButton: true
    });
}
See Also

Methods

GetAxisName Method

Gets the name of the axis to which the current axis point belongs.

Declaration

GetAxisName(): string

Returns

Type Description
string

A String that in the name of the axis.

Remarks

The DashboardDataAxisNames class exposes constants that identify possible types of data axes.

GetChildren Method

Gets the child axis points for the current axis point.

Declaration

GetChildren(): ASPxClientDashboardItemDataAxisPoint[]

Returns

Type Description
ASPxClientDashboardItemDataAxisPoint[]

An array of ASPxClientDashboardItemDataAxisPoint objects representing child axis points.

See Also

GetDimension Method

Gets the last level dimension corresponding to the current axis point.

Declaration

GetDimension(): ASPxClientDashboardItemDataDimension

Returns

Type Description
ASPxClientDashboardItemDataDimension

A ASPxClientDashboardItemDataDimension object that contains the dimension metadata.

See Also

GetDimensionValue Method

Gets the dimension values at the specified axis point.

Declaration

GetDimensionValue(dimensionId?: string): ASPxClientDashboardItemDataDimensionValue

Optional Parameters

Name Type Default Description
dimensionId string null

Returns

Type Description
ASPxClientDashboardItemDataDimensionValue

A ASPxClientDashboardItemDataDimensionValue object that contains the dimension values at the specified axis point.

GetDimensions Method

Gets the collection of dimensions used to create a hierarchy of axis points from the root point to the current axis point.

Declaration

GetDimensions(): ASPxClientDashboardItemDataDimension[]

Returns

Type Description
ASPxClientDashboardItemDataDimension[]

An array of ASPxClientDashboardItemDataDimension objects that contain the dimension metadata.

GetDisplayText Method

Gets the display text corresponding to the current axis point.

Declaration

GetDisplayText(): string

Returns

Type Description
string

A String that is the display text corresponding to the current axis point.

See Also

GetParent Method

Gets the parent axis point for the current axis point.

Declaration

GetParent(): ASPxClientDashboardItemDataAxisPoint

Returns

Type Description
ASPxClientDashboardItemDataAxisPoint

An ASPxClientDashboardItemDataAxisPoint object representing the parent axis point.

See Also

GetUniqueValue Method

Gets the unique value corresponding to the current axis point.

Declaration

GetUniqueValue(): any

Returns

Type Description
any

The unique value corresponding to the current axis point.

See Also

GetValue Method

Gets the value corresponding to the current axis point.

Declaration

GetValue(): any

Returns

Type Description
any

The value corresponding to the current axis point.

See Also