PivotWindowDefinition Class

A window definition used to perform calculations within the PivotDashboardItem.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

public class PivotWindowDefinition :
    MeasureCalculationWindowDefinition
Public Class PivotWindowDefinition
    Inherits MeasureCalculationWindowDefinition
    Implements

A window definition is used to apply calculations to measure values. To specify a window, create and initialize the PivotWindowDefinition class and assign the resulting object to the Measure.WindowDefinition property.

The PivotWindowDefinition class allows you to specify the window for the Pivot dashboard item.

Important

The assignment of a PivotWindowDefinition instance to the MeasureDefinition.WindowDefinition property is required to perform window calculations.

Examples

The code snippet adds a new measure to the Pivot dashboard item and specifies a window calculation to compute the difference between measure values across a window. The calculation is performed along columns of the Pivot dashboard item.

using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
// ...
PivotDashboardItem pivotItem = dashboardViewer1.Dashboard.Items[pivotItemName] as PivotDashboardItem;
if (pivotItem != null)
{
    Measure extendedPrice = new Measure("Extended Price")
    {
        Name = "Diff",
        ShowGrandTotals = false
    };
    PivotWindowDefinition pivotWindowDefinition = new PivotWindowDefinition();
    pivotWindowDefinition.DefinitionMode = PivotWindowDefinitionMode.Columns;
    extendedPrice.WindowDefinition = pivotWindowDefinition;
    extendedPrice.Calculation = new DifferenceCalculation() { DifferenceType = DifferenceType.Absolute };
    pivotItem.Values.Add(extendedPrice);
}

Inheritance

Object
DevExpress.DashboardCommon.Native.ClonableModelBase<MeasureCalculationWindowDefinition>
MeasureCalculationWindowDefinition
PivotWindowDefinition

Implements

DevExpress.DashboardCommon.Native.IWindowDefinition
See Also