GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    DataBarCondition Class

    Namespace:
    GemBox.Spreadsheet.ConditionalFormatting
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a condition that formats all cells based on their values by displaying a data bar whose length is proportional to cell's value.

    • C#
    • VB.NET
    public sealed class DataBarCondition : FormatCondition
    Public NotInheritable Class DataBarCondition
        Inherits FormatCondition
    Inheritance:
    System.Object
    FormatCondition
    DataBarCondition
    Remarks

    DataBarCondition is not supported when writing to XLS file format.

    Properties

    BarStyle

    Gets the bar appearance settings.

    • C#
    • VB.NET
    public DataBarStyle BarStyle { get; }
    Public ReadOnly Property BarStyle As DataBarStyle
    Property Value
    DataBarStyle

    The bar appearance settings.

    ConditionType

    Gets the DataBar value.

    • C#
    • VB.NET
    public override FormatConditionType ConditionType { get; }
    Public Overrides ReadOnly Property ConditionType As FormatConditionType
    Property Value
    FormatConditionType

    The DataBar value.

    Overrides
    FormatCondition.ConditionType

    Maximum

    Gets the data bar maximum.

    • C#
    • VB.NET
    public ConditionalLength Maximum { get; }
    Public ReadOnly Property Maximum As ConditionalLength
    Property Value
    ConditionalLength

    The data bar maximum.

    Minimum

    Gets the data bar minimum.

    • C#
    • VB.NET
    public ConditionalLength Minimum { get; }
    Public ReadOnly Property Minimum As ConditionalLength
    Property Value
    ConditionalLength

    The data bar minimum.

    ShowBarOnly

    Gets or sets a value indicating whether to show bar only.

    Default value is false (cell value is shown together with bar).

    • C#
    • VB.NET
    public bool ShowBarOnly { get; set; }
    Public Property ShowBarOnly As Boolean
    Property Value
    System.Boolean

    true to show bar only; otherwise, false.

    Methods

    ToString()

    Returns a System.String that represents this DataBarCondition instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this DataBarCondition instance.

    Overrides
    FormatCondition.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Inherited Properties

    Rule

    Gets the conditional formatting rule associated with this condition.

    (Inherited from FormatCondition)

    Examples

    Excel Conditional Formatting example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.