AttributeBuilder
Builder for attributes.
Do not instantiate this class directly. Instead use newAttribute() or modifyAttribute().
export declare class AttributeBuilder
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the AttributeBuilder class.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(alias?: string) => this | Sets alias - alternative title - for the attribute. | ||
() => IAttribute | Creates the IAttribute instance. | ||
() => this | Indicates that the attribute’s localId should be generated using the default local-id generator logic. | ||
(ref: ObjRef) => this | Sets display form reference. | ||
(localId?: Identifier) => this | Sets local identifier (localId) for the attribute. LocalId can be used to reference the attribute within the execution definition. Normally, builder will generate localId based on contents of the attribute definition - taking all properties into account: in typical scenarios you don’t have to call this function at all. The only exception where you have to provide custom local id is if your execution must contain the exact same attribute twice. For convenience, this method also accepts ‘undefined’, which indicates that the default local id generation logic should be used. | ||
() => this | Resets alias - alternative title - set for the attribute. | ||
(showAllValues?: boolean) => this | Sets show all values property. |
Property details
AttributeBuilder.aliasproperty
Sets alias - alternative title - for the attribute.
alias: (alias?: string) => this;
Remarks
This value will then be used in various chart-specific descriptive elements. For convenience if no alias is specified, the attribute will fall back to server-defined value.
AttributeBuilder.buildproperty
Creates the IAttribute instance.
build: () => IAttribute;
AttributeBuilder.defaultLocalIdproperty
Indicates that the attribute’s localId should be generated using the default local-id generator logic.
defaultLocalId: () => this;
AttributeBuilder.displayFormproperty
Sets display form reference.
displayForm: (ref: ObjRef) => this;
AttributeBuilder.localIdproperty
Sets local identifier (localId) for the attribute. LocalId can be used to reference the attribute within the execution definition.
Normally, builder will generate localId based on contents of the attribute definition - taking all properties into account: in typical scenarios you don’t have to call this function at all. The only exception where you have to provide custom local id is if your execution must contain the exact same attribute twice.
For convenience, this method also accepts ‘undefined’, which indicates that the default local id generation logic should be used.
localId: (localId?: Identifier) => this;
AttributeBuilder.noAliasproperty
Resets alias - alternative title - set for the attribute.
noAlias: () => this;
Remarks
The server-defined title of the attribute will be used instead.
AttributeBuilder.showAllValuesproperty
Sets show all values property.
showAllValues: (showAllValues?: boolean) => this;
Remarks
The flag showAllValues translates to a property of the same name on the attribute in execution definition. If truthy, the backend will return all values of the particular attribute in the execution response even if there are no data available for it.