> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IAlertingDialogComparisonPeriodProps

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: interface
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/presentation/automations/alerting/types.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Props of the default alerting dialog's comparison-period field (the "Compared to" row).

**Signature:**

```typescript
export interface IAlertingDialogComparisonPeriodProps 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [alert](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsalert) |  | [IAutomationMetadataObjectDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iautomationmetadataobjectdefinition/index.md) \| undefined | **_(BETA)_** The alert draft; the select renders nothing unless its condition is a change or difference. |
| [closeOnParentScroll?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropscloseonparentscroll) |  | boolean | **_(BETA)_** _(Optional)_ Closes the dropdown when an ancestor scrolls; the default dialog sets it. |
| [id](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsid) |  | string | **_(BETA)_** Id of the dropdown button; the form row's label points at it. |
| [measure](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsmeasure) |  | [AlertMetric](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetric/index.md) \| undefined | **_(BETA)_** The measure the condition targets, whose comparators are the options; with a single comparator the select renders it as static text. |
| [onComparisonChange](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsoncomparisonchange) |  | (comparison: [AlertMetricComparatorType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetriccomparatortype/index.md), granularity?: [DateAttributeGranularity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.dateattributegranularity/index.md)) =&gt; void | **_(BETA)_** Called with the picked comparison and its granularity. |
| [overlayPositionType?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsoverlaypositiontype) |  | OverlayPositionType | **_(BETA)_** _(Optional)_ Positioning of the dropdown overlay; the default dialog uses `"sameAsTarget"`. |
| [selectedComparison?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsselectedcomparison) |  | [AlertMetricComparatorType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.alertmetriccomparatortype/index.md) | **_(BETA)_** _(Optional)_ The selected period comparison. |
| [selectedGranularity?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ialertingdialogcomparisonperiodprops/index.md#ialertingdialogcomparisonperiodpropsselectedgranularity) |  | [DateAttributeGranularity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.dateattributegranularity/index.md) | **_(BETA)_** _(Optional)_ The selected granularity of the period shift. |

## Property details

### IAlertingDialogComparisonPeriodProps.alert

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The alert draft; the select renders nothing unless its condition is a change or difference.

**Signature:**

```typescript
alert: IAutomationMetadataObjectDefinition | undefined;
```

### IAlertingDialogComparisonPeriodProps.closeOnParentScroll

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Closes the dropdown when an ancestor scrolls; the default dialog sets it.

**Signature:**

```typescript
closeOnParentScroll?: boolean;
```

### IAlertingDialogComparisonPeriodProps.id

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Id of the dropdown button; the form row's label points at it.

**Signature:**

```typescript
id: string;
```

### IAlertingDialogComparisonPeriodProps.measure

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The measure the condition targets, whose comparators are the options; with a single comparator the select renders it as static text.

**Signature:**

```typescript
measure: AlertMetric | undefined;
```

### IAlertingDialogComparisonPeriodProps.onComparisonChange

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Called with the picked comparison and its granularity.

**Signature:**

```typescript
onComparisonChange: (comparison: AlertMetricComparatorType, granularity?: DateAttributeGranularity) => void;
```

### IAlertingDialogComparisonPeriodProps.overlayPositionType

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Positioning of the dropdown overlay; the default dialog uses `"sameAsTarget"`.

**Signature:**

```typescript
overlayPositionType?: OverlayPositionType;
```

### IAlertingDialogComparisonPeriodProps.selectedComparison

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The selected period comparison.

**Signature:**

```typescript
selectedComparison?: AlertMetricComparatorType;
```

### IAlertingDialogComparisonPeriodProps.selectedGranularity

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

The selected granularity of the period shift.

**Signature:**

```typescript
selectedGranularity?: DateAttributeGranularity;
```
