IComparison
Configuration options for comparing values.
export interface IComparison
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(Optional) Defines how the comparison value will be calculated. | |||
(Optional) Controls the application of conditional colors. | |||
boolean | Enables or disables the comparison. | ||
(Optional) Defines the number format of the comparison value. | |||
boolean | (Optional) Controls the visibility of the arrow trend indicator and its direction based on conditions. | ||
(Optional) Controls the label displayed beneath the comparison value. | |||
(Optional) Defines how the comparison value will be placed. | |||
(Optional) Defines the number format of the comparison sub value. |
Property details
IComparison.calculationTypeproperty
Defines how the comparison value will be calculated.
calculationType?: CalculationType;
Default Value
Based on the secondary measure.
Remarks
The default value is determined by the type of secondary measure:
| Type of secondary measure | Default value |
|---|---|
| Derived measure | change |
| Non-derived measure | ratio |
IComparison.colorConfigproperty
Controls the application of conditional colors.
colorConfig?: IColorConfig;
IComparison.enabledproperty
Enables or disables the comparison.
enabled: boolean;
Default Value
true
IComparison.formatproperty
Defines the number format of the comparison value.
format?: ComparisonFormat;
Default Value
Based on the calculation type.
Remarks
The default value is based on the calculation type:
| Calculation Type | Default format |
|---|---|
| change | Percent (rounded) |
| ratio | Percent (rounded) |
| difference | Inherit |
IComparison.isArrowEnabledproperty
Controls the visibility of the arrow trend indicator and its direction based on conditions.
isArrowEnabled?: boolean;
Remarks
The arrow direction is determined as follows:
| Condition | Direction |
|---|---|
| Primary greater than Secondary | Up |
| Primary less than Secondary | Down |
| Primary equal to Secondary | No direction, arrow hidden |
IComparison.labelConfigproperty
Controls the label displayed beneath the comparison value.
labelConfig?: ILabelConfig;
IComparison.positionproperty
Defines how the comparison value will be placed.
position?: ComparisonPosition;
Default Value
auto
IComparison.subFormatproperty
Defines the number format of the comparison sub value.
subFormat?: ComparisonFormat;
Default Value
Based on the calculation subtype.
Remarks
The default value is based on the calculation subtype:
| Calculation Type | Default format |
|---|---|
| change | Percent (rounded) |
| ratio | Percent (rounded) |
| difference | Inherit |