Freigeben über


DataBar-Klasse

Data Bar.When the object is serialized out as xml, its qualified name is x:dataBar.

Vererbungshierarchie

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.DataBar

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ConditionalFormatValueObject))> _
<ChildElementInfoAttribute(GetType(Color))> _
Public Class DataBar _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As DataBar
[ChildElementInfoAttribute(typeof(ConditionalFormatValueObject))]
[ChildElementInfoAttribute(typeof(Color))]
public class DataBar : OpenXmlCompositeElement

Hinweise

The following table lists the possible child types:

  • ConditionalFormatValueObject <x:cfvo>

  • Color <x:color>

[ISO/IEC 29500-1 1. Ausgabe]

18.3.1.28 dataBar (Data Bar)

Describes a data bar conditional formatting rule.

[Example:

In this example a data bar conditional format is expressed, which spreads across all cell values in the cell range, and whose color is blue.

<dataBar>
<cfvo type="min" val="0"/>
<cfvo type="max" val="0"/>
<color rgb="FF638EC6"/>
</dataBar>

end example]

The length of the data bar for any cell can be calculated as follows:

Data bar length = minLength + (cell value - minimum value in the range) / (maximum value in the range - minimum value in the range) * (maxLength - minLength),

where min and max length are a fixed percentage of the column width (by default, 10% and 90% respectively.)

The minimum difference in length (or increment amount) is 1 pixel.

Parent Elements

cfRule (§18.3.1.10)

Child Elements

Subclause

cfvo (Conditional Format Value Object)

§18.3.1.11

color (Data Bar Color)

§18.3.1.15

Attributes

Description

maxLength (Maximum Length)

The maximum length of the data bar, as a percentage of the cell width.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

minLength (Minimum Length)

The minimum length of the data bar, as a percentage of the cell width.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

showValue (Show Values)

Indicates whether to show the values of the cells on which this data bar is applied.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element's content model (CT_DataBar) is located in §A.2. end note]

© ISO/IEC29500: 2008. Die oben aufgeführten Textauszüge wurden von Microsoft (und/oder den Microsoft-Vendoren) von Englisch nach Deutsch übersetzt, und im Rahmen von ISO wird keinerlei Verantwortung für diese Übersetzungen übernommen.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Siehe auch

Referenz

DataBar-Member

DocumentFormat.OpenXml.Spreadsheet-Namespace