Skip to main content

FormatConditionRuleMinMaxBase.MinimumType Property

Gets or sets whether the target range minimum is automatically calculated or specified manually (as a number or percentage).

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(FormatConditionValueType.Automatic)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public FormatConditionValueType MinimumType { get; set; }

Property Value

Type Default Description
FormatConditionValueType Automatic

A value that specifies how the minimum of the target range is defined.

Available values:

Name Description
Number

Cell values are compared with zero.

Percent

Cell values are compared with each other. The minimum cell value is treated as 0%, the maximum value is 100%.

Automatic

A cuttoff/minimum/maximum value is calculated automatically.

Remarks

If the MinimumType property is set to FormatConditionValueType.Automatic, the range’s minimum value is calculated automatically. With the FormatConditionRuleMinMaxBase.AutomaticType property, you can choose between two calculation modes: Default/ValueBased and ZeroBased. The effect produced by these modes on the range’s minimum value is noticeable when a column contains only positive values.

  • If the FormatConditionRuleMinMaxBase.AutomaticType property is set to Default or ValueBased, the range’s minimum value is the lowest column value.

    In the image below, notice that a cell with the lowest value (5) has no visible data bar.

    FormatRules-DataBar-AutomatiType-ValueBased-Min

  • If the FormatConditionRuleMinMaxBase.AutomaticType property is set to ZeroBased, the range’s minimum value cannot be greater than 0, and it is calculated according to the formula:

    MinimumValue = Math.Min(0, lowestColumnValue)

    The image below shows the same data (as in the previous image). A cell with the lowest value has a visible data bar, since the minimum value now evaluates to zero.

    FormatRules-DataBar-AutomatiType-ZeroBased-Min

In FormatConditionValueType.Number and FormatConditionValueType.Percent modes, the minimum value is specified by the FormatConditionRuleMinMaxBase.Minimum property.

If the MinimumType property is set to Number, the FormatConditionRuleMinMaxBase.Minimum property value is regarded as a numeric value.

If the MinimumType property set to Percent, the FormatConditionRuleMinMaxBase.Minimum property specifies a percentage of the difference between the highest and lowest column values.

minValue + (maxValue - minValue) * (Minimum/100)

For example, the minimum value in a data source filed equals to 200 and the maximum value equals to 300. The Minimum property set to 20 (20%) means that the minimum value is 220:

200 + (300 - 200) * (20/100) = 220

See Also